diff --git a/Cargo.lock b/Cargo.lock index 433f52963..91425ec10 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2340,7 +2340,7 @@ dependencies = [ [[package]] name = "bifrost-cli" -version = "0.25.0" +version = "0.25.2" dependencies = [ "bifrost-service", "clap", diff --git a/node/cli/Cargo.toml b/node/cli/Cargo.toml index 9024c9368..5ed86294c 100644 --- a/node/cli/Cargo.toml +++ b/node/cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bifrost-cli" -version = "0.25.0" +version = "0.25.2" authors.workspace = true description = "Bifrost Parachain Node" build = "build.rs" diff --git a/node/service/src/chain_spec/bifrost_kusama.rs b/node/service/src/chain_spec/bifrost_kusama.rs index 446ac36ea..7216b5f29 100644 --- a/node/service/src/chain_spec/bifrost_kusama.rs +++ b/node/service/src/chain_spec/bifrost_kusama.rs @@ -18,14 +18,13 @@ use crate::chain_spec::{get_account_id_from_seed, get_from_seed, RelayExtensions}; use bifrost_kusama_runtime::{ - AccountId, Balance, BalancesConfig, BlockNumber, InflationInfo, Range, SS58Prefix, - VestingConfig, + AccountId, Balance, BalancesConfig, BlockNumber, SS58Prefix, VestingConfig, }; use bifrost_primitives::{ BifrostKusamaChainId, CurrencyId, CurrencyId::*, TokenInfo, TokenSymbol::*, }; use bifrost_runtime_common::bridge_xcm_helper::DEFAULT_XCM_FEES_IK_PERSPECTIVE; -use bifrost_runtime_common::{constants::currency::DOLLARS, constants::time::HOURS, AuraId}; +use bifrost_runtime_common::{constants::currency::DOLLARS, AuraId}; use cumulus_primitives_core::ParaId; use frame_benchmarking::{account, whitelisted_caller}; use hex_literal::hex; @@ -34,7 +33,7 @@ use sc_service::ChainType; use serde::de::DeserializeOwned; use serde_json as json; use sp_core::{crypto::UncheckedInto, sr25519}; -use sp_runtime::{traits::Zero, Perbill}; +use sp_runtime::traits::Zero; use std::{ collections::BTreeMap, fs::{read_dir, File}, @@ -51,37 +50,6 @@ pub fn ENDOWMENT() -> u128 { 1_000_000 * DOLLARS } -const BLOCKS_PER_ROUND: u32 = 2 * HOURS; - -pub fn inflation_config() -> InflationInfo { - fn to_round_inflation(annual: Range) -> Range { - use bifrost_parachain_staking::inflation::{ - perbill_annual_to_perbill_round, BLOCKS_PER_YEAR, - }; - perbill_annual_to_perbill_round( - annual, - // rounds per year - BLOCKS_PER_YEAR / BLOCKS_PER_ROUND, - ) - } - let annual = Range { - min: Perbill::from_percent(4), - ideal: Perbill::from_percent(5), - max: Perbill::from_percent(5), - }; - InflationInfo { - // staking expectations - expect: Range { - min: 100_000 * DOLLARS, - ideal: 200_000 * DOLLARS, - max: 500_000 * DOLLARS, - }, - // annual inflation - annual, - round: to_round_inflation(annual), - } -} - fn bifrost_kusama_properties() -> Properties { let mut properties = Properties::new(); let mut token_symbol: Vec = vec![]; diff --git a/pallets/asset-registry/src/weights.rs b/pallets/asset-registry/src/weights.rs index e50cf55e3..489e86fa4 100644 --- a/pallets/asset-registry/src/weights.rs +++ b/pallets/asset-registry/src/weights.rs @@ -25,7 +25,7 @@ //! Autogenerated weights for bifrost_asset_registry //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 53.0.0 -//! DATE: 2026-06-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2026-07-03, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! HOSTNAME: `vps-b02dace3`, CPU: `Intel Core Processor (Haswell, no TSX)` //! WASM-EXECUTION: Compiled, CHAIN: Some("bifrost-kusama-local"), DB CACHE: 1024 @@ -70,8 +70,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `337` // Estimated: `3802` - // Minimum execution time: 40_021_000 picoseconds. - Weight::from_parts(41_052_000, 3802) + // Minimum execution time: 39_152_000 picoseconds. + Weight::from_parts(43_668_000, 3802) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -81,8 +81,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `424` // Estimated: `6364` - // Minimum execution time: 45_479_000 picoseconds. - Weight::from_parts(48_179_000, 6364) + // Minimum execution time: 45_184_000 picoseconds. + Weight::from_parts(48_011_000, 6364) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -98,7 +98,7 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `414` // Estimated: `3879` - // Minimum execution time: 48_146_000 picoseconds. + // Minimum execution time: 48_502_000 picoseconds. Weight::from_parts(50_307_000, 3879) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) @@ -115,8 +115,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `414` // Estimated: `3879` - // Minimum execution time: 45_421_000 picoseconds. - Weight::from_parts(47_490_000, 3879) + // Minimum execution time: 44_355_000 picoseconds. + Weight::from_parts(58_884_000, 3879) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -126,8 +126,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `409` // Estimated: `3874` - // Minimum execution time: 38_928_000 picoseconds. - Weight::from_parts(40_647_000, 3874) + // Minimum execution time: 39_552_000 picoseconds. + Weight::from_parts(41_790_000, 3874) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } diff --git a/pallets/bb-bnc/src/benchmarking.rs b/pallets/bb-bnc/src/benchmarking.rs index 26d92103c..f98f4384b 100644 --- a/pallets/bb-bnc/src/benchmarking.rs +++ b/pallets/bb-bnc/src/benchmarking.rs @@ -284,6 +284,26 @@ mod benchmarks { BalanceOf::::unique_saturated_from(100_000_000_000_000_u128), )?; + T::MultiCurrency::mint_into( + CurrencyId::Native(TokenSymbol::BNC), + &test_account, + BalanceOf::::unique_saturated_from(900_000_000_000_000_u128), + )?; + + T::MultiCurrency::mint_into( + CurrencyId::VToken(TokenSymbol::BNC), + &test_account, + BalanceOf::::unique_saturated_from(900_000_000_000_000_u128), + )?; + + let issuance_adjustment: i128 = + >::total_issuance(CurrencyId::VToken(TokenSymbol::BNC)) + .unique_saturated_into(); + assert_ok!(T::VtokenMinting::set_v_currency_issuance( + CurrencyId::VToken(TokenSymbol::BNC), + issuance_adjustment, + )); + let rewards = vec![CurrencyId::Native(TokenSymbol::BNC)]; assert_ok!(BbBNC::::notify_rewards( @@ -293,19 +313,18 @@ mod benchmarks { rewards )); - assert_ok!(BbBNC::::create_lock( - RawOrigin::Signed(test_account.clone()).into(), - BalanceOf::::unique_saturated_from(10_000_000_000_000_u128), - (365 * 86400 / 12u32).into() - )); + for _ in 0..T::MaxPositions::get() { + assert_ok!(BbBNC::::create_lock( + RawOrigin::Signed(test_account.clone()).into(), + BalanceOf::::unique_saturated_from(10_000_000_000_000_u128), + (7 * 86400 / 12u32).into() + )); + } - >::set_block_number((2 * 365 * 86400 / 12u32).into()); + >::set_block_number((14 * 86400 / 12u32).into()); #[extrinsic_call] - _( - RawOrigin::Signed(test_account), - ClaimOption::CreatePosition { lock_months: 12 }, - ); + _(RawOrigin::Signed(test_account), ClaimOption::DirectBnc); Ok(()) } diff --git a/pallets/bb-bnc/src/incentive.rs b/pallets/bb-bnc/src/incentive.rs index 58bd19e83..ae6bfbc2f 100644 --- a/pallets/bb-bnc/src/incentive.rs +++ b/pallets/bb-bnc/src/incentive.rs @@ -25,7 +25,7 @@ use frame_support::{ }; pub use pallet::*; use sp_runtime::Permill; -use sp_std::collections::btree_map::BTreeMap; +use sp_std::{collections::btree_map::BTreeMap, vec::Vec}; /// Type alias for the complex IncentiveConfig with generic parameters pub type IncentiveConfigOf = @@ -209,19 +209,27 @@ impl Pallet { pub fn calculate_reward_per_token( pool_id: PoolId, ) -> Result, DispatchError> { - let mut conf = IncentiveConfigs::::get(pool_id); let current_block_number: BlockNumberFor = T::BlockNumberProvider::current_block_number(); - let total_supply = Self::total_supply(Some(current_block_number))?; + Self::calculate_reward_per_token_at(pool_id, current_block_number) + } + + pub(crate) fn calculate_reward_per_token_at( + pool_id: PoolId, + block_number: BlockNumberFor, + ) -> Result, DispatchError> { + let mut conf = IncentiveConfigs::::get(pool_id); + let total_supply = Self::total_supply(Some(block_number))?; if total_supply == BalanceOf::::zero() { return Ok(conf); } + let reward_applicable_block = block_number.min(conf.period_finish); // Iterate over each currency and its associated reward rate conf.reward_rate .iter() .try_for_each(|(currency, &reward)| -> DispatchResult { let increment: BalanceOf = U512::from( - Self::last_time_reward_applicable(pool_id) + reward_applicable_block .saturating_sub(conf.last_update_time) .saturated_into::(), ) @@ -246,67 +254,180 @@ impl Pallet { Ok(conf) } - /// Calculates the reward earned by an account from a specific reward pool - pub fn earned( - pool_id: PoolId, + fn update_account_reward( who: &AccountIdOf, + bbbnc_balance: BalanceOf, + reward_per_token: BTreeMap, BalanceOf>, share_info: Option<(BalanceOf, BalanceOf)>, - ) -> Result, BalanceOf>, DispatchError> { - let reward_per_token = Self::reward_per_token(pool_id)?; - let bbbnc_balance = Self::balance_of_current_block(who)?; + ) -> DispatchResult { let mut rewards = Rewards::::get(who).unwrap_or_default(); + let user_reward_per_token_paid = UserRewardPerTokenPaid::::get(who); + Self::accumulate_reward_delta( + &mut rewards, + bbbnc_balance, + &reward_per_token, + &user_reward_per_token_paid, + share_info, + )?; + + if rewards != BTreeMap::, BalanceOf>::default() { + Rewards::::insert(who, rewards); + } + UserRewardPerTokenPaid::::insert(who, reward_per_token); + Ok(()) + } + + pub(crate) fn accumulate_reward_delta( + rewards: &mut BTreeMap, BalanceOf>, + bbbnc_balance: BalanceOf, + reward_per_token: &BTreeMap, BalanceOf>, + user_reward_per_token_paid: &BTreeMap, BalanceOf>, + share_info: Option<(BalanceOf, BalanceOf)>, + ) -> DispatchResult { + let zero = BalanceOf::::zero(); reward_per_token .iter() .try_for_each(|(currency, reward)| -> DispatchResult { + let reward_delta = reward + .saturating_sub(*user_reward_per_token_paid.get(currency).unwrap_or(&zero)); let increment = U256::from(bbbnc_balance.saturated_into::()) - .checked_mul(U256::from( - reward - .saturating_sub( - *UserRewardPerTokenPaid::::get(who) - .get(currency) - .unwrap_or(&BalanceOf::::zero()), - ) - .saturated_into::(), - )) + .checked_mul(U256::from(reward_delta.saturated_into::())) .ok_or(ArithmeticError::Overflow)? .checked_div(U256::from(T::Multiplier::get().saturated_into::())) .ok_or(ArithmeticError::Overflow)?; - // If share information is provided, calculate the reward based on the individual share - // and total share. - match share_info { - Some((share, total_share)) => { - let reward = increment - .checked_mul(U256::from(share.saturated_into::())) - .ok_or(ArithmeticError::Overflow)? - .checked_div(U256::from(total_share.saturated_into::())) - .map(u128::try_from) - .ok_or(ArithmeticError::Overflow)? - .map_err(|_| ArithmeticError::Overflow)? - .unique_saturated_into(); - rewards - .entry(*currency) - .and_modify(|total_reward| { - *total_reward = total_reward.saturating_add(reward); - }) - .or_insert(reward); - } - // If no share information is provided, calculate the reward directly - None => { - let reward = u128::try_from(increment) - .map_err(|_| ArithmeticError::Overflow)? - .unique_saturated_into(); - rewards - .entry(*currency) - .and_modify(|total_reward| { - *total_reward = total_reward.saturating_add(reward); - }) - .or_insert(reward); - } + let reward: BalanceOf = match share_info { + Some((share, total_share)) => increment + .checked_mul(U256::from(share.saturated_into::())) + .ok_or(ArithmeticError::Overflow)? + .checked_div(U256::from(total_share.saturated_into::())) + .map(u128::try_from) + .ok_or(ArithmeticError::Overflow)? + .map_err(|_| ArithmeticError::Overflow)? + .unique_saturated_into(), + None => u128::try_from(increment) + .map_err(|_| ArithmeticError::Overflow)? + .unique_saturated_into(), + }; + + if !reward.is_zero() { + rewards + .entry(*currency) + .and_modify(|total_reward| { + *total_reward = total_reward.saturating_add(reward); + }) + .or_insert(reward); } Ok(()) - })?; - Ok(rewards) + }) + } + + pub(crate) fn update_reward_before_expiry( + who: &AccountIdOf, + expiry_block: BlockNumberFor, + ) -> DispatchResult { + let reward_block = expiry_block.saturating_sub(One::one()); + Self::ensure_expiry_reward_snapshot(expiry_block)?; + let Some(reward_per_token_stored) = ExpiryRewardPerToken::::get(expiry_block) else { + return Ok(()); + }; + + let bbbnc_balance = Self::balance_of(who, Some(reward_block))?; + Self::update_account_reward(who, bbbnc_balance, reward_per_token_stored, None) + } + + pub(crate) fn settle_unprocessed_expiry_rewards(who: &AccountIdOf) -> DispatchResult { + let current_block_number: BlockNumberFor = + T::BlockNumberProvider::current_block_number(); + let next_expiring = NextExpiringBlock::::get(); + if next_expiring.is_zero() || next_expiring > current_block_number { + return Ok(()); + } + + for expiry_block in Self::unprocessed_expiry_blocks(who) { + Self::update_reward_before_expiry(who, expiry_block)?; + } + + Ok(()) + } + + pub(crate) fn unprocessed_expiry_blocks(who: &AccountIdOf) -> Vec> { + let current_block_number: BlockNumberFor = + T::BlockNumberProvider::current_block_number(); + let mut expiry_blocks = Vec::new(); + + for position in UserPositions::::get(who) { + let locked = Locked::::get(position); + if !locked.end.is_zero() + && locked.end <= current_block_number + && ExpiringPositions::::contains_key(locked.end, position) + { + expiry_blocks.push(locked.end); + } + } + + expiry_blocks.sort(); + expiry_blocks.dedup(); + expiry_blocks + } + + pub(crate) fn reward_per_token_before_expiry( + expiry_block: BlockNumberFor, + conf: &IncentiveConfigOf, + ) -> Result, BalanceOf>, DispatchError> { + let reward_block = expiry_block.saturating_sub(One::one()); + if let Some(snapshot) = ExpiryRewardPerToken::::get(expiry_block) { + return Ok(snapshot); + } + + if reward_block <= conf.last_update_time { + if conf.last_update_time > expiry_block { + return Ok(BTreeMap::new()); + } + return Ok(conf.reward_per_token_stored.clone()); + } + + Ok( + Self::calculate_reward_per_token_at(BB_BNC_SYSTEM_POOL_ID, reward_block)? + .reward_per_token_stored, + ) + } + + pub(crate) fn ensure_expiry_reward_snapshot(expiry_block: BlockNumberFor) -> DispatchResult { + if ExpiryRewardPerToken::::contains_key(expiry_block) { + return Ok(()); + } + + let reward_block = expiry_block.saturating_sub(One::one()); + let conf = IncentiveConfigs::::get(BB_BNC_SYSTEM_POOL_ID); + if conf.incentive_controller.is_none() || conf.reward_rate.is_empty() { + return Ok(()); + } + + let reward_per_token_stored = if reward_block <= conf.last_update_time { + if conf.last_update_time > expiry_block { + log::warn!( + target: "bb-bnc::ensure_expiry_reward_snapshot", + "Missing reward-per-token snapshot for expired position settlement: expiry_block={expiry_block:?}, last_update_time={:?}", + conf.last_update_time, + ); + return Ok(()); + } + conf.reward_per_token_stored + } else { + let reward_per_token_stored = + Self::calculate_reward_per_token_at(BB_BNC_SYSTEM_POOL_ID, reward_block)? + .reward_per_token_stored; + + IncentiveConfigs::::mutate(BB_BNC_SYSTEM_POOL_ID, |item| { + item.reward_per_token_stored = reward_per_token_stored.clone(); + item.last_update_time = reward_block.min(item.period_finish); + }); + reward_per_token_stored + }; + + ExpiryRewardPerToken::::insert(expiry_block, reward_per_token_stored); + Ok(()) } // Used to update reward when notify_reward or user call @@ -316,6 +437,12 @@ impl Pallet { who: Option<&AccountIdOf>, share_info: Option<(BalanceOf, BalanceOf)>, ) -> DispatchResult { + if pool_id == BB_BNC_SYSTEM_POOL_ID { + if let Some(account) = who { + Self::settle_unprocessed_expiry_rewards(account)?; + } + } + let reward_per_token_stored = Self::reward_per_token(pool_id)?; IncentiveConfigs::::mutate(pool_id, |item| { @@ -324,12 +451,13 @@ impl Pallet { }); // If an account is provided, update the rewards if let Some(account) = who { - let earned = Self::earned(pool_id, account, share_info)?; - // If the account has earned rewards, update the rewards storage - if earned != BTreeMap::, BalanceOf>::default() { - Rewards::::insert(account, earned); - } - UserRewardPerTokenPaid::::insert(account, reward_per_token_stored.clone()); + let bbbnc_balance = Self::balance_of_current_block(account)?; + Self::update_account_reward( + account, + bbbnc_balance, + reward_per_token_stored, + share_info, + )?; } Ok(()) } @@ -349,7 +477,9 @@ impl Pallet { claim_option: ClaimOption, ) -> DispatchResult { Self::update_reward(pool_id, Some(who), share_info)?; - if Self::balance_of_current_block(who)? == BalanceOf::::zero() { + if Rewards::::get(who).is_none() + && Self::balance_of_current_block(who)? == BalanceOf::::zero() + { return Ok(()); } // Excit earlier if balance of token is zero if let Some(rewards) = Rewards::::get(who) { diff --git a/pallets/bb-bnc/src/lib.rs b/pallets/bb-bnc/src/lib.rs index 4ab317768..39f93a06f 100644 --- a/pallets/bb-bnc/src/lib.rs +++ b/pallets/bb-bnc/src/lib.rs @@ -82,7 +82,7 @@ const BB_LOCK_ID: LockIdentifier = *b"bbbnclck"; const MARKUP_LOCK_ID: LockIdentifier = *b"bbbncmkp"; pub const BB_BNC_SYSTEM_POOL_ID: PoolId = u32::MAX; pub type PositionId = u128; -const STORAGE_VERSION: StorageVersion = StorageVersion::new(1); +const STORAGE_VERSION: StorageVersion = StorageVersion::new(2); #[derive( Clone, @@ -452,10 +452,22 @@ pub mod pallet { RewardTooSmallToLock, } - /// Total supply of locked tokens + /// Raw total amount of locked bbBNC principal. + /// + /// This excludes markup and is used for lock accounting invariants with + /// `Locked` and `UserLocked`. Reward distribution must not use this as the + /// denominator when markup is enabled. #[pallet::storage] pub type Supply = StorageValue<_, BalanceOf, ValueQuery>; + /// Current total amount of locked bbBNC after applying user markup. + /// + /// This is the O(1) source of truth for writing global bbBNC point + /// snapshots. `PointHistory.amount` records this value at checkpoints so + /// `total_supply` uses the same boosted unit as user balances. + #[pallet::storage] + pub type BoostedSupply = StorageValue<_, BalanceOf, ValueQuery>; + /// Configurations #[pallet::storage] pub type BbConfigs = @@ -512,6 +524,12 @@ pub mod pallet { pub type IncentiveConfigs = StorageMap<_, Blake2_128Concat, PoolId, IncentiveConfigOf, ValueQuery>; + /// Reward-per-token snapshots for expired positions that may be processed over multiple + /// blocks. [expiry_block => reward per token at expiry_block - 1] + #[pallet::storage] + pub type ExpiryRewardPerToken = + StorageMap<_, Twox64Concat, BlockNumberFor, BTreeMap, BalanceOf>>; + /// User reward per token paid. [who => reward per token] #[pallet::storage] pub type UserRewardPerTokenPaid = StorageMap< @@ -600,26 +618,6 @@ pub mod pallet { T::BlockNumberProvider::current_block_number(); let mut weight = T::WeightInfo::on_initialize(); - // Process existing rewards - let conf = IncentiveConfigs::::get(BB_BNC_SYSTEM_POOL_ID); - if current_block_number == conf.period_finish { - if let Some(e) = Self::notify_reward_amount( - BB_BNC_SYSTEM_POOL_ID, - &conf.incentive_controller, - conf.last_reward.clone(), - ) - .err() - { - log::error!( - target: "bb-bnc::notify_reward_amount", - "Received invalid justification for {e:?}", - ); - Self::deposit_event(Event::NotifyRewardFailed { - rewards: conf.last_reward, - }); - } - } - // Process expired positions let next_expiring = NextExpiringBlock::::get(); @@ -645,8 +643,6 @@ pub mod pallet { .take(remaining_limit as usize) .map(|(position, _)| position) .collect::>(); - let positions_len = positions.len() as u32; - let block_limit_reached = positions_len == remaining_limit; let mut block_has_retained_positions = false; if !positions.is_empty() { @@ -668,6 +664,7 @@ pub mod pallet { if locked.amount.is_zero() { ExpiringPositions::::remove(block, position); + Self::cleanup_expiry_reward_snapshot(block); weight = weight.saturating_add(T::DbWeight::get().writes(1)); positions_processed = positions_processed.saturating_add(1); continue; @@ -686,6 +683,7 @@ pub mod pallet { block_has_retained_positions = true; } else { ExpiringPositions::::remove(block, position); + Self::cleanup_expiry_reward_snapshot(block); positions_processed = positions_processed.saturating_add(1); } } else { @@ -694,15 +692,19 @@ pub mod pallet { "Owner not found for expired position {position:?}", ); ExpiringPositions::::remove(block, position); + Self::cleanup_expiry_reward_snapshot(block); weight = weight.saturating_add(T::DbWeight::get().writes(1)); positions_processed = positions_processed.saturating_add(1); } } } - if block_has_retained_positions || block_limit_reached { + let block_has_remaining_positions = + ExpiringPositions::::iter_prefix(block).next().is_some(); + if block_has_retained_positions || block_has_remaining_positions { blocks_exhausted = true; } else { + Self::cleanup_expiry_reward_snapshot(block); block = block.saturating_add(One::one()); } } @@ -719,6 +721,37 @@ pub mod pallet { // Update the next expiring block NextExpiringBlock::::set(next_block); weight = weight.saturating_add(T::DbWeight::get().reads_writes(1, 1)); + + if blocks_exhausted && block <= current_block_number { + if let Err(e) = Self::ensure_expiry_reward_snapshot(block) { + log::warn!( + target: "bb-bnc::on_initialize", + "Failed to create reward snapshot for throttled expiry block {block:?}: {e:?}", + ); + } + weight = weight.saturating_add(T::DbWeight::get().reads_writes(60, 2)); + } + } + + // Process existing rewards after expired positions so auto-withdraw can settle + // expiry rewards against the previous block before a period rollover advances state. + let conf = IncentiveConfigs::::get(BB_BNC_SYSTEM_POOL_ID); + if current_block_number == conf.period_finish { + if let Some(e) = Self::notify_reward_amount( + BB_BNC_SYSTEM_POOL_ID, + &conf.incentive_controller, + conf.last_reward.clone(), + ) + .err() + { + log::error!( + target: "bb-bnc::notify_reward_amount", + "Received invalid justification for {e:?}", + ); + Self::deposit_event(Event::NotifyRewardFailed { + rewards: conf.last_reward, + }); + } } weight @@ -748,7 +781,7 @@ pub mod pallet { #[cfg(any(test, feature = "try-runtime"))] impl Pallet { - fn do_try_state() -> Result<(), sp_runtime::TryRuntimeError> { + pub(crate) fn do_try_state() -> Result<(), sp_runtime::TryRuntimeError> { for (owner, positions) in UserPositions::::iter() { let mut computed_user_locked = BalanceOf::::zero(); for position in positions.iter() { @@ -779,6 +812,22 @@ pub mod pallet { sp_runtime::TryRuntimeError::Other("UserLocked total mismatch with Supply") ); + let mut boosted_supply_sum = BalanceOf::::zero(); + for position in 0..Position::::get() { + let epoch = UserPointEpoch::::get(position); + if epoch.is_zero() { + continue; + } + boosted_supply_sum = boosted_supply_sum + .saturating_add(UserPointHistory::::get(position, epoch).amount); + } + frame_support::ensure!( + boosted_supply_sum == BoostedSupply::::get(), + sp_runtime::TryRuntimeError::Other( + "UserPointHistory total mismatch with BoostedSupply" + ) + ); + for (end_block, position, _) in ExpiringPositions::::iter() { let lock = Locked::::get(position); frame_support::ensure!( @@ -1081,33 +1130,36 @@ pub mod pallet { Error::::NoController ); - let mut rewards = BTreeMap::new(); - let user_reward_per_token_paid = UserRewardPerTokenPaid::::get(who); + let mut rewards = Rewards::::get(who).unwrap_or_default(); + let mut user_reward_per_token_paid = UserRewardPerTokenPaid::::get(who); + + for expiry_block in Self::unprocessed_expiry_blocks(who) { + let reward_block = expiry_block.saturating_sub(One::one()); + let reward_per_token_stored = + Self::reward_per_token_before_expiry(expiry_block, &conf)?; + let bbbnc_balance = Self::balance_of(who, Some(reward_block))?; + Self::accumulate_reward_delta( + &mut rewards, + bbbnc_balance, + &reward_per_token_stored, + &user_reward_per_token_paid, + None, + )?; + user_reward_per_token_paid = reward_per_token_stored; + } // Get current reward per token for all currencies let reward_per_token = Self::calculate_reward_per_token(BB_BNC_SYSTEM_POOL_ID)?.reward_per_token_stored; - let zero = Zero::zero(); - // Calculate pending rewards for each currency - for (currency_id, current_reward_per_token) in reward_per_token { - let paid = user_reward_per_token_paid - .get(¤cy_id) - .unwrap_or(&zero); - - if let Some(reward) = current_reward_per_token.checked_sub(*paid) { - let balance = Self::balance_of_current_block(who)?; - // pending = reward * balance / multiplier - let pending: BalanceOf = FixedU128::checked_from_rational( - balance.saturated_into::(), - T::Multiplier::get().saturated_into::(), - ) - .and_then(|ratio| ratio.checked_mul_int(reward.saturated_into::())) - .ok_or(ArithmeticError::Overflow)? - .saturated_into(); - rewards.insert(currency_id, pending); - } - } + let balance = Self::balance_of_current_block(who)?; + Self::accumulate_reward_delta( + &mut rewards, + balance, + &reward_per_token, + &user_reward_per_token_paid, + None, + )?; Ok(rewards.into_iter().collect()) } @@ -1160,13 +1212,14 @@ pub mod pallet { } impl Pallet { - pub fn checkpoint( + pub(crate) fn checkpoint( who: &AccountIdOf, position: PositionId, old_locked: LockedBalance, BlockNumberFor>, new_locked: LockedBalance, BlockNumberFor>, ) -> DispatchResult { Self::update_reward_all(who)?; + Self::update_boosted_supply(&old_locked, &new_locked)?; let mut u_old = Point::, BlockNumberFor>::default(); let mut u_new = Point::, BlockNumberFor>::default(); @@ -1235,7 +1288,7 @@ pub mod pallet { if g_epoch > U256::zero() { last_point = PointHistory::::get(g_epoch); } else { - last_point.amount = Supply::::get(); + last_point.amount = BoostedSupply::::get(); } let mut last_checkpoint = last_point.block; let mut t_i: BlockNumberFor = last_checkpoint @@ -1289,7 +1342,7 @@ pub mod pallet { // Fill for the current block, if applicable if t_i == current_block_number { - last_point.amount = Supply::::get(); + last_point.amount = BoostedSupply::::get(); break; } else { PointHistory::::insert(g_epoch, last_point); @@ -1350,6 +1403,31 @@ pub mod pallet { Ok(()) } + fn update_boosted_supply( + old_locked: &LockedBalance, BlockNumberFor>, + new_locked: &LockedBalance, BlockNumberFor>, + ) -> DispatchResult { + // `old_locked` and `new_locked` are expected to use markup-adjusted + // amounts. Keep raw principal accounting in `Supply`. + let old_amount = old_locked.amount; + let new_amount = new_locked.amount; + if new_amount >= old_amount { + BoostedSupply::::try_mutate(|supply| -> DispatchResult { + *supply = supply + .checked_add(new_amount.saturating_sub(old_amount)) + .ok_or(ArithmeticError::Overflow)?; + Ok(()) + }) + } else { + BoostedSupply::::try_mutate(|supply| -> DispatchResult { + *supply = supply + .checked_sub(old_amount.saturating_sub(new_amount)) + .ok_or(ArithmeticError::Underflow)?; + Ok(()) + }) + } + } + pub fn deposit_for_inner( who: &AccountIdOf, position: PositionId, @@ -1389,12 +1467,11 @@ pub mod pallet { Self::set_ve_locked(who, new_locked_balance)?; } - Self::markup_calc( + Self::checkpoint_with_current_markup( who, position, old_locked.clone(), locked.clone(), - UserMarkupInfos::::get(who).as_ref(), )?; Self::deposit_event(Event::Minted { @@ -1567,28 +1644,65 @@ pub mod pallet { Ok(balance) } - pub fn markup_calc( + pub(crate) fn markup_calc( who: &AccountIdOf, position: PositionId, - mut old_locked: LockedBalance, BlockNumberFor>, - mut new_locked: LockedBalance, BlockNumberFor>, + old_locked: LockedBalance, BlockNumberFor>, + new_locked: LockedBalance, BlockNumberFor>, user_markup_info: Option<&UserMarkupInfo>, ) -> DispatchResult { if let Some(info) = user_markup_info { - old_locked.amount = info - .old_markup_coefficient - .checked_mul_int(old_locked.amount) - .and_then(|x| x.checked_add(old_locked.amount)) - .ok_or(ArithmeticError::Overflow)?; - new_locked.amount = info - .markup_coefficient - .checked_mul_int(new_locked.amount) - .and_then(|x| x.checked_add(new_locked.amount)) - .ok_or(ArithmeticError::Overflow)?; + Self::checkpoint_with_markup_coefficients( + who, + position, + old_locked, + new_locked, + info.old_markup_coefficient, + info.markup_coefficient, + ) + } else { + Self::checkpoint(who, position, old_locked, new_locked) } + } - Self::checkpoint(who, position, old_locked.clone(), new_locked.clone())?; - Ok(()) + fn checkpoint_with_current_markup( + who: &AccountIdOf, + position: PositionId, + old_locked: LockedBalance, BlockNumberFor>, + new_locked: LockedBalance, BlockNumberFor>, + ) -> DispatchResult { + let current_markup_coefficient = UserMarkupInfos::::get(who) + .map(|info| info.markup_coefficient) + .unwrap_or_else(FixedU128::zero); + + Self::checkpoint_with_markup_coefficients( + who, + position, + old_locked, + new_locked, + current_markup_coefficient, + current_markup_coefficient, + ) + } + + fn checkpoint_with_markup_coefficients( + who: &AccountIdOf, + position: PositionId, + mut old_locked: LockedBalance, BlockNumberFor>, + mut new_locked: LockedBalance, BlockNumberFor>, + old_markup_coefficient: FixedU128, + new_markup_coefficient: FixedU128, + ) -> DispatchResult { + old_locked.amount = old_markup_coefficient + .checked_mul_int(old_locked.amount) + .and_then(|x| x.checked_add(old_locked.amount)) + .ok_or(ArithmeticError::Overflow)?; + new_locked.amount = new_markup_coefficient + .checked_mul_int(new_locked.amount) + .and_then(|x| x.checked_add(new_locked.amount)) + .ok_or(ArithmeticError::Overflow)?; + + Self::checkpoint(who, position, old_locked, new_locked) } pub fn deposit_markup_inner( @@ -1991,8 +2105,14 @@ pub mod pallet { mut locked: LockedBalance, BlockNumberFor>, if_fast: Option, ) -> DispatchResult { + if if_fast.is_none() && !locked.end.is_zero() { + Self::update_reward_before_expiry(who, locked.end)?; + } else if if_fast.is_some() { + Self::update_reward_all(who)?; + } let value = locked.amount; let old_locked: LockedBalance, BlockNumberFor> = locked.clone(); + let expiry_block = old_locked.end; locked.end = Zero::zero(); locked.amount = Zero::zero(); Locked::::insert(position, locked.clone()); @@ -2020,12 +2140,13 @@ pub mod pallet { } } - Self::checkpoint(who, position, old_locked, locked.clone())?; + Self::checkpoint_with_current_markup(who, position, old_locked, locked.clone())?; T::FarmingInfo::refresh_gauge_pool(who)?; // Remove position from user data structures PositionManager::::remove_position(who, position)?; + Self::cleanup_expiry_reward_snapshot(expiry_block); Self::deposit_event(Event::Withdrawn { who: who.clone(), position, @@ -2117,6 +2238,16 @@ pub mod pallet { /// Remove a position from its expiration mapping pub fn remove_expiring_position(position: PositionId, unlock_time: BlockNumberFor) { ExpiringPositions::::remove(unlock_time, position); + Self::cleanup_expiry_reward_snapshot(unlock_time); + } + + pub(crate) fn cleanup_expiry_reward_snapshot(expiry_block: BlockNumberFor) { + if ExpiringPositions::::iter_prefix(expiry_block) + .next() + .is_none() + { + ExpiryRewardPerToken::::remove(expiry_block); + } } } } @@ -2263,10 +2394,13 @@ impl BbBNCInterface, CurrencyIdOf, BalanceOf, Bl T::BlockNumberProvider::current_block_number(); ensure!(current_block_number >= locked.end, Error::::Expired); - // Remove position from expiring mapping - Self::remove_expiring_position(position, locked.end); + let expiry_block = locked.end; + Self::withdraw_no_ensure(who, position, locked, None)?; - Self::withdraw_no_ensure(who, position, locked, None) + // Remove position from expiring mapping after expiry reward settlement so the + // last position at an expiry block cannot drop the shared reward snapshot. + Self::remove_expiring_position(position, expiry_block); + Ok(()) } fn balance_of( diff --git a/pallets/bb-bnc/src/migrations/mod.rs b/pallets/bb-bnc/src/migrations/mod.rs index 379d174c5..8303032c3 100644 --- a/pallets/bb-bnc/src/migrations/mod.rs +++ b/pallets/bb-bnc/src/migrations/mod.rs @@ -17,3 +17,4 @@ // along with this program. If not, see . pub mod v1; +pub mod v2; diff --git a/pallets/bb-bnc/src/migrations/v1.rs b/pallets/bb-bnc/src/migrations/v1.rs index d1672d228..a9e11b629 100644 --- a/pallets/bb-bnc/src/migrations/v1.rs +++ b/pallets/bb-bnc/src/migrations/v1.rs @@ -164,3 +164,68 @@ impl OnRuntimeUpgrade for MigrateToV1 { Ok(()) } } + +#[cfg(test)] +mod tests { + use super::*; + use crate::{mock::*, Pallet as BbBNCPallet}; + use frame_support::traits::{OnRuntimeUpgrade, StorageVersion}; + use sp_core::ConstU32; + + #[test] + fn skips_when_in_code_version_is_newer() { + ExtBuilder::default().build().execute_with(|| { + StorageVersion::new(0).put::>(); + v0::ExpiringPositions::::insert( + 10, + BoundedVec::>::try_from(vec![1, 2, 3]).unwrap(), + ); + v0::ExpiringPositions::::insert( + 20, + BoundedVec::>::try_from(vec![4, 5]).unwrap(), + ); + + let _ = MigrateToV1::::on_runtime_upgrade(); + + assert_eq!(BbBNCPallet::::on_chain_storage_version(), 0); + assert!(frame_support::storage::unhashed::exists( + &v0::ExpiringPositions::::hashed_key_for(10) + )); + assert!(frame_support::storage::unhashed::exists( + &v0::ExpiringPositions::::hashed_key_for(20) + )); + assert_eq!(ExpiringPositions::::iter().count(), 0); + + let _ = MigrateToV1::::on_runtime_upgrade(); + + assert_eq!(BbBNCPallet::::on_chain_storage_version(), 0); + assert_eq!(ExpiringPositions::::iter().count(), 0); + }); + } + + #[test] + fn empty_storage_skips_when_in_code_version_is_newer() { + ExtBuilder::default().build().execute_with(|| { + StorageVersion::new(0).put::>(); + + let _ = MigrateToV1::::on_runtime_upgrade(); + + assert_eq!(BbBNCPallet::::on_chain_storage_version(), 0); + assert_eq!(ExpiringPositions::::iter().count(), 0); + }); + } + + #[cfg(feature = "try-runtime")] + #[test] + fn try_runtime_rejects_when_in_code_version_is_newer() { + ExtBuilder::default().build().execute_with(|| { + StorageVersion::new(0).put::>(); + v0::ExpiringPositions::::insert( + 10, + BoundedVec::>::try_from(vec![1, 2, 3]).unwrap(), + ); + + assert!(MigrateToV1::::pre_upgrade().is_err()); + }); + } +} diff --git a/pallets/bb-bnc/src/migrations/v2.rs b/pallets/bb-bnc/src/migrations/v2.rs new file mode 100644 index 000000000..27d2445f1 --- /dev/null +++ b/pallets/bb-bnc/src/migrations/v2.rs @@ -0,0 +1,212 @@ +// This file is part of Bifrost. + +// Copyright (C) Liebi Technologies PTE. LTD. +// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +use crate::*; +use frame_support::{pallet_prelude::*, traits::OnRuntimeUpgrade, weights::Weight}; +#[cfg(feature = "try-runtime")] +use parity_scale_codec::{Decode, Encode}; +#[cfg(feature = "try-runtime")] +use sp_runtime::TryRuntimeError; +use sp_std::marker::PhantomData; + +const LOG_TARGET: &str = "bb-bnc::migration::v2"; + +pub struct MigrateToV2(PhantomData); + +impl MigrateToV2 { + fn rebuild_boosted_supply() -> (BalanceOf, u64, u64) { + let mut boosted_supply = BalanceOf::::zero(); + let mut scanned_positions = 0u64; + let mut active_positions = 0u64; + + for position in 0..Position::::get() { + scanned_positions = scanned_positions.saturating_add(1); + let epoch = UserPointEpoch::::get(position); + if epoch.is_zero() { + continue; + } + + active_positions = active_positions.saturating_add(1); + boosted_supply = + boosted_supply.saturating_add(UserPointHistory::::get(position, epoch).amount); + } + + (boosted_supply, scanned_positions, active_positions) + } +} + +impl OnRuntimeUpgrade for MigrateToV2 { + fn on_runtime_upgrade() -> Weight { + let on_chain_version = Pallet::::on_chain_storage_version(); + let in_code_version = Pallet::::in_code_storage_version(); + + if on_chain_version == 1 && in_code_version == 2 { + let (boosted_supply, scanned_positions, active_positions) = + Self::rebuild_boosted_supply(); + BoostedSupply::::set(boosted_supply); + + let epoch = Epoch::::get(); + let mut point = PointHistory::::get(epoch); + point.amount = boosted_supply; + PointHistory::::insert(epoch, point); + + StorageVersion::new(2).put::>(); + log::info!( + target: LOG_TARGET, + "Rebuilt boosted supply {boosted_supply:?} from {active_positions} active positions after scanning {scanned_positions} position ids", + ); + + T::DbWeight::get().reads_writes( + scanned_positions + .saturating_add(active_positions) + .saturating_add(4), + 3, + ) + } else { + log::warn!( + target: LOG_TARGET, + "Skipping migration because on-chain version is {on_chain_version:?} and in-code version is {in_code_version:?}", + ); + T::DbWeight::get().reads(2) + } + } + + #[cfg(feature = "try-runtime")] + fn pre_upgrade() -> Result, TryRuntimeError> { + let on_chain_version = Pallet::::on_chain_storage_version(); + ensure!( + Pallet::::in_code_storage_version() == 2, + "BbBNC v2 migration requires in-code storage version 2" + ); + + if on_chain_version == 2 { + log::info!( + target: LOG_TARGET, + "pre_upgrade skipping already-applied migration", + ); + return Ok(Option::>::None.encode()); + } + + ensure!( + on_chain_version == 1, + "BbBNC v2 migration requires on-chain storage version 1" + ); + + let (boosted_supply, _, _) = Self::rebuild_boosted_supply(); + Ok(Some(boosted_supply).encode()) + } + + #[cfg(feature = "try-runtime")] + fn post_upgrade(state: Vec) -> Result<(), TryRuntimeError> { + let expected = Option::>::decode(&mut &state[..]) + .expect("pre_upgrade provides a valid encoded boosted supply"); + + ensure!( + Pallet::::on_chain_storage_version() == 2, + "BbBNC storage version should be 2 after migration" + ); + let Some(expected) = expected else { + log::info!( + target: LOG_TARGET, + "post_upgrade verified already-applied migration", + ); + return Ok(()); + }; + + ensure!( + BoostedSupply::::get() == expected, + "BoostedSupply should match rebuilt boosted supply" + ); + ensure!( + PointHistory::::get(Epoch::::get()).amount == expected, + "Current global point amount should match rebuilt boosted supply" + ); + + Ok(()) + } +} + +#[cfg(test)] +mod tests { + use super::*; + use crate::{mock::*, Pallet as BbBNCPallet}; + use frame_support::{ + assert_ok, + traits::{OnRuntimeUpgrade, StorageVersion}, + }; + use sp_runtime::FixedU128; + + const POSITIONID0: u128 = 0; + const RWI: FixedU128 = FixedU128::from_inner(100_000_000_000_000_000); + + #[test] + fn rebuilds_boosted_supply() { + ExtBuilder::default() + .one_hundred_for_alice_n_bob() + .build() + .execute_with(|| { + asset_registry(); + System::set_block_number(System::block_number() + 20); + assert_ok!(BbBNC::set_config( + RuntimeOrigin::root(), + Some(0), + Some(7 * DAYS), + Some(10) + )); + assert_ok!(BbBNC::set_markup_coefficient( + RuntimeOrigin::root(), + VBNC, + FixedU128::from_inner(100_000_000_000_000_000), + FixedU128::saturating_from_integer(1), + RWI, + )); + assert_ok!(BbBNC::create_lock_inner( + &BOB, + 10_000_000_000_000, + System::block_number() + 365 * DAYS, + )); + assert_ok!(BbBNC::deposit_markup( + RuntimeOrigin::signed(BOB), + VBNC, + 10_000_000_000_000 + )); + + let expected_boosted_supply = UserPointHistory::::get( + POSITIONID0, + UserPointEpoch::::get(POSITIONID0), + ) + .amount; + assert!(expected_boosted_supply > Supply::::get()); + + BoostedSupply::::set(0); + PointHistory::::mutate(Epoch::::get(), |point| { + point.amount = Supply::::get(); + }); + StorageVersion::new(1).put::>(); + + let _ = MigrateToV2::::on_runtime_upgrade(); + + assert_eq!(BbBNCPallet::::on_chain_storage_version(), 2); + assert_eq!(BoostedSupply::::get(), expected_boosted_supply); + assert_eq!( + PointHistory::::get(Epoch::::get()).amount, + expected_boosted_supply + ); + }); + } +} diff --git a/pallets/bb-bnc/src/mock.rs b/pallets/bb-bnc/src/mock.rs index 1f4b7423b..53af71db6 100644 --- a/pallets/bb-bnc/src/mock.rs +++ b/pallets/bb-bnc/src/mock.rs @@ -22,7 +22,7 @@ #![allow(non_upper_case_globals)] use crate as bb_bnc; -use bifrost_asset_registry::AssetIdMaps; +use bifrost_asset_registry::{AssetIdMaps, AssetMetadata}; use bifrost_primitives::{ BifrostEntranceAccount, BifrostExitAccount, BifrostFeeAccount, BuyBackAccount, IncentivePalletId, IncentivePoolAccount, MoonbeamChainId, @@ -342,18 +342,11 @@ impl pallet_xcm::Config for Runtime { type AuthorizedAliasConsideration = Disabled; } +#[derive(Default)] pub struct ExtBuilder { endowed_accounts: Vec<(AccountId, CurrencyId, Balance)>, } -impl Default for ExtBuilder { - fn default() -> Self { - Self { - endowed_accounts: vec![], - } - } -} - impl ExtBuilder { pub fn balances(mut self, endowed_accounts: Vec<(AccountId, CurrencyId, Balance)>) -> Self { self.endowed_accounts = endowed_accounts; @@ -440,6 +433,32 @@ impl ExtBuilder { } } +pub fn asset_registry() { + let items = [ + ( + DOT, + AssetMetadata { + name: b"Polkadot DOT".to_vec(), + symbol: b"DOT".to_vec(), + decimals: 10, + minimal_balance: 100_000_000, // 0.01 DOT + }, + ), + ( + BNC, + AssetMetadata { + name: b"Bifrost".to_vec(), + symbol: b"BNC".to_vec(), + decimals: 12, + minimal_balance: 10 * milli::(BNC), + }, + ), + ]; + for (currency_id, metadata) in items.iter() { + AssetRegistry::do_register_metadata(*currency_id, metadata).expect("Token register"); + } +} + #[cfg(feature = "runtime-benchmarks")] pub fn new_test_ext_benchmark() -> sp_io::TestExternalities { ExtBuilder::default().build() diff --git a/pallets/bb-bnc/src/tests.rs b/pallets/bb-bnc/src/tests.rs index b41e9252e..1d8edf674 100644 --- a/pallets/bb-bnc/src/tests.rs +++ b/pallets/bb-bnc/src/tests.rs @@ -21,15 +21,9 @@ #![cfg(test)] use crate::{impls::BbBNCInterface, mock::*, *}; -use bifrost_asset_registry::AssetMetadata; use bifrost_primitives::{BuyBackAccount, IncentivePalletId}; -use bifrost_runtime_common::milli; -use frame_support::{ - assert_noop, assert_ok, - traits::{Get, OnRuntimeUpgrade, StorageVersion}, -}; -use sp_core::ConstU32; +use frame_support::{assert_noop, assert_ok, traits::Get}; use sp_runtime::traits::AccountIdConversion; const POSITIONID0: u128 = 0; @@ -896,32 +890,6 @@ fn update_reward() { }); } -fn asset_registry() { - let items = vec![ - ( - DOT, - AssetMetadata { - name: b"Polkadot DOT".to_vec(), - symbol: b"DOT".to_vec(), - decimals: 10, - minimal_balance: 100_000_000, // 0.01 DOT - }, - ), - ( - BNC, - AssetMetadata { - name: b"Bifrost".to_vec(), - symbol: b"BNC".to_vec(), - decimals: 12, - minimal_balance: 10 * milli::(BNC), - }, - ), - ]; - for (currency_id, metadata) in items.iter() { - AssetRegistry::do_register_metadata(*currency_id, metadata).expect("Token register"); - } -} - #[test] fn notify_reward_amount() { ExtBuilder::default() @@ -1120,6 +1088,92 @@ fn create_lock_to_withdraw() { }); } +#[test] +fn withdraw_with_markup_clears_raw_and_boosted_supply() { + ExtBuilder::default() + .one_hundred_for_alice_n_bob() + .build() + .execute_with(|| { + asset_registry(); + System::set_block_number(System::block_number() + 7 * DAYS); + assert_ok!(BbBNC::set_config( + RuntimeOrigin::root(), + Some(0), + Some(7 * DAYS), + Some(10) + )); + assert_ok!(BbBNC::set_markup_coefficient( + RuntimeOrigin::root(), + VBNC, + FixedU128::from_inner(100_000_000_000_000_000), + FixedU128::saturating_from_integer(1), + RWI, + )); + + let locked_amount = 50_000_000_000_000; + assert_ok!(BbBNC::create_lock_inner( + &BOB, + locked_amount, + System::block_number() + 365 * DAYS + )); + assert_ok!(BbBNC::deposit_markup( + RuntimeOrigin::signed(BOB), + VBNC, + 10_000_000_000_000 + )); + + assert_eq!(Supply::::get(), locked_amount); + assert!(BoostedSupply::::get() > Supply::::get()); + + System::set_block_number(Locked::::get(POSITIONID0).end); + assert_ok!(BbBNC::withdraw(RuntimeOrigin::signed(BOB), POSITIONID0)); + + assert_eq!(Supply::::get(), 0); + assert_eq!(BoostedSupply::::get(), 0); + assert_eq!(BbBNC::total_supply(Some(System::block_number())), Ok(0)); + }); +} + +#[test] +fn try_state_detects_boosted_supply_mismatch() { + ExtBuilder::default() + .one_hundred_for_alice_n_bob() + .build() + .execute_with(|| { + asset_registry(); + System::set_block_number(System::block_number() + 7 * DAYS); + assert_ok!(BbBNC::set_config( + RuntimeOrigin::root(), + Some(0), + Some(7 * DAYS), + Some(10) + )); + assert_ok!(BbBNC::set_markup_coefficient( + RuntimeOrigin::root(), + VBNC, + FixedU128::from_inner(100_000_000_000_000_000), + FixedU128::saturating_from_integer(1), + RWI, + )); + + assert_ok!(BbBNC::create_lock_inner( + &BOB, + 50_000_000_000_000, + System::block_number() + 365 * DAYS + )); + assert_ok!(BbBNC::deposit_markup( + RuntimeOrigin::signed(BOB), + VBNC, + 10_000_000_000_000 + )); + assert_ok!(BbBNC::do_try_state()); + + BoostedSupply::::set(Supply::::get()); + + assert!(BbBNC::do_try_state().is_err()); + }); +} + #[test] fn overflow() { ExtBuilder::default() @@ -1841,10 +1895,33 @@ fn multiple_positions_with_complex_rewards_should_work() { // Advance time and check rewards System::set_block_number(System::block_number() + 6 * DAYS); + let pending_rewards = BbBNC::query_pending_rewards(&BOB).unwrap(); + let dot_pending_reward = pending_rewards + .iter() + .find(|(currency_id, _)| *currency_id == DOT) + .map(|(_, amount)| *amount) + .unwrap_or(0); + let dot_balance_before = Tokens::free_balance(DOT, &BOB); assert_ok!(BbBNC::get_rewards( RuntimeOrigin::signed(BOB), direct_claim() )); + let dot_balance_after = Tokens::free_balance(DOT, &BOB); + let claimed_reward = dot_balance_after.saturating_sub(dot_balance_before); + let emitted_reward = IncentiveConfigs::::get(BB_BNC_SYSTEM_POOL_ID) + .reward_rate + .get(&DOT) + .copied() + .unwrap() + .saturating_mul((6 * DAYS) as BalanceOf); + + assert_eq!(claimed_reward, dot_pending_reward); + assert!( + claimed_reward <= emitted_reward, + "claimed reward ({}) must not exceed emitted reward ({})", + claimed_reward, + emitted_reward + ); // Verify total balance considers both positions and markup assert_eq!( @@ -1854,7 +1931,7 @@ fn multiple_positions_with_complex_rewards_should_work() { assert_eq!( BbBNC::total_supply(Some(System::block_number())), - Ok(14026044152175) + Ok(14402294152174) ); // Verify individual position balances @@ -2216,7 +2293,710 @@ fn test_balance_after_lock_expires() { .build() .execute_with(|| { asset_registry(); - // System::set_block_number(System::block_number() + 20); + // System::set_block_number(System::block_number() + 20); + + assert_ok!(BbBNC::set_config( + RuntimeOrigin::root(), + Some(0), + Some(7 * DAYS), + Some(10) + )); + + // Create a lock + assert_ok!(BbBNC::create_lock_inner( + &BOB, + 10_000_000_000_000, + 7 * DAYS, // Lock for 7 days (minimum time) + )); + + // Check initial balance + let initial_balance = BbBNC::balance_of(&BOB, Some(System::block_number())).unwrap(); + assert!( + initial_balance > 0, + "Initial balance should be greater than 0" + ); + + // Advance blocks to just before lock expiration + let current_block = System::block_number(); + let blocks_to_advance = 7 * DAYS; // Advance to just before expiration + System::set_block_number(current_block + blocks_to_advance * 2 - 1); + + // Check balance before expiration + let balance_before_expiration = + BbBNC::balance_of(&BOB, Some(System::block_number())).unwrap(); + assert!( + balance_before_expiration > 0, + "Balance should still be greater than 0 before expiration" + ); + + // Advance one more block to reach expiration + System::set_block_number(System::block_number() + 1); + + // Check balance after expiration + let balance_after_expiration = + BbBNC::balance_of(&BOB, Some(System::block_number())).unwrap(); + assert_eq!( + balance_after_expiration, 0, + "Balance should be 0 after lock expires" + ); + }); +} + +#[test] +fn balance_changes_over_time_and_redeem() { + ExtBuilder::default() + .one_hundred_for_alice_n_bob() + .build() + .execute_with(|| { + asset_registry(); + System::set_block_number(System::block_number() + 20); + + assert_ok!(BbBNC::set_config( + RuntimeOrigin::root(), + Some(0), + Some(1), + Some(10) + )); + + // Get initial position counter + let _position = Position::::get(); + + // Create a lock with 1000e12 tokens for 100000 blocks + assert_ok!(BbBNC::create_lock_inner( + &ALICE, + 1_000_000_000_000_000, + System::block_number() + 100_000, + )); + + // Advance 1 block (simulating newBlock) + System::set_block_number(System::block_number() + 1); + + // Advance to block number + 110000 (lock expiry + 10000) + let current_block = System::block_number(); + System::set_block_number(current_block + 18 * DAYS); + assert_ok!(BbBNC::withdraw(RuntimeOrigin::signed(ALICE), POSITIONID0)); + + // Check balance and total supply after lock expiry + let balance = BbBNC::balance_of(&ALICE, None).unwrap(); + let total_supply = BbBNC::total_supply(Some(System::block_number())).unwrap(); + + // Advance 10000 more blocks + System::set_block_number(System::block_number() + 10_000); + + // Check balance and total supply after more time + let balance2 = BbBNC::balance_of(&ALICE, None).unwrap(); + let total_supply2 = BbBNC::total_supply(Some(System::block_number())).unwrap(); + + // Advance a very large number of blocks (10,000,000) + System::set_block_number(System::block_number() + 10_000_000); + + // Check balance and total supply after a very long time + let balance3 = BbBNC::balance_of(&ALICE, None).unwrap(); + let total_supply3 = BbBNC::total_supply(Some(System::block_number())).unwrap(); + + // Verify balances are as expected (should be 0 after lock expiry) + assert_eq!(balance, 0); + assert_eq!(balance2, 0); + assert_eq!(balance3, 0); + + // Verify total supply matches user balance + assert_eq!(total_supply, balance); + assert_eq!(total_supply2, balance2); + assert_eq!(total_supply3, balance3); + }); +} + +#[test] +fn test_expired_positions_auto_withdrawal() { + ExtBuilder::default() + .one_hundred_for_alice_n_bob() + .build() + .execute_with(|| { + let unlock_time = 100; + let lock_value = 1000; + + // Set current block to 1 + System::set_block_number(1); + + // Create a lock + assert_ok!(BbBNC::create_lock( + RuntimeOrigin::signed(ALICE), + lock_value, + unlock_time + )); + + let position = Position::::get() - 1; + + // Get the real unlock time (calculated same way as in the pallet) + let real_unlock_time = ((1 + unlock_time) / Week::get() + 1) * Week::get(); + + // Ensure the position is correctly recorded in ExpiringPositions + assert!(expiring_contains(real_unlock_time, position)); + + // Manually set NextExpiringBlock to real_unlock_time for the test + NextExpiringBlock::::set(real_unlock_time); + + // Jump directly to the expiry block + System::set_block_number(real_unlock_time); + + // Run on_initialize for the expiry block + BbBNC::on_initialize(real_unlock_time); + + // Check that position has been auto-withdrawn + let locked = Locked::::get(position); + assert_eq!(locked.amount, 0, "Position should be auto-withdrawn"); + + // Check the position was removed from ExpiringPositions + assert!( + expiring_is_empty(real_unlock_time), + "Position should be removed from ExpiringPositions" + ); + + // Check that NextExpiringBlock was updated to the expected value + assert_eq!( + NextExpiringBlock::::get(), + 100801, + "NextExpiringBlock should be updated to the expected value" + ); + }); +} + +#[test] +fn auto_withdraw_settles_rewards_before_position_expires() { + ExtBuilder::default() + .one_hundred_for_alice_n_bob() + .build() + .execute_with(|| { + asset_registry(); + System::set_block_number(1); + + assert_ok!(BbBNC::set_config( + RuntimeOrigin::root(), + Some(0), + Some(7 * DAYS), + Some(10) + )); + assert_ok!(BbBNC::create_lock( + RuntimeOrigin::signed(BOB), + 10_000_000_000_000, + 7 * DAYS + )); + let position = Position::::get() - 1; + let real_unlock_time = ((1 + 7 * DAYS) / Week::get() + 1) * Week::get(); + + assert_ok!(Tokens::deposit(DOT, &ALICE, 100_000_000_000)); + assert_ok!(BbBNC::notify_rewards( + RuntimeOrigin::root(), + ALICE, + Some(7 * DAYS), + vec![DOT] + )); + + System::set_block_number(real_unlock_time - 1); + let expected_reward = BbBNC::query_pending_rewards(&BOB) + .unwrap() + .into_iter() + .find(|(currency_id, _)| *currency_id == DOT) + .map(|(_, amount)| amount) + .unwrap_or_default(); + assert!(expected_reward > 0); + + NextExpiringBlock::::set(real_unlock_time); + System::set_block_number(real_unlock_time); + BbBNC::on_initialize(real_unlock_time); + + assert_eq!(Locked::::get(position).amount, 0); + assert_eq!(BbBNC::balance_of(&BOB, None).unwrap(), 0); + assert_eq!( + Rewards::::get(BOB) + .unwrap() + .get(&DOT) + .copied() + .unwrap_or_default(), + expected_reward + ); + + let balance_before = Tokens::free_balance(DOT, &BOB); + assert_ok!(BbBNC::get_rewards( + RuntimeOrigin::signed(BOB), + direct_claim() + )); + assert_eq!( + Tokens::free_balance(DOT, &BOB) - balance_before, + expected_reward + ); + assert!(Rewards::::get(BOB).is_none()); + }); +} + +#[test] +fn update_reward_before_expiry_settles_multiple_users_at_same_expiry() { + ExtBuilder::default() + .one_hundred_for_alice_n_bob() + .build() + .execute_with(|| { + asset_registry(); + System::set_block_number(1); + + assert_ok!(BbBNC::set_config( + RuntimeOrigin::root(), + Some(0), + Some(7 * DAYS), + Some(10) + )); + assert_ok!(BbBNC::create_lock( + RuntimeOrigin::signed(BOB), + 10_000_000_000_000, + 7 * DAYS + )); + let bob_position = Position::::get() - 1; + assert_ok!(BbBNC::create_lock( + RuntimeOrigin::signed(CHARLIE), + 10_000_000_000_000, + 7 * DAYS + )); + let charlie_position = Position::::get() - 1; + let real_unlock_time = ((1 + 7 * DAYS) / Week::get() + 1) * Week::get(); + assert!(expiring_contains(real_unlock_time, bob_position)); + assert!(expiring_contains(real_unlock_time, charlie_position)); + let mut positions = expiring_positions(real_unlock_time); + positions.sort(); + assert_eq!(positions, vec![bob_position, charlie_position]); + assert_eq!(Locked::::get(bob_position).end, real_unlock_time); + assert_eq!( + Locked::::get(charlie_position).end, + real_unlock_time + ); + + assert_ok!(Tokens::deposit(DOT, &ALICE, 100_000_000_000)); + assert_ok!(BbBNC::notify_rewards( + RuntimeOrigin::root(), + ALICE, + Some(7 * DAYS), + vec![DOT] + )); + + System::set_block_number(real_unlock_time - 1); + let bob_expected_reward = BbBNC::query_pending_rewards(&BOB) + .unwrap() + .into_iter() + .find(|(currency_id, _)| *currency_id == DOT) + .map(|(_, amount)| amount) + .unwrap_or_default(); + let charlie_expected_reward = BbBNC::query_pending_rewards(&CHARLIE) + .unwrap() + .into_iter() + .find(|(currency_id, _)| *currency_id == DOT) + .map(|(_, amount)| amount) + .unwrap_or_default(); + assert!(bob_expected_reward > 0); + assert!(charlie_expected_reward > 0); + + assert_ok!(BbBNC::update_reward_before_expiry(&BOB, real_unlock_time)); + assert!(ExpiryRewardPerToken::::contains_key( + real_unlock_time + )); + IncentiveConfigs::::mutate(BB_BNC_SYSTEM_POOL_ID, |conf| { + conf.last_update_time = real_unlock_time + DAYS; + }); + assert_ok!(BbBNC::update_reward_before_expiry( + &CHARLIE, + real_unlock_time + )); + assert_eq!( + Rewards::::get(BOB) + .unwrap() + .get(&DOT) + .copied() + .unwrap_or_default(), + bob_expected_reward + ); + assert_eq!( + Rewards::::get(CHARLIE) + .unwrap() + .get(&DOT) + .copied() + .unwrap_or_default(), + charlie_expected_reward + ); + }); +} + +#[test] +fn auto_withdraw_uses_expiry_minus_one_when_reward_period_finishes_at_expiry() { + ExtBuilder::default() + .one_hundred_for_alice_n_bob() + .build() + .execute_with(|| { + asset_registry(); + System::set_block_number(1); + + assert_ok!(BbBNC::set_config( + RuntimeOrigin::root(), + Some(0), + Some(7 * DAYS), + Some(10) + )); + assert_ok!(BbBNC::create_lock( + RuntimeOrigin::signed(BOB), + 10_000_000_000_000, + 7 * DAYS + )); + let position = Position::::get() - 1; + let real_unlock_time = ((1 + 7 * DAYS) / Week::get() + 1) * Week::get(); + assert_eq!(Locked::::get(position).end, real_unlock_time); + + assert_ok!(Tokens::deposit(DOT, &ALICE, 10_000_000_000)); + assert_ok!(BbBNC::notify_rewards( + RuntimeOrigin::root(), + ALICE, + Some(real_unlock_time - 1), + vec![DOT] + )); + assert_eq!( + IncentiveConfigs::::get(BB_BNC_SYSTEM_POOL_ID).period_finish, + real_unlock_time + ); + + System::set_block_number(real_unlock_time - 1); + let expected_reward = BbBNC::query_pending_rewards(&BOB) + .unwrap() + .into_iter() + .find(|(currency_id, _)| *currency_id == DOT) + .map(|(_, amount)| amount) + .unwrap_or_default(); + assert!(expected_reward > 0); + + NextExpiringBlock::::set(real_unlock_time); + System::set_block_number(real_unlock_time); + BbBNC::on_initialize(real_unlock_time); + + assert_eq!(Locked::::get(position).amount, 0); + assert_eq!( + Rewards::::get(BOB) + .unwrap() + .get(&DOT) + .copied() + .unwrap_or_default(), + expected_reward + ); + }); +} + +#[test] +fn throttled_auto_withdraw_after_period_rollover_uses_expiry_minus_one() { + ExtBuilder::default() + .one_hundred_for_alice_n_bob() + .build() + .execute_with(|| { + asset_registry(); + System::set_block_number(1); + + assert_ok!(BbBNC::set_config( + RuntimeOrigin::root(), + Some(0), + Some(7 * DAYS), + Some(1) + )); + assert_ok!(BbBNC::create_lock( + RuntimeOrigin::signed(BOB), + 10_000_000_000_000, + 7 * DAYS + )); + assert_ok!(BbBNC::create_lock( + RuntimeOrigin::signed(CHARLIE), + 10_000_000_000_000, + 7 * DAYS + )); + let real_unlock_time = ((1 + 7 * DAYS) / Week::get() + 1) * Week::get(); + let ordered_positions = expiring_positions(real_unlock_time); + assert_eq!(ordered_positions.len(), 2); + let orphaned_position = ordered_positions[0]; + let delayed_position = ordered_positions[1]; + let delayed_owner = + PositionOwner::::get(delayed_position).expect("owner should exist"); + assert_eq!( + Locked::::get(delayed_position).end, + real_unlock_time + ); + + assert_ok!(Tokens::deposit(DOT, &ALICE, 10_000_000_000)); + assert_ok!(BbBNC::notify_rewards( + RuntimeOrigin::root(), + ALICE, + Some(real_unlock_time - 1), + vec![DOT] + )); + assert_eq!( + IncentiveConfigs::::get(BB_BNC_SYSTEM_POOL_ID).period_finish, + real_unlock_time + ); + + System::set_block_number(real_unlock_time - 1); + let expected_reward = BbBNC::query_pending_rewards(&delayed_owner) + .unwrap() + .into_iter() + .find(|(currency_id, _)| *currency_id == DOT) + .map(|(_, amount)| amount) + .unwrap_or_default(); + assert!(expected_reward > 0); + + PositionOwner::::remove(orphaned_position); + NextExpiringBlock::::set(real_unlock_time); + System::set_block_number(real_unlock_time); + BbBNC::on_initialize(real_unlock_time); + + assert!(expiring_contains(real_unlock_time, delayed_position)); + assert!(ExpiryRewardPerToken::::contains_key( + real_unlock_time + )); + assert_eq!(NextExpiringBlock::::get(), real_unlock_time); + + System::set_block_number(real_unlock_time + 1); + BbBNC::on_initialize(real_unlock_time + 1); + + assert_eq!(Locked::::get(delayed_position).amount, 0); + assert_eq!( + Rewards::::get(delayed_owner) + .unwrap() + .get(&DOT) + .copied() + .unwrap_or_default(), + expected_reward + ); + }); +} + +#[test] +fn throttled_auto_withdraw_claims_do_not_exceed_funded_rewards() { + ExtBuilder::default() + .one_hundred_for_alice_n_bob() + .build() + .execute_with(|| { + asset_registry(); + System::set_block_number(1); + + assert_ok!(BbBNC::set_config( + RuntimeOrigin::root(), + Some(0), + Some(7 * DAYS), + Some(1) + )); + assert_ok!(BbBNC::create_lock( + RuntimeOrigin::signed(BOB), + 10_000_000_000_000, + 7 * DAYS + )); + assert_ok!(BbBNC::create_lock( + RuntimeOrigin::signed(CHARLIE), + 10_000_000_000_000, + 7 * DAYS + )); + let real_unlock_time = ((1 + 7 * DAYS) / Week::get() + 1) * Week::get(); + + let reward_budget = 10_000_000_000; + assert_ok!(Tokens::deposit(DOT, &ALICE, reward_budget)); + assert_ok!(BbBNC::notify_rewards( + RuntimeOrigin::root(), + ALICE, + Some(real_unlock_time - 1), + vec![DOT] + )); + let funded_reward = + Tokens::free_balance(DOT, &IncentivePalletId::get().into_account_truncating()); + + NextExpiringBlock::::set(real_unlock_time); + System::set_block_number(real_unlock_time); + BbBNC::on_initialize(real_unlock_time); + + System::set_block_number(real_unlock_time + 1); + BbBNC::on_initialize(real_unlock_time + 1); + + assert_eq!(BbBNC::balance_of(&BOB, None).unwrap(), 0); + assert_eq!(BbBNC::balance_of(&CHARLIE, None).unwrap(), 0); + + let bob_balance_before = Tokens::free_balance(DOT, &BOB); + assert_ok!(BbBNC::get_rewards( + RuntimeOrigin::signed(BOB), + direct_claim() + )); + let bob_claimed = Tokens::free_balance(DOT, &BOB) - bob_balance_before; + + let charlie_balance_before = Tokens::free_balance(DOT, &CHARLIE); + assert_ok!(BbBNC::get_rewards( + RuntimeOrigin::signed(CHARLIE), + direct_claim() + )); + let charlie_claimed = Tokens::free_balance(DOT, &CHARLIE) - charlie_balance_before; + + let total_claimed = bob_claimed.saturating_add(charlie_claimed); + assert!(total_claimed > 0); + assert!( + total_claimed <= funded_reward, + "claimed {} should not exceed funded reward {}", + total_claimed, + funded_reward + ); + }); +} + +#[test] +fn get_rewards_during_throttled_expiry_settles_expiry_reward_without_zero_residue() { + ExtBuilder::default() + .one_hundred_for_alice_n_bob() + .build() + .execute_with(|| { + asset_registry(); + System::set_block_number(1); + + assert_ok!(BbBNC::set_config( + RuntimeOrigin::root(), + Some(0), + Some(7 * DAYS), + Some(1) + )); + assert_ok!(BbBNC::create_lock( + RuntimeOrigin::signed(BOB), + 10_000_000_000_000, + 7 * DAYS + )); + assert_ok!(BbBNC::create_lock( + RuntimeOrigin::signed(CHARLIE), + 10_000_000_000_000, + 7 * DAYS + )); + let real_unlock_time = ((1 + 7 * DAYS) / Week::get() + 1) * Week::get(); + let ordered_positions = expiring_positions(real_unlock_time); + let delayed_position = ordered_positions[1]; + let delayed_owner = + PositionOwner::::get(delayed_position).expect("owner should exist"); + + assert_ok!(Tokens::deposit(DOT, &ALICE, 10_000_000_000)); + assert_ok!(BbBNC::notify_rewards( + RuntimeOrigin::root(), + ALICE, + Some(real_unlock_time - 1), + vec![DOT] + )); + + System::set_block_number(real_unlock_time - 1); + let expected_reward = BbBNC::query_pending_rewards(&delayed_owner) + .unwrap() + .into_iter() + .find(|(currency_id, _)| *currency_id == DOT) + .map(|(_, amount)| amount) + .unwrap_or_default(); + assert!(expected_reward > 0); + + NextExpiringBlock::::set(real_unlock_time); + System::set_block_number(real_unlock_time); + BbBNC::on_initialize(real_unlock_time); + assert!(expiring_contains(real_unlock_time, delayed_position)); + + let pending_at_expiry = BbBNC::query_pending_rewards(&delayed_owner) + .unwrap() + .into_iter() + .find(|(currency_id, _)| *currency_id == DOT) + .map(|(_, amount)| amount) + .unwrap_or_default(); + assert_eq!(pending_at_expiry, expected_reward); + + let balance_before = Tokens::free_balance(DOT, &delayed_owner); + assert_ok!(BbBNC::get_rewards( + RuntimeOrigin::signed(delayed_owner.clone()), + direct_claim() + )); + assert_eq!( + Tokens::free_balance(DOT, &delayed_owner) - balance_before, + expected_reward + ); + assert!(Rewards::::get(&delayed_owner).is_none()); + + System::set_block_number(real_unlock_time + 1); + BbBNC::on_initialize(real_unlock_time + 1); + assert_eq!(Locked::::get(delayed_position).amount, 0); + assert!(Rewards::::get(&delayed_owner).is_none()); + }); +} + +#[test] +fn checkpoint_during_throttled_expiry_settles_expiry_reward_first() { + ExtBuilder::default() + .one_hundred_for_alice_n_bob() + .build() + .execute_with(|| { + asset_registry(); + System::set_block_number(1); + + assert_ok!(BbBNC::set_config( + RuntimeOrigin::root(), + Some(0), + Some(7 * DAYS), + Some(0) + )); + assert_ok!(BbBNC::create_lock( + RuntimeOrigin::signed(BOB), + 10_000_000_000_000, + 7 * DAYS + )); + let short_position = Position::::get() - 1; + assert_ok!(BbBNC::create_lock( + RuntimeOrigin::signed(BOB), + 10_000_000_000_000, + 365 * DAYS + )); + let long_position = Position::::get() - 1; + let real_unlock_time = ((1 + 7 * DAYS) / Week::get() + 1) * Week::get(); + assert!(expiring_contains(real_unlock_time, short_position)); + + assert_ok!(Tokens::deposit(DOT, &ALICE, 100_000_000_000)); + assert_ok!(BbBNC::notify_rewards( + RuntimeOrigin::root(), + ALICE, + Some(real_unlock_time - 1), + vec![DOT] + )); + + System::set_block_number(real_unlock_time - 1); + let expected_reward = BbBNC::query_pending_rewards(&BOB) + .unwrap() + .into_iter() + .find(|(currency_id, _)| *currency_id == DOT) + .map(|(_, amount)| amount) + .unwrap_or_default(); + assert!(expected_reward > 0); + + NextExpiringBlock::::set(real_unlock_time); + System::set_block_number(real_unlock_time); + BbBNC::on_initialize(real_unlock_time); + assert!(expiring_contains(real_unlock_time, short_position)); + assert!(Locked::::get(long_position).end > real_unlock_time); + + let long_locked = Locked::::get(long_position); + assert_ok!(BbBNC::checkpoint( + &BOB, + long_position, + long_locked.clone(), + long_locked + )); + + let balance_before = Tokens::free_balance(DOT, &BOB); + assert_ok!(BbBNC::get_rewards( + RuntimeOrigin::signed(BOB), + direct_claim() + )); + assert!(Tokens::free_balance(DOT, &BOB) - balance_before >= expected_reward); + }); +} + +#[test] +fn manual_withdraw_last_unprocessed_expiry_position_keeps_expiry_snapshot() { + ExtBuilder::default() + .one_hundred_for_alice_n_bob() + .build() + .execute_with(|| { + asset_registry(); + System::set_block_number(1); assert_ok!(BbBNC::set_config( RuntimeOrigin::root(), @@ -2224,163 +3004,146 @@ fn test_balance_after_lock_expires() { Some(7 * DAYS), Some(10) )); - - // Create a lock - assert_ok!(BbBNC::create_lock_inner( - &BOB, + assert_ok!(BbBNC::create_lock( + RuntimeOrigin::signed(BOB), 10_000_000_000_000, - 7 * DAYS, // Lock for 7 days (minimum time) + 7 * DAYS )); + let bob_position = Position::::get() - 1; + assert_ok!(BbBNC::create_lock( + RuntimeOrigin::signed(CHARLIE), + 10_000_000_000_000, + 7 * DAYS + )); + let charlie_position = Position::::get() - 1; + let real_unlock_time = ((1 + 7 * DAYS) / Week::get() + 1) * Week::get(); - // Check initial balance - let initial_balance = BbBNC::balance_of(&BOB, Some(System::block_number())).unwrap(); - assert!( - initial_balance > 0, - "Initial balance should be greater than 0" - ); - - // Advance blocks to just before lock expiration - let current_block = System::block_number(); - let blocks_to_advance = 7 * DAYS; // Advance to just before expiration - System::set_block_number(current_block + blocks_to_advance * 2 - 1); + assert_ok!(Tokens::deposit(DOT, &ALICE, 10_000_000_000)); + assert_ok!(BbBNC::notify_rewards( + RuntimeOrigin::root(), + ALICE, + Some(real_unlock_time - 1), + vec![DOT] + )); - // Check balance before expiration - let balance_before_expiration = - BbBNC::balance_of(&BOB, Some(System::block_number())).unwrap(); - assert!( - balance_before_expiration > 0, - "Balance should still be greater than 0 before expiration" - ); + System::set_block_number(real_unlock_time - 1); + let expected_reward = BbBNC::query_pending_rewards(&CHARLIE) + .unwrap() + .into_iter() + .find(|(currency_id, _)| *currency_id == DOT) + .map(|(_, amount)| amount) + .unwrap_or_default(); + assert!(expected_reward > 0); - // Advance one more block to reach expiration - System::set_block_number(System::block_number() + 1); + assert_ok!(BbBNC::update_reward_before_expiry(&BOB, real_unlock_time)); + BbBNC::remove_expiring_position(bob_position, real_unlock_time); + assert!(ExpiryRewardPerToken::::contains_key( + real_unlock_time + )); + IncentiveConfigs::::mutate(BB_BNC_SYSTEM_POOL_ID, |conf| { + conf.last_update_time = real_unlock_time + DAYS; + }); - // Check balance after expiration - let balance_after_expiration = - BbBNC::balance_of(&BOB, Some(System::block_number())).unwrap(); + System::set_block_number(real_unlock_time); + assert_ok!(BbBNC::withdraw( + RuntimeOrigin::signed(CHARLIE), + charlie_position + )); assert_eq!( - balance_after_expiration, 0, - "Balance should be 0 after lock expires" + Rewards::::get(CHARLIE) + .unwrap() + .get(&DOT) + .copied() + .unwrap_or_default(), + expected_reward ); }); } #[test] -fn balance_changes_over_time_and_redeem() { +fn query_pending_rewards_includes_auto_withdrawn_rewards() { ExtBuilder::default() .one_hundred_for_alice_n_bob() .build() .execute_with(|| { asset_registry(); - System::set_block_number(System::block_number() + 20); + System::set_block_number(1); assert_ok!(BbBNC::set_config( RuntimeOrigin::root(), Some(0), - Some(1), + Some(7 * DAYS), Some(10) )); - - // Get initial position counter - let _position = Position::::get(); - - // Create a lock with 1000e12 tokens for 100000 blocks - assert_ok!(BbBNC::create_lock_inner( - &ALICE, - 1_000_000_000_000_000, - System::block_number() + 100_000, + assert_ok!(BbBNC::create_lock( + RuntimeOrigin::signed(BOB), + 10_000_000_000_000, + 7 * DAYS )); + let real_unlock_time = ((1 + 7 * DAYS) / Week::get() + 1) * Week::get(); - // Advance 1 block (simulating newBlock) - System::set_block_number(System::block_number() + 1); - - // Advance to block number + 110000 (lock expiry + 10000) - let current_block = System::block_number(); - System::set_block_number(current_block + 18 * DAYS); - assert_ok!(BbBNC::withdraw(RuntimeOrigin::signed(ALICE), POSITIONID0)); - - // Check balance and total supply after lock expiry - let balance = BbBNC::balance_of(&ALICE, None).unwrap(); - let total_supply = BbBNC::total_supply(Some(System::block_number())).unwrap(); - - // Advance 10000 more blocks - System::set_block_number(System::block_number() + 10_000); - - // Check balance and total supply after more time - let balance2 = BbBNC::balance_of(&ALICE, None).unwrap(); - let total_supply2 = BbBNC::total_supply(Some(System::block_number())).unwrap(); - - // Advance a very large number of blocks (10,000,000) - System::set_block_number(System::block_number() + 10_000_000); + assert_ok!(Tokens::deposit(DOT, &ALICE, 10_000_000_000)); + assert_ok!(BbBNC::notify_rewards( + RuntimeOrigin::root(), + ALICE, + Some(7 * DAYS), + vec![DOT] + )); - // Check balance and total supply after a very long time - let balance3 = BbBNC::balance_of(&ALICE, None).unwrap(); - let total_supply3 = BbBNC::total_supply(Some(System::block_number())).unwrap(); + System::set_block_number(real_unlock_time - 1); + let expected_reward = BbBNC::query_pending_rewards(&BOB) + .unwrap() + .into_iter() + .find(|(currency_id, _)| *currency_id == DOT) + .map(|(_, amount)| amount) + .unwrap_or_default(); + assert!(expected_reward > 0); - // Verify balances are as expected (should be 0 after lock expiry) - assert_eq!(balance, 0); - assert_eq!(balance2, 0); - assert_eq!(balance3, 0); + NextExpiringBlock::::set(real_unlock_time); + System::set_block_number(real_unlock_time); + BbBNC::on_initialize(real_unlock_time); - // Verify total supply matches user balance - assert_eq!(total_supply, balance); - assert_eq!(total_supply2, balance2); - assert_eq!(total_supply3, balance3); + let pending_after_auto_withdraw = BbBNC::query_pending_rewards(&BOB) + .unwrap() + .into_iter() + .find(|(currency_id, _)| *currency_id == DOT) + .map(|(_, amount)| amount) + .unwrap_or_default(); + assert_eq!(pending_after_auto_withdraw, expected_reward); }); } #[test] -fn test_expired_positions_auto_withdrawal() { +fn on_initialize_exact_limit_without_remaining_positions_advances_next_expiring_block() { ExtBuilder::default() .one_hundred_for_alice_n_bob() .build() .execute_with(|| { - let unlock_time = 100; - let lock_value = 1000; - - // Set current block to 1 + asset_registry(); System::set_block_number(1); - // Create a lock + assert_ok!(BbBNC::set_config( + RuntimeOrigin::root(), + Some(0), + Some(7 * DAYS), + Some(1) + )); assert_ok!(BbBNC::create_lock( - RuntimeOrigin::signed(ALICE), - lock_value, - unlock_time + RuntimeOrigin::signed(BOB), + 10_000_000_000_000, + 7 * DAYS )); + let real_unlock_time = ((1 + 7 * DAYS) / Week::get() + 1) * Week::get(); - let position = Position::::get() - 1; - - // Get the real unlock time (calculated same way as in the pallet) - let real_unlock_time = ((1 + unlock_time) / Week::get() + 1) * Week::get(); - - // Ensure the position is correctly recorded in ExpiringPositions - assert!(expiring_contains(real_unlock_time, position)); - - // Manually set NextExpiringBlock to real_unlock_time for the test NextExpiringBlock::::set(real_unlock_time); - - // Jump directly to the expiry block System::set_block_number(real_unlock_time); - - // Run on_initialize for the expiry block BbBNC::on_initialize(real_unlock_time); - // Check that position has been auto-withdrawn - let locked = Locked::::get(position); - assert_eq!(locked.amount, 0, "Position should be auto-withdrawn"); - - // Check the position was removed from ExpiringPositions - assert!( - expiring_is_empty(real_unlock_time), - "Position should be removed from ExpiringPositions" - ); - - // Check that NextExpiringBlock was updated to the expected value - assert_eq!( - NextExpiringBlock::::get(), - 100801, - "NextExpiringBlock should be updated to the expected value" - ); + assert!(expiring_is_empty(real_unlock_time)); + assert_eq!(NextExpiringBlock::::get(), real_unlock_time + 1); + assert!(!ExpiryRewardPerToken::::contains_key( + real_unlock_time + )); }); } @@ -2774,79 +3537,6 @@ fn on_initialize_processes_expiring_positions_across_blocks() { }); } -#[test] -fn migrate_expiring_positions_v0_to_v1_preserves_pairs_and_is_idempotent() { - ExtBuilder::default().build().execute_with(|| { - use crate::migrations::v1::{v0::ExpiringPositions as ExpiringPositionsV0, MigrateToV1}; - - StorageVersion::new(0).put::>(); - ExpiringPositionsV0::::insert( - 10, - BoundedVec::>::try_from(vec![1, 2, 3]).unwrap(), - ); - ExpiringPositionsV0::::insert( - 20, - BoundedVec::>::try_from(vec![4, 5]).unwrap(), - ); - - let _ = MigrateToV1::::on_runtime_upgrade(); - - assert_eq!(Pallet::::on_chain_storage_version(), 1); - assert!(!frame_support::storage::unhashed::exists( - &ExpiringPositionsV0::::hashed_key_for(10) - )); - assert!(!frame_support::storage::unhashed::exists( - &ExpiringPositionsV0::::hashed_key_for(20) - )); - for (block, position) in [(10, 1), (10, 2), (10, 3), (20, 4), (20, 5)] { - assert!(expiring_contains(block, position)); - } - assert_eq!(ExpiringPositions::::iter().count(), 5); - - let _ = MigrateToV1::::on_runtime_upgrade(); - - assert_eq!(ExpiringPositions::::iter().count(), 5); - }); -} - -#[test] -fn migrate_expiring_positions_v0_to_v1_handles_empty_storage() { - ExtBuilder::default().build().execute_with(|| { - use crate::migrations::v1::MigrateToV1; - - StorageVersion::new(0).put::>(); - - let _ = MigrateToV1::::on_runtime_upgrade(); - - assert_eq!(Pallet::::on_chain_storage_version(), 1); - assert_eq!(ExpiringPositions::::iter().count(), 0); - }); -} - -#[cfg(feature = "try-runtime")] -#[test] -fn migrate_expiring_positions_try_runtime_is_idempotent() { - ExtBuilder::default().build().execute_with(|| { - use crate::migrations::v1::{v0::ExpiringPositions as ExpiringPositionsV0, MigrateToV1}; - - StorageVersion::new(0).put::>(); - ExpiringPositionsV0::::insert( - 10, - BoundedVec::>::try_from(vec![1, 2, 3]).unwrap(), - ); - - let state = MigrateToV1::::pre_upgrade().unwrap(); - let _ = MigrateToV1::::on_runtime_upgrade(); - MigrateToV1::::post_upgrade(state).unwrap(); - - let state = MigrateToV1::::pre_upgrade().unwrap(); - let _ = MigrateToV1::::on_runtime_upgrade(); - MigrateToV1::::post_upgrade(state).unwrap(); - - assert_eq!(ExpiringPositions::::iter().count(), 3); - }); -} - #[test] fn test_owner_search_for_expired_positions() { // Use much higher balances to avoid "less than existential deposit" error @@ -4562,6 +5252,72 @@ fn query_pending_rewards_should_match_get_rewards() { }); } +#[test] +fn redeem_unlock_preserves_accrued_unclaimed_rewards() { + ExtBuilder::default() + .one_hundred_for_alice_n_bob() + .build() + .execute_with(|| { + asset_registry(); + System::set_block_number(System::block_number() + 20); + + assert_ok!(BbBNC::set_config( + RuntimeOrigin::root(), + Some(0), + Some(7 * DAYS), + Some(10) + )); + + assert_ok!(BbBNC::create_lock_inner( + &BOB, + 10_000_000_000_000, + System::block_number() + (4 * 365 * DAYS - 7 * DAYS), + )); + + assert_ok!(Tokens::deposit(DOT, &ALICE, 10_000_000_000)); + assert_ok!(BbBNC::notify_rewards( + RuntimeOrigin::root(), + ALICE, + Some(7 * DAYS), + vec![DOT] + )); + + System::set_block_number(System::block_number() + DAYS); + + let pending_before_redeem = BbBNC::query_pending_rewards(&BOB) + .unwrap() + .into_iter() + .find(|(currency_id, _)| *currency_id == DOT) + .map(|(_, amount)| amount) + .unwrap_or_default(); + assert!(pending_before_redeem > 0); + + assert_ok!(BbBNC::redeem_unlock( + RuntimeOrigin::signed(BOB), + POSITIONID0 + )); + assert_eq!(BbBNC::balance_of(&BOB, Some(System::block_number())), Ok(0)); + + let pending_after_redeem = BbBNC::query_pending_rewards(&BOB) + .unwrap() + .into_iter() + .find(|(currency_id, _)| *currency_id == DOT) + .map(|(_, amount)| amount) + .unwrap_or_default(); + assert_eq!(pending_after_redeem, pending_before_redeem); + + let balance_before_claim = Tokens::free_balance(DOT, &BOB); + assert_ok!(BbBNC::get_rewards( + RuntimeOrigin::signed(BOB), + direct_claim() + )); + assert_eq!( + Tokens::free_balance(DOT, &BOB) - balance_before_claim, + pending_before_redeem + ); + }); +} + #[test] fn query_pending_rewards_should_match_get_rewards_bnc() { ExtBuilder::default() diff --git a/pallets/bb-bnc/src/weights.rs b/pallets/bb-bnc/src/weights.rs index 66c081268..f8fedf661 100644 --- a/pallets/bb-bnc/src/weights.rs +++ b/pallets/bb-bnc/src/weights.rs @@ -25,7 +25,7 @@ //! Autogenerated weights for bb_bnc //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 53.0.0 -//! DATE: 2026-06-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2026-07-03, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! HOSTNAME: `vps-b02dace3`, CPU: `Intel Core Processor (Haswell, no TSX)` //! WASM-EXECUTION: Compiled, CHAIN: Some("bifrost-polkadot-local"), DB CACHE: 1024 @@ -72,26 +72,26 @@ pub trait WeightInfo { // For backwards compatibility and tests impl WeightInfo for () { - /// Storage: `BbBNC::IncentiveConfigs` (r:1 w:0) - /// Proof: `BbBNC::IncentiveConfigs` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `BbBNC::NextExpiringBlock` (r:1 w:0) /// Proof: `BbBNC::NextExpiringBlock` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `BbBNC::IncentiveConfigs` (r:1 w:0) + /// Proof: `BbBNC::IncentiveConfigs` (`max_values`: None, `max_size`: None, mode: `Measured`) fn on_initialize() -> Weight { // Proof Size summary in bytes: - // Measured: `292` - // Estimated: `3757` - // Minimum execution time: 23_008_000 picoseconds. - Weight::from_parts(25_557_000, 3757) + // Measured: `259` + // Estimated: `3724` + // Minimum execution time: 23_182_000 picoseconds. + Weight::from_parts(25_344_000, 3724) .saturating_add(RocksDbWeight::get().reads(2_u64)) } /// Storage: `BbBNC::BbConfigs` (r:1 w:1) /// Proof: `BbBNC::BbConfigs` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn set_config() -> Weight { // Proof Size summary in bytes: - // Measured: `142` - // Estimated: `1627` - // Minimum execution time: 22_991_000 picoseconds. - Weight::from_parts(26_053_000, 1627) + // Measured: `109` + // Estimated: `1594` + // Minimum execution time: 23_542_000 picoseconds. + Weight::from_parts(28_276_000, 1594) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -129,14 +129,16 @@ impl WeightInfo for () { /// Proof: `BbBNC::UserPointEpoch` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `BbBNC::Rewards` (r:1 w:0) /// Proof: `BbBNC::Rewards` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `BbBNC::UserRewardPerTokenPaid` (r:1 w:1) + /// Proof: `BbBNC::UserRewardPerTokenPaid` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `BbBNC::BoostedSupply` (r:1 w:1) + /// Proof: `BbBNC::BoostedSupply` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `BbBNC::SlopeChanges` (r:2 w:1) /// Proof: `BbBNC::SlopeChanges` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `Farming::UserFarmingPool` (r:1 w:1) /// Proof: `Farming::UserFarmingPool` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `BbBNC::UserPointHistory` (r:0 w:1) /// Proof: `BbBNC::UserPointHistory` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `BbBNC::UserRewardPerTokenPaid` (r:0 w:1) - /// Proof: `BbBNC::UserRewardPerTokenPaid` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `BbBNC::Locked` (r:0 w:1) /// Proof: `BbBNC::Locked` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `BbBNC::PositionOwner` (r:0 w:1) @@ -145,10 +147,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1389` // Estimated: `7329` - // Minimum execution time: 278_407_000 picoseconds. - Weight::from_parts(296_786_000, 7329) - .saturating_add(RocksDbWeight::get().reads(20_u64)) - .saturating_add(RocksDbWeight::get().writes(19_u64)) + // Minimum execution time: 265_573_000 picoseconds. + Weight::from_parts(281_688_000, 7329) + .saturating_add(RocksDbWeight::get().reads(22_u64)) + .saturating_add(RocksDbWeight::get().writes(20_u64)) } /// Storage: `BbBNC::UserPositions` (r:1 w:0) /// Proof: `BbBNC::UserPositions` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -166,6 +168,8 @@ impl WeightInfo for () { /// Proof: `AssetRegistry::CurrencyMetadatas` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `BbBNC::UserMarkupInfos` (r:1 w:0) /// Proof: `BbBNC::UserMarkupInfos` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `BbBNC::NextExpiringBlock` (r:1 w:0) + /// Proof: `BbBNC::NextExpiringBlock` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `BbBNC::IncentiveConfigs` (r:1 w:1) /// Proof: `BbBNC::IncentiveConfigs` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `BbBNC::Epoch` (r:1 w:1) @@ -180,18 +184,20 @@ impl WeightInfo for () { /// Proof: `BbBNC::Rewards` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `BbBNC::UserRewardPerTokenPaid` (r:1 w:1) /// Proof: `BbBNC::UserRewardPerTokenPaid` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `BbBNC::BoostedSupply` (r:1 w:1) + /// Proof: `BbBNC::BoostedSupply` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `BbBNC::SlopeChanges` (r:1 w:1) /// Proof: `BbBNC::SlopeChanges` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `Farming::UserFarmingPool` (r:1 w:1) /// Proof: `Farming::UserFarmingPool` (`max_values`: None, `max_size`: None, mode: `Measured`) fn increase_amount() -> Weight { // Proof Size summary in bytes: - // Measured: `2368` - // Estimated: `5833` - // Minimum execution time: 312_344_000 picoseconds. - Weight::from_parts(349_810_000, 5833) - .saturating_add(RocksDbWeight::get().reads(17_u64)) - .saturating_add(RocksDbWeight::get().writes(14_u64)) + // Measured: `2408` + // Estimated: `5873` + // Minimum execution time: 302_340_000 picoseconds. + Weight::from_parts(319_463_000, 5873) + .saturating_add(RocksDbWeight::get().reads(19_u64)) + .saturating_add(RocksDbWeight::get().writes(15_u64)) } /// Storage: `BbBNC::UserPositions` (r:1 w:0) /// Proof: `BbBNC::UserPositions` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -199,7 +205,7 @@ impl WeightInfo for () { /// Proof: `BbBNC::BbConfigs` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `BbBNC::Locked` (r:1 w:1) /// Proof: `BbBNC::Locked` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `BbBNC::ExpiringPositions` (r:1 w:2) + /// Storage: `BbBNC::ExpiringPositions` (r:3 w:2) /// Proof: `BbBNC::ExpiringPositions` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `BbBNC::NextExpiringBlock` (r:1 w:1) /// Proof: `BbBNC::NextExpiringBlock` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) @@ -223,35 +229,29 @@ impl WeightInfo for () { /// Proof: `BbBNC::Rewards` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `BbBNC::UserRewardPerTokenPaid` (r:1 w:1) /// Proof: `BbBNC::UserRewardPerTokenPaid` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `BbBNC::BoostedSupply` (r:1 w:1) + /// Proof: `BbBNC::BoostedSupply` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `BbBNC::SlopeChanges` (r:2 w:2) /// Proof: `BbBNC::SlopeChanges` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `Farming::UserFarmingPool` (r:1 w:1) /// Proof: `Farming::UserFarmingPool` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `BbBNC::ExpiryRewardPerToken` (r:0 w:1) + /// Proof: `BbBNC::ExpiryRewardPerToken` (`max_values`: None, `max_size`: None, mode: `Measured`) fn increase_unlock_time() -> Weight { // Proof Size summary in bytes: - // Measured: `1718` - // Estimated: `7658` - // Minimum execution time: 257_412_000 picoseconds. - Weight::from_parts(309_256_000, 7658) - .saturating_add(RocksDbWeight::get().reads(18_u64)) - .saturating_add(RocksDbWeight::get().writes(15_u64)) + // Measured: `1800` + // Estimated: `10215` + // Minimum execution time: 287_113_000 picoseconds. + Weight::from_parts(317_351_000, 10215) + .saturating_add(RocksDbWeight::get().reads(21_u64)) + .saturating_add(RocksDbWeight::get().writes(17_u64)) } /// Storage: `BbBNC::UserPositions` (r:1 w:1) /// Proof: `BbBNC::UserPositions` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `BbBNC::Locked` (r:1 w:1) /// Proof: `BbBNC::Locked` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `BbBNC::Supply` (r:1 w:1) - /// Proof: `BbBNC::Supply` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `BbBNC::UserLocked` (r:1 w:1) - /// Proof: `BbBNC::UserLocked` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `Tokens::Locks` (r:1 w:1) - /// Proof: `Tokens::Locks` (`max_values`: None, `max_size`: Some(1271), added: 3746, mode: `MaxEncodedLen`) - /// Storage: `Tokens::Accounts` (r:1 w:1) - /// Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(118), added: 2593, mode: `MaxEncodedLen`) - /// Storage: `AssetRegistry::CurrencyMetadatas` (r:1 w:0) - /// Proof: `AssetRegistry::CurrencyMetadatas` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `System::Account` (r:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `BbBNC::ExpiryRewardPerToken` (r:1 w:1) + /// Proof: `BbBNC::ExpiryRewardPerToken` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `BbBNC::IncentiveConfigs` (r:1 w:1) /// Proof: `BbBNC::IncentiveConfigs` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `BbBNC::Epoch` (r:1 w:1) @@ -260,55 +260,85 @@ impl WeightInfo for () { /// Proof: `BbBNC::PointHistory` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `BbBNC::SlopeChanges` (r:52 w:0) /// Proof: `BbBNC::SlopeChanges` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `BbBNC::UserPointEpoch` (r:1 w:1) + /// Proof: `BbBNC::UserPointEpoch` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `BbBNC::UserPointHistory` (r:1 w:1) + /// Proof: `BbBNC::UserPointHistory` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `BbBNC::Rewards` (r:1 w:1) /// Proof: `BbBNC::Rewards` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `BbBNC::UserRewardPerTokenPaid` (r:1 w:1) /// Proof: `BbBNC::UserRewardPerTokenPaid` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `BbBNC::UserPointEpoch` (r:1 w:1) - /// Proof: `BbBNC::UserPointEpoch` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `BbBNC::Supply` (r:1 w:1) + /// Proof: `BbBNC::Supply` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `BbBNC::UserLocked` (r:1 w:1) + /// Proof: `BbBNC::UserLocked` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Tokens::Locks` (r:1 w:1) + /// Proof: `Tokens::Locks` (`max_values`: None, `max_size`: Some(1271), added: 3746, mode: `MaxEncodedLen`) + /// Storage: `Tokens::Accounts` (r:1 w:1) + /// Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(118), added: 2593, mode: `MaxEncodedLen`) + /// Storage: `AssetRegistry::CurrencyMetadatas` (r:1 w:0) + /// Proof: `AssetRegistry::CurrencyMetadatas` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `BbBNC::UserMarkupInfos` (r:1 w:0) + /// Proof: `BbBNC::UserMarkupInfos` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `BbBNC::NextExpiringBlock` (r:1 w:0) + /// Proof: `BbBNC::NextExpiringBlock` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `BbBNC::BoostedSupply` (r:1 w:1) + /// Proof: `BbBNC::BoostedSupply` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `Farming::UserFarmingPool` (r:1 w:1) /// Proof: `Farming::UserFarmingPool` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `BbBNC::UserPointHistory` (r:0 w:1) - /// Proof: `BbBNC::UserPointHistory` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `BbBNC::ExpiringPositions` (r:2 w:1) + /// Proof: `BbBNC::ExpiringPositions` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `BbBNC::PermanentLock` (r:0 w:1) /// Proof: `BbBNC::PermanentLock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `BbBNC::PositionOwner` (r:0 w:1) /// Proof: `BbBNC::PositionOwner` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `BbBNC::ExpiringPositions` (r:0 w:1) - /// Proof: `BbBNC::ExpiringPositions` (`max_values`: None, `max_size`: None, mode: `Measured`) fn withdraw() -> Weight { // Proof Size summary in bytes: - // Measured: `2348` - // Estimated: `132038` - // Minimum execution time: 920_574_000 picoseconds. - Weight::from_parts(942_917_000, 132038) - .saturating_add(RocksDbWeight::get().reads(67_u64)) - .saturating_add(RocksDbWeight::get().writes(70_u64)) + // Measured: `2619` + // Estimated: `132309` + // Minimum execution time: 956_055_000 picoseconds. + Weight::from_parts(982_434_000, 132309) + .saturating_add(RocksDbWeight::get().reads(74_u64)) + .saturating_add(RocksDbWeight::get().writes(72_u64)) } + /// Storage: `BbBNC::NextExpiringBlock` (r:1 w:0) + /// Proof: `BbBNC::NextExpiringBlock` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `BbBNC::UserPositions` (r:1 w:0) + /// Proof: `BbBNC::UserPositions` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `BbBNC::Locked` (r:20 w:0) + /// Proof: `BbBNC::Locked` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `BbBNC::ExpiringPositions` (r:20 w:0) + /// Proof: `BbBNC::ExpiringPositions` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `BbBNC::ExpiryRewardPerToken` (r:1 w:1) + /// Proof: `BbBNC::ExpiryRewardPerToken` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `BbBNC::IncentiveConfigs` (r:1 w:1) /// Proof: `BbBNC::IncentiveConfigs` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `BbBNC::Epoch` (r:1 w:0) /// Proof: `BbBNC::Epoch` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `BbBNC::PointHistory` (r:1 w:0) /// Proof: `BbBNC::PointHistory` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `BbBNC::SlopeChanges` (r:52 w:0) - /// Proof: `BbBNC::SlopeChanges` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `BbBNC::UserPositions` (r:1 w:0) - /// Proof: `BbBNC::UserPositions` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `BbBNC::Locked` (r:1 w:0) - /// Proof: `BbBNC::Locked` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `BbBNC::UserPointEpoch` (r:20 w:0) + /// Proof: `BbBNC::UserPointEpoch` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `BbBNC::UserPointHistory` (r:20 w:0) + /// Proof: `BbBNC::UserPointHistory` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `BbBNC::Rewards` (r:1 w:1) /// Proof: `BbBNC::Rewards` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `BbBNC::UserRewardPerTokenPaid` (r:1 w:1) /// Proof: `BbBNC::UserRewardPerTokenPaid` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `BbBNC::SlopeChanges` (r:1 w:0) + /// Proof: `BbBNC::SlopeChanges` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `System::Account` (r:4 w:4) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn get_rewards() -> Weight { // Proof Size summary in bytes: - // Measured: `974` - // Estimated: `130664` - // Minimum execution time: 424_008_000 picoseconds. - Weight::from_parts(435_537_000, 130664) - .saturating_add(RocksDbWeight::get().reads(59_u64)) - .saturating_add(RocksDbWeight::get().writes(3_u64)) + // Measured: `8240` + // Estimated: `58730` + // Minimum execution time: 1_168_999_000 picoseconds. + Weight::from_parts(1_211_772_000, 58730) + .saturating_add(RocksDbWeight::get().reads(93_u64)) + .saturating_add(RocksDbWeight::get().writes(8_u64)) } /// Storage: `BbBNC::IncentiveConfigs` (r:1 w:1) /// Proof: `BbBNC::IncentiveConfigs` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -320,10 +350,10 @@ impl WeightInfo for () { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn notify_rewards() -> Weight { // Proof Size summary in bytes: - // Measured: `423` + // Measured: `390` // Estimated: `6196` - // Minimum execution time: 176_043_000 picoseconds. - Weight::from_parts(178_955_000, 6196) + // Minimum execution time: 174_282_000 picoseconds. + Weight::from_parts(183_526_000, 6196) .saturating_add(RocksDbWeight::get().reads(5_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -333,8 +363,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 13_906_000 picoseconds. - Weight::from_parts(15_129_000, 0) + // Minimum execution time: 14_983_000 picoseconds. + Weight::from_parts(15_723_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `BbBNC::MarkupCoefficient` (r:1 w:1) @@ -359,6 +389,12 @@ impl WeightInfo for () { /// Proof: `BbBNC::UserPositions` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `BbBNC::Locked` (r:1 w:0) /// Proof: `BbBNC::Locked` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `BbBNC::NextExpiringBlock` (r:1 w:0) + /// Proof: `BbBNC::NextExpiringBlock` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `BbBNC::ExpiringPositions` (r:1 w:0) + /// Proof: `BbBNC::ExpiringPositions` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `BbBNC::ExpiryRewardPerToken` (r:1 w:1) + /// Proof: `BbBNC::ExpiryRewardPerToken` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `BbBNC::IncentiveConfigs` (r:1 w:1) /// Proof: `BbBNC::IncentiveConfigs` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `BbBNC::Epoch` (r:1 w:1) @@ -367,24 +403,24 @@ impl WeightInfo for () { /// Proof: `BbBNC::PointHistory` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `BbBNC::SlopeChanges` (r:52 w:0) /// Proof: `BbBNC::SlopeChanges` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `BbBNC::UserPointEpoch` (r:1 w:1) + /// Proof: `BbBNC::UserPointEpoch` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `BbBNC::UserPointHistory` (r:1 w:1) + /// Proof: `BbBNC::UserPointHistory` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `BbBNC::Rewards` (r:1 w:1) /// Proof: `BbBNC::Rewards` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `BbBNC::UserRewardPerTokenPaid` (r:1 w:1) /// Proof: `BbBNC::UserRewardPerTokenPaid` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `BbBNC::Supply` (r:1 w:0) - /// Proof: `BbBNC::Supply` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `BbBNC::UserPointEpoch` (r:1 w:1) - /// Proof: `BbBNC::UserPointEpoch` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `BbBNC::UserPointHistory` (r:0 w:1) - /// Proof: `BbBNC::UserPointHistory` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `BbBNC::BoostedSupply` (r:1 w:1) + /// Proof: `BbBNC::BoostedSupply` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn deposit_markup() -> Weight { // Proof Size summary in bytes: - // Measured: `2327` - // Estimated: `132017` - // Minimum execution time: 815_263_000 picoseconds. - Weight::from_parts(920_903_000, 132017) - .saturating_add(RocksDbWeight::get().reads(70_u64)) - .saturating_add(RocksDbWeight::get().writes(65_u64)) + // Measured: `2520` + // Estimated: `132210` + // Minimum execution time: 870_227_000 picoseconds. + Weight::from_parts(909_613_000, 132210) + .saturating_add(RocksDbWeight::get().reads(74_u64)) + .saturating_add(RocksDbWeight::get().writes(67_u64)) } /// Storage: `BbBNC::MarkupCoefficient` (r:1 w:1) /// Proof: `BbBNC::MarkupCoefficient` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -404,6 +440,12 @@ impl WeightInfo for () { /// Proof: `BbBNC::UserPositions` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `BbBNC::Locked` (r:1 w:0) /// Proof: `BbBNC::Locked` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `BbBNC::NextExpiringBlock` (r:1 w:0) + /// Proof: `BbBNC::NextExpiringBlock` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `BbBNC::ExpiringPositions` (r:1 w:0) + /// Proof: `BbBNC::ExpiringPositions` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `BbBNC::ExpiryRewardPerToken` (r:1 w:1) + /// Proof: `BbBNC::ExpiryRewardPerToken` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `BbBNC::IncentiveConfigs` (r:1 w:1) /// Proof: `BbBNC::IncentiveConfigs` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `BbBNC::Epoch` (r:1 w:1) @@ -412,29 +454,47 @@ impl WeightInfo for () { /// Proof: `BbBNC::PointHistory` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `BbBNC::SlopeChanges` (r:52 w:0) /// Proof: `BbBNC::SlopeChanges` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `BbBNC::UserPointEpoch` (r:1 w:1) + /// Proof: `BbBNC::UserPointEpoch` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `BbBNC::UserPointHistory` (r:2 w:1) + /// Proof: `BbBNC::UserPointHistory` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `BbBNC::Rewards` (r:1 w:1) /// Proof: `BbBNC::Rewards` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `BbBNC::UserRewardPerTokenPaid` (r:1 w:1) /// Proof: `BbBNC::UserRewardPerTokenPaid` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `BbBNC::Supply` (r:1 w:0) - /// Proof: `BbBNC::Supply` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `BbBNC::UserPointEpoch` (r:1 w:1) - /// Proof: `BbBNC::UserPointEpoch` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `BbBNC::UserPointHistory` (r:0 w:1) - /// Proof: `BbBNC::UserPointHistory` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `BbBNC::BoostedSupply` (r:1 w:1) + /// Proof: `BbBNC::BoostedSupply` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn withdraw_markup() -> Weight { // Proof Size summary in bytes: - // Measured: `2671` - // Estimated: `132361` - // Minimum execution time: 789_354_000 picoseconds. - Weight::from_parts(902_079_000, 132361) - .saturating_add(RocksDbWeight::get().reads(68_u64)) - .saturating_add(RocksDbWeight::get().writes(65_u64)) + // Measured: `2884` + // Estimated: `132574` + // Minimum execution time: 856_440_000 picoseconds. + Weight::from_parts(999_906_000, 132574) + .saturating_add(RocksDbWeight::get().reads(73_u64)) + .saturating_add(RocksDbWeight::get().writes(67_u64)) } /// Storage: `BbBNC::UserPositions` (r:1 w:1) /// Proof: `BbBNC::UserPositions` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `BbBNC::Locked` (r:1 w:1) /// Proof: `BbBNC::Locked` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `BbBNC::ExpiringPositions` (r:2 w:1) + /// Proof: `BbBNC::ExpiringPositions` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `BbBNC::NextExpiringBlock` (r:1 w:0) + /// Proof: `BbBNC::NextExpiringBlock` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `BbBNC::IncentiveConfigs` (r:1 w:1) + /// Proof: `BbBNC::IncentiveConfigs` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `BbBNC::Epoch` (r:1 w:1) + /// Proof: `BbBNC::Epoch` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `BbBNC::PointHistory` (r:1 w:1) + /// Proof: `BbBNC::PointHistory` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `BbBNC::UserPointEpoch` (r:1 w:1) + /// Proof: `BbBNC::UserPointEpoch` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `BbBNC::UserPointHistory` (r:1 w:1) + /// Proof: `BbBNC::UserPointHistory` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `BbBNC::Rewards` (r:1 w:1) + /// Proof: `BbBNC::Rewards` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `BbBNC::UserRewardPerTokenPaid` (r:1 w:1) + /// Proof: `BbBNC::UserRewardPerTokenPaid` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `BbBNC::Supply` (r:1 w:1) /// Proof: `BbBNC::Supply` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `BbBNC::UserLocked` (r:1 w:1) @@ -447,38 +507,28 @@ impl WeightInfo for () { /// Proof: `AssetRegistry::CurrencyMetadatas` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `System::Account` (r:2 w:1) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - /// Storage: `BbBNC::IncentiveConfigs` (r:1 w:1) - /// Proof: `BbBNC::IncentiveConfigs` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `BbBNC::Epoch` (r:1 w:1) - /// Proof: `BbBNC::Epoch` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `BbBNC::PointHistory` (r:1 w:1) - /// Proof: `BbBNC::PointHistory` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `BbBNC::Rewards` (r:1 w:1) - /// Proof: `BbBNC::Rewards` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `BbBNC::UserRewardPerTokenPaid` (r:1 w:1) - /// Proof: `BbBNC::UserRewardPerTokenPaid` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `BbBNC::UserMarkupInfos` (r:1 w:0) + /// Proof: `BbBNC::UserMarkupInfos` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `BbBNC::BoostedSupply` (r:1 w:1) + /// Proof: `BbBNC::BoostedSupply` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `BbBNC::SlopeChanges` (r:1 w:1) /// Proof: `BbBNC::SlopeChanges` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `BbBNC::UserPointEpoch` (r:1 w:1) - /// Proof: `BbBNC::UserPointEpoch` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `Farming::UserFarmingPool` (r:1 w:1) /// Proof: `Farming::UserFarmingPool` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `BbBNC::UserPointHistory` (r:0 w:1) - /// Proof: `BbBNC::UserPointHistory` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `BbBNC::PermanentLock` (r:0 w:1) /// Proof: `BbBNC::PermanentLock` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `BbBNC::ExpiryRewardPerToken` (r:0 w:1) + /// Proof: `BbBNC::ExpiryRewardPerToken` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `BbBNC::PositionOwner` (r:0 w:1) /// Proof: `BbBNC::PositionOwner` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `BbBNC::ExpiringPositions` (r:0 w:1) - /// Proof: `BbBNC::ExpiringPositions` (`max_values`: None, `max_size`: None, mode: `Measured`) fn redeem_unlock() -> Weight { // Proof Size summary in bytes: - // Measured: `2873` - // Estimated: `6338` - // Minimum execution time: 368_811_000 picoseconds. - Weight::from_parts(442_444_000, 6338) - .saturating_add(RocksDbWeight::get().reads(18_u64)) - .saturating_add(RocksDbWeight::get().writes(20_u64)) + // Measured: `3171` + // Estimated: `9111` + // Minimum execution time: 490_774_000 picoseconds. + Weight::from_parts(547_370_000, 9111) + .saturating_add(RocksDbWeight::get().reads(24_u64)) + .saturating_add(RocksDbWeight::get().writes(22_u64)) } /// Storage: `BbBNC::MarkupCoefficient` (r:1 w:0) /// Proof: `BbBNC::MarkupCoefficient` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -496,6 +546,8 @@ impl WeightInfo for () { /// Proof: `BbBNC::UserPositions` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `BbBNC::Locked` (r:1 w:0) /// Proof: `BbBNC::Locked` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `BbBNC::NextExpiringBlock` (r:1 w:0) + /// Proof: `BbBNC::NextExpiringBlock` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `BbBNC::IncentiveConfigs` (r:1 w:1) /// Proof: `BbBNC::IncentiveConfigs` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `BbBNC::Epoch` (r:1 w:1) @@ -510,24 +562,24 @@ impl WeightInfo for () { /// Proof: `BbBNC::Rewards` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `BbBNC::UserRewardPerTokenPaid` (r:1 w:1) /// Proof: `BbBNC::UserRewardPerTokenPaid` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `BbBNC::BoostedSupply` (r:1 w:1) + /// Proof: `BbBNC::BoostedSupply` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `BbBNC::SlopeChanges` (r:1 w:1) /// Proof: `BbBNC::SlopeChanges` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `BbBNC::Supply` (r:1 w:0) - /// Proof: `BbBNC::Supply` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn refresh() -> Weight { // Proof Size summary in bytes: - // Measured: `1959` - // Estimated: `7899` - // Minimum execution time: 289_531_000 picoseconds. - Weight::from_parts(318_536_000, 7899) - .saturating_add(RocksDbWeight::get().reads(18_u64)) - .saturating_add(RocksDbWeight::get().writes(10_u64)) + // Measured: `1872` + // Estimated: `7812` + // Minimum execution time: 266_837_000 picoseconds. + Weight::from_parts(288_786_000, 7812) + .saturating_add(RocksDbWeight::get().reads(19_u64)) + .saturating_add(RocksDbWeight::get().writes(11_u64)) } /// Storage: `BbBNC::UserPositions` (r:1 w:0) /// Proof: `BbBNC::UserPositions` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `BbBNC::Locked` (r:1 w:1) /// Proof: `BbBNC::Locked` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `BbBNC::ExpiringPositions` (r:1 w:2) + /// Storage: `BbBNC::ExpiringPositions` (r:3 w:2) /// Proof: `BbBNC::ExpiringPositions` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `BbBNC::NextExpiringBlock` (r:1 w:1) /// Proof: `BbBNC::NextExpiringBlock` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) @@ -551,20 +603,24 @@ impl WeightInfo for () { /// Proof: `BbBNC::Rewards` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `BbBNC::UserRewardPerTokenPaid` (r:1 w:1) /// Proof: `BbBNC::UserRewardPerTokenPaid` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `BbBNC::BoostedSupply` (r:1 w:1) + /// Proof: `BbBNC::BoostedSupply` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `BbBNC::SlopeChanges` (r:2 w:2) /// Proof: `BbBNC::SlopeChanges` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `Farming::UserFarmingPool` (r:1 w:1) /// Proof: `Farming::UserFarmingPool` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `BbBNC::PermanentLock` (r:0 w:1) /// Proof: `BbBNC::PermanentLock` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `BbBNC::ExpiryRewardPerToken` (r:0 w:1) + /// Proof: `BbBNC::ExpiryRewardPerToken` (`max_values`: None, `max_size`: None, mode: `Measured`) fn set_permanent_lock() -> Weight { // Proof Size summary in bytes: - // Measured: `1670` - // Estimated: `7610` - // Minimum execution time: 277_242_000 picoseconds. - Weight::from_parts(326_164_000, 7610) - .saturating_add(RocksDbWeight::get().reads(17_u64)) - .saturating_add(RocksDbWeight::get().writes(16_u64)) + // Measured: `1752` + // Estimated: `10167` + // Minimum execution time: 293_513_000 picoseconds. + Weight::from_parts(333_740_000, 10167) + .saturating_add(RocksDbWeight::get().reads(20_u64)) + .saturating_add(RocksDbWeight::get().writes(18_u64)) } /// Storage: `BbBNC::PermanentLock` (r:100 w:0) /// Proof: `BbBNC::PermanentLock` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -572,7 +628,7 @@ impl WeightInfo for () { /// Proof: `BbBNC::PositionOwner` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `BbBNC::Locked` (r:100 w:100) /// Proof: `BbBNC::Locked` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `BbBNC::ExpiringPositions` (r:100 w:200) + /// Storage: `BbBNC::ExpiringPositions` (r:201 w:200) /// Proof: `BbBNC::ExpiringPositions` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `BbBNC::NextExpiringBlock` (r:1 w:1) /// Proof: `BbBNC::NextExpiringBlock` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) @@ -600,21 +656,25 @@ impl WeightInfo for () { /// Proof: `BbBNC::Rewards` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `BbBNC::UserRewardPerTokenPaid` (r:100 w:100) /// Proof: `BbBNC::UserRewardPerTokenPaid` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `BbBNC::BoostedSupply` (r:1 w:1) + /// Proof: `BbBNC::BoostedSupply` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `Farming::UserFarmingPool` (r:100 w:100) /// Proof: `Farming::UserFarmingPool` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `BbBNC::ExpiryRewardPerToken` (r:0 w:1) + /// Proof: `BbBNC::ExpiryRewardPerToken` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `n` is `[1, 100]`. fn refresh_permanent_locks(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1848 + n * (836 ±0)` - // Estimated: `12645 + n * (3313 ±0)` - // Minimum execution time: 309_401_000 picoseconds. - Weight::from_parts(351_118_000, 12645) - // Standard Error: 667_746 - .saturating_add(Weight::from_parts(257_063_321, 0).saturating_mul(n.into())) - .saturating_add(RocksDbWeight::get().reads(9_u64)) - .saturating_add(RocksDbWeight::get().reads((12_u64).saturating_mul(n.into()))) - .saturating_add(RocksDbWeight::get().writes(7_u64)) + // Measured: `1898 + n * (763 ±0)` + // Estimated: `12700 + n * (5714 ±0)` + // Minimum execution time: 326_179_000 picoseconds. + Weight::from_parts(328_863_000, 12700) + // Standard Error: 556_679 + .saturating_add(Weight::from_parts(252_601_505, 0).saturating_mul(n.into())) + .saturating_add(RocksDbWeight::get().reads(11_u64)) + .saturating_add(RocksDbWeight::get().reads((13_u64).saturating_mul(n.into()))) + .saturating_add(RocksDbWeight::get().writes(9_u64)) .saturating_add(RocksDbWeight::get().writes((9_u64).saturating_mul(n.into()))) - .saturating_add(Weight::from_parts(0, 3313).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(0, 5714).saturating_mul(n.into())) } } diff --git a/pallets/buy-back/src/weights.rs b/pallets/buy-back/src/weights.rs index cfab03daf..4be30ccaf 100644 --- a/pallets/buy-back/src/weights.rs +++ b/pallets/buy-back/src/weights.rs @@ -25,7 +25,7 @@ //! Autogenerated weights for bifrost_buy_back //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 53.0.0 -//! DATE: 2026-06-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2026-07-03, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! HOSTNAME: `vps-b02dace3`, CPU: `Intel Core Processor (Haswell, no TSX)` //! WASM-EXECUTION: Compiled, CHAIN: Some("bifrost-polkadot-local"), DB CACHE: 1024 @@ -69,10 +69,10 @@ impl WeightInfo for () { /// Proof: `BuyBack::Infos` (`max_values`: None, `max_size`: None, mode: `Measured`) fn set_vtoken() -> Weight { // Proof Size summary in bytes: - // Measured: `642` - // Estimated: `4107` - // Minimum execution time: 46_524_000 picoseconds. - Weight::from_parts(48_332_000, 4107) + // Measured: `676` + // Estimated: `4141` + // Minimum execution time: 47_072_000 picoseconds. + Weight::from_parts(49_230_000, 4141) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -84,10 +84,10 @@ impl WeightInfo for () { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn charge() -> Weight { // Proof Size summary in bytes: - // Measured: `1449` + // Measured: `1450` // Estimated: `6196` - // Minimum execution time: 106_379_000 picoseconds. - Weight::from_parts(115_739_000, 6196) + // Minimum execution time: 113_998_000 picoseconds. + Weight::from_parts(116_441_000, 6196) .saturating_add(RocksDbWeight::get().reads(5_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -101,8 +101,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `70` // Estimated: `3535` - // Minimum execution time: 32_954_000 picoseconds. - Weight::from_parts(35_122_000, 3535) + // Minimum execution time: 35_069_000 picoseconds. + Weight::from_parts(37_188_000, 3535) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -114,10 +114,10 @@ impl WeightInfo for () { /// Proof: `BuyBack::UsdtSwapInfos` (`max_values`: None, `max_size`: None, mode: `Measured`) fn set_usdt_vtoken() -> Weight { // Proof Size summary in bytes: - // Measured: `778` - // Estimated: `4243` - // Minimum execution time: 53_898_000 picoseconds. - Weight::from_parts(56_209_000, 4243) + // Measured: `812` + // Estimated: `4277` + // Minimum execution time: 55_842_000 picoseconds. + Weight::from_parts(61_035_000, 4277) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -129,8 +129,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `70` // Estimated: `3535` - // Minimum execution time: 30_832_000 picoseconds. - Weight::from_parts(32_487_000, 3535) + // Minimum execution time: 33_234_000 picoseconds. + Weight::from_parts(37_253_000, 3535) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -142,8 +142,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `96` // Estimated: `6036` - // Minimum execution time: 31_028_000 picoseconds. - Weight::from_parts(33_138_000, 6036) + // Minimum execution time: 31_254_000 picoseconds. + Weight::from_parts(32_748_000, 6036) .saturating_add(RocksDbWeight::get().reads(3_u64)) } } diff --git a/pallets/clouds-convert/src/weights.rs b/pallets/clouds-convert/src/weights.rs index 37ddee160..84d33e6d6 100644 --- a/pallets/clouds-convert/src/weights.rs +++ b/pallets/clouds-convert/src/weights.rs @@ -25,7 +25,7 @@ //! Autogenerated weights for bifrost_clouds_convert //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 53.0.0 -//! DATE: 2026-06-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2026-07-03, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! HOSTNAME: `vps-b02dace3`, CPU: `Intel Core Processor (Haswell, no TSX)` //! WASM-EXECUTION: Compiled, CHAIN: Some("bifrost-polkadot-local"), DB CACHE: 1024 @@ -95,14 +95,16 @@ impl WeightInfo for () { /// Proof: `BbBNC::UserPointEpoch` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `BbBNC::Rewards` (r:1 w:0) /// Proof: `BbBNC::Rewards` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `BbBNC::UserRewardPerTokenPaid` (r:1 w:1) + /// Proof: `BbBNC::UserRewardPerTokenPaid` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `BbBNC::BoostedSupply` (r:1 w:1) + /// Proof: `BbBNC::BoostedSupply` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `BbBNC::SlopeChanges` (r:2 w:1) /// Proof: `BbBNC::SlopeChanges` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `Farming::UserFarmingPool` (r:1 w:1) /// Proof: `Farming::UserFarmingPool` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `BbBNC::UserPointHistory` (r:0 w:1) /// Proof: `BbBNC::UserPointHistory` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `BbBNC::UserRewardPerTokenPaid` (r:0 w:1) - /// Proof: `BbBNC::UserRewardPerTokenPaid` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `BbBNC::Locked` (r:0 w:1) /// Proof: `BbBNC::Locked` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `BbBNC::PositionOwner` (r:0 w:1) @@ -111,10 +113,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1703` // Estimated: `8769` - // Minimum execution time: 350_385_000 picoseconds. - Weight::from_parts(430_293_000, 8769) - .saturating_add(RocksDbWeight::get().reads(25_u64)) - .saturating_add(RocksDbWeight::get().writes(22_u64)) + // Minimum execution time: 378_411_000 picoseconds. + Weight::from_parts(396_351_000, 8769) + .saturating_add(RocksDbWeight::get().reads(27_u64)) + .saturating_add(RocksDbWeight::get().writes(23_u64)) } /// Storage: `Tokens::Accounts` (r:2 w:2) /// Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(118), added: 2593, mode: `MaxEncodedLen`) @@ -124,10 +126,10 @@ impl WeightInfo for () { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn charge_vbnc() -> Weight { // Proof Size summary in bytes: - // Measured: `1299` + // Measured: `1300` // Estimated: `6196` - // Minimum execution time: 101_529_000 picoseconds. - Weight::from_parts(108_905_000, 6196) + // Minimum execution time: 105_526_000 picoseconds. + Weight::from_parts(107_716_000, 6196) .saturating_add(RocksDbWeight::get().reads(5_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } diff --git a/pallets/cross-chain-risk-control/src/weights.rs b/pallets/cross-chain-risk-control/src/weights.rs index 3ac32777b..0baac3003 100644 --- a/pallets/cross-chain-risk-control/src/weights.rs +++ b/pallets/cross-chain-risk-control/src/weights.rs @@ -25,7 +25,7 @@ //! Autogenerated weights for bifrost_cross_chain_risk_control //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 53.0.0 -//! DATE: 2026-06-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2026-07-03, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! HOSTNAME: `vps-b02dace3`, CPU: `Intel Core Processor (Haswell, no TSX)` //! WASM-EXECUTION: Compiled, CHAIN: Some("bifrost-polkadot-local"), DB CACHE: 1024 @@ -73,8 +73,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 24_814_000 picoseconds. - Weight::from_parts(25_551_000, 0) + // Minimum execution time: 26_939_000 picoseconds. + Weight::from_parts(28_341_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `RiskControl::GlobalRiskConfigs` (r:0 w:1) @@ -83,8 +83,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 21_394_000 picoseconds. - Weight::from_parts(22_617_000, 0) + // Minimum execution time: 24_778_000 picoseconds. + Weight::from_parts(26_414_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `RiskControl::CooldownPeriod` (r:0 w:1) @@ -93,8 +93,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 17_154_000 picoseconds. - Weight::from_parts(18_092_000, 0) + // Minimum execution time: 19_553_000 picoseconds. + Weight::from_parts(20_672_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `RiskControl::ExemptAccounts` (r:0 w:1) @@ -104,10 +104,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 18_564_000 picoseconds. - Weight::from_parts(19_697_964, 0) - // Standard Error: 1_486 - .saturating_add(Weight::from_parts(45_929, 0).saturating_mul(x.into())) + // Minimum execution time: 20_554_000 picoseconds. + Weight::from_parts(24_261_950, 0) + // Standard Error: 3_383 + .saturating_add(Weight::from_parts(40_610, 0).saturating_mul(x.into())) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `RiskControl::ReservedRecords` (r:1 w:1) @@ -118,8 +118,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `412` // Estimated: `3877` - // Minimum execution time: 53_052_000 picoseconds. - Weight::from_parts(59_195_000, 3877) + // Minimum execution time: 61_217_000 picoseconds. + Weight::from_parts(66_002_000, 3877) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -133,10 +133,10 @@ impl WeightInfo for () { /// Proof: `AssetRegistry::CurrencyMetadatas` (`max_values`: None, `max_size`: None, mode: `Measured`) fn force_unfreeze() -> Weight { // Proof Size summary in bytes: - // Measured: `1567` - // Estimated: `5032` - // Minimum execution time: 91_455_000 picoseconds. - Weight::from_parts(97_873_000, 5032) + // Measured: `1568` + // Estimated: `5033` + // Minimum execution time: 93_615_000 picoseconds. + Weight::from_parts(107_840_000, 5033) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -152,8 +152,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `302` // Estimated: `3767` - // Minimum execution time: 39_002_000 picoseconds. - Weight::from_parts(41_966_000, 3767) + // Minimum execution time: 41_962_000 picoseconds. + Weight::from_parts(46_170_000, 3767) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -171,8 +171,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `380` // Estimated: `3845` - // Minimum execution time: 49_594_000 picoseconds. - Weight::from_parts(51_987_000, 3845) + // Minimum execution time: 55_225_000 picoseconds. + Weight::from_parts(59_905_000, 3845) .saturating_add(RocksDbWeight::get().reads(5_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -190,10 +190,10 @@ impl WeightInfo for () { /// Proof: `RiskControl::ReservedRecords` (`max_values`: None, `max_size`: None, mode: `Measured`) fn reserve_inbound() -> Weight { // Proof Size summary in bytes: - // Measured: `1378` - // Estimated: `4843` - // Minimum execution time: 103_039_000 picoseconds. - Weight::from_parts(107_637_000, 4843) + // Measured: `1379` + // Estimated: `4844` + // Minimum execution time: 114_289_000 picoseconds. + Weight::from_parts(122_801_000, 4844) .saturating_add(RocksDbWeight::get().reads(5_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } @@ -208,12 +208,12 @@ impl WeightInfo for () { /// The range of component `x` is `[0, 50]`. fn on_initialize(x: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1467 + x * (103 ±0)` - // Estimated: `4933 + x * (2579 ±0)` - // Minimum execution time: 12_269_000 picoseconds. - Weight::from_parts(62_180_905, 4933) - // Standard Error: 62_037 - .saturating_add(Weight::from_parts(29_392_837, 0).saturating_mul(x.into())) + // Measured: `1468 + x * (103 ±0)` + // Estimated: `4934 + x * (2579 ±0)` + // Minimum execution time: 13_795_000 picoseconds. + Weight::from_parts(86_671_344, 4934) + // Standard Error: 93_385 + .saturating_add(Weight::from_parts(33_378_243, 0).saturating_mul(x.into())) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(x.into()))) .saturating_add(RocksDbWeight::get().writes(2_u64)) diff --git a/pallets/farming/src/weights.rs b/pallets/farming/src/weights.rs index ed2cc012d..9d7b105fd 100644 --- a/pallets/farming/src/weights.rs +++ b/pallets/farming/src/weights.rs @@ -25,7 +25,7 @@ //! Autogenerated weights for bifrost_farming //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 53.0.0 -//! DATE: 2026-06-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2026-07-03, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! HOSTNAME: `vps-b02dace3`, CPU: `Intel Core Processor (Haswell, no TSX)` //! WASM-EXECUTION: Compiled, CHAIN: Some("bifrost-polkadot-local"), DB CACHE: 1024 @@ -84,10 +84,10 @@ impl WeightInfo for () { /// Proof: `Farming::BoostPoolInfos` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn on_initialize() -> Weight { // Proof Size summary in bytes: - // Measured: `146` - // Estimated: `3611` - // Minimum execution time: 15_102_000 picoseconds. - Weight::from_parts(17_869_000, 3611) + // Measured: `113` + // Estimated: `3578` + // Minimum execution time: 16_390_000 picoseconds. + Weight::from_parts(17_144_000, 3578) .saturating_add(RocksDbWeight::get().reads(2_u64)) } /// Storage: `Farming::PoolNextId` (r:1 w:1) @@ -96,10 +96,10 @@ impl WeightInfo for () { /// Proof: `Farming::PoolInfos` (`max_values`: None, `max_size`: None, mode: `Measured`) fn create_farming_pool() -> Weight { // Proof Size summary in bytes: - // Measured: `142` - // Estimated: `3607` - // Minimum execution time: 41_612_000 picoseconds. - Weight::from_parts(46_495_000, 3607) + // Measured: `109` + // Estimated: `3574` + // Minimum execution time: 40_356_000 picoseconds. + Weight::from_parts(41_945_000, 3574) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -111,10 +111,10 @@ impl WeightInfo for () { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn charge() -> Weight { // Proof Size summary in bytes: - // Measured: `907` + // Measured: `874` // Estimated: `6176` - // Minimum execution time: 114_429_000 picoseconds. - Weight::from_parts(120_445_000, 6176) + // Minimum execution time: 106_723_000 picoseconds. + Weight::from_parts(116_671_000, 6176) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } @@ -128,10 +128,10 @@ impl WeightInfo for () { /// Proof: `Farming::UserFarmingPool` (`max_values`: None, `max_size`: None, mode: `Measured`) fn deposit() -> Weight { // Proof Size summary in bytes: - // Measured: `526` - // Estimated: `6466` - // Minimum execution time: 69_439_000 picoseconds. - Weight::from_parts(73_046_000, 6466) + // Measured: `493` + // Estimated: `6433` + // Minimum execution time: 68_635_000 picoseconds. + Weight::from_parts(70_372_000, 6433) .saturating_add(RocksDbWeight::get().reads(5_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -143,10 +143,10 @@ impl WeightInfo for () { /// Proof: `BbBNC::UserPositions` (`max_values`: None, `max_size`: None, mode: `Measured`) fn withdraw() -> Weight { // Proof Size summary in bytes: - // Measured: `667` - // Estimated: `6607` - // Minimum execution time: 97_269_000 picoseconds. - Weight::from_parts(100_922_000, 6607) + // Measured: `634` + // Estimated: `6574` + // Minimum execution time: 93_648_000 picoseconds. + Weight::from_parts(108_829_000, 6574) .saturating_add(RocksDbWeight::get().reads(5_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -158,10 +158,10 @@ impl WeightInfo for () { /// Proof: `BbBNC::UserPositions` (`max_values`: None, `max_size`: None, mode: `Measured`) fn claim() -> Weight { // Proof Size summary in bytes: - // Measured: `705` - // Estimated: `6645` - // Minimum execution time: 101_514_000 picoseconds. - Weight::from_parts(109_450_000, 6645) + // Measured: `672` + // Estimated: `6612` + // Minimum execution time: 98_582_000 picoseconds. + Weight::from_parts(100_529_000, 6612) .saturating_add(RocksDbWeight::get().reads(5_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -173,10 +173,10 @@ impl WeightInfo for () { /// Proof: `BbBNC::UserPositions` (`max_values`: None, `max_size`: None, mode: `Measured`) fn withdraw_claim() -> Weight { // Proof Size summary in bytes: - // Measured: `667` - // Estimated: `6607` - // Minimum execution time: 78_311_000 picoseconds. - Weight::from_parts(96_178_000, 6607) + // Measured: `634` + // Estimated: `6574` + // Minimum execution time: 75_636_000 picoseconds. + Weight::from_parts(81_652_000, 6574) .saturating_add(RocksDbWeight::get().reads(5_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -184,10 +184,10 @@ impl WeightInfo for () { /// Proof: `Farming::PoolInfos` (`max_values`: None, `max_size`: None, mode: `Measured`) fn reset_pool() -> Weight { // Proof Size summary in bytes: - // Measured: `415` - // Estimated: `3880` - // Minimum execution time: 50_582_000 picoseconds. - Weight::from_parts(58_927_000, 3880) + // Measured: `382` + // Estimated: `3847` + // Minimum execution time: 52_396_000 picoseconds. + Weight::from_parts(53_736_000, 3847) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -199,10 +199,10 @@ impl WeightInfo for () { /// Proof: `Farming::SharesAndWithdrawnRewards` (`max_values`: None, `max_size`: None, mode: `Measured`) fn force_retire_pool() -> Weight { // Proof Size summary in bytes: - // Measured: `423` - // Estimated: `3888` - // Minimum execution time: 57_638_000 picoseconds. - Weight::from_parts(69_516_000, 3888) + // Measured: `390` + // Estimated: `3855` + // Minimum execution time: 57_901_000 picoseconds. + Weight::from_parts(60_888_000, 3855) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -210,10 +210,10 @@ impl WeightInfo for () { /// Proof: `Farming::PoolInfos` (`max_values`: None, `max_size`: None, mode: `Measured`) fn kill_pool() -> Weight { // Proof Size summary in bytes: - // Measured: `391` - // Estimated: `3856` - // Minimum execution time: 51_786_000 picoseconds. - Weight::from_parts(59_795_000, 3856) + // Measured: `358` + // Estimated: `3823` + // Minimum execution time: 51_968_000 picoseconds. + Weight::from_parts(53_345_000, 3823) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -223,10 +223,10 @@ impl WeightInfo for () { /// Proof: `Farming::GaugePoolInfos` (`max_values`: None, `max_size`: None, mode: `Measured`) fn edit_pool() -> Weight { // Proof Size summary in bytes: - // Measured: `522` - // Estimated: `6462` - // Minimum execution time: 53_723_000 picoseconds. - Weight::from_parts(79_043_000, 6462) + // Measured: `489` + // Estimated: `6429` + // Minimum execution time: 57_442_000 picoseconds. + Weight::from_parts(59_432_000, 6429) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -234,10 +234,10 @@ impl WeightInfo for () { /// Proof: `Farming::PoolInfos` (`max_values`: None, `max_size`: None, mode: `Measured`) fn close_pool() -> Weight { // Proof Size summary in bytes: - // Measured: `395` - // Estimated: `3860` - // Minimum execution time: 43_297_000 picoseconds. - Weight::from_parts(51_519_000, 3860) + // Measured: `362` + // Estimated: `3827` + // Minimum execution time: 44_020_000 picoseconds. + Weight::from_parts(46_552_000, 3827) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -247,20 +247,20 @@ impl WeightInfo for () { /// Proof: `Farming::GaugeInfos` (`max_values`: None, `max_size`: None, mode: `Measured`) fn force_gauge_claim() -> Weight { // Proof Size summary in bytes: - // Measured: `337` - // Estimated: `3802` - // Minimum execution time: 42_193_000 picoseconds. - Weight::from_parts(47_800_000, 3802) + // Measured: `304` + // Estimated: `3769` + // Minimum execution time: 40_654_000 picoseconds. + Weight::from_parts(43_473_000, 3769) .saturating_add(RocksDbWeight::get().reads(2_u64)) } /// Storage: `Farming::RetireLimit` (r:1 w:1) /// Proof: `Farming::RetireLimit` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn set_retire_limit() -> Weight { // Proof Size summary in bytes: - // Measured: `142` - // Estimated: `1627` - // Minimum execution time: 25_406_000 picoseconds. - Weight::from_parts(59_321_000, 1627) + // Measured: `109` + // Estimated: `1594` + // Minimum execution time: 23_033_000 picoseconds. + Weight::from_parts(24_340_000, 1594) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -270,10 +270,10 @@ impl WeightInfo for () { /// Proof: `Farming::BoostWhitelist` (`max_values`: None, `max_size`: None, mode: `Measured`) fn add_boost_pool_whitelist() -> Weight { // Proof Size summary in bytes: - // Measured: `142` - // Estimated: `3607` - // Minimum execution time: 39_558_000 picoseconds. - Weight::from_parts(47_887_000, 3607) + // Measured: `109` + // Estimated: `3574` + // Minimum execution time: 21_370_000 picoseconds. + Weight::from_parts(22_991_000, 3574) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -281,10 +281,10 @@ impl WeightInfo for () { /// Proof: `Farming::BoostNextRoundWhitelist` (`max_values`: None, `max_size`: None, mode: `Measured`) fn set_next_round_whitelist() -> Weight { // Proof Size summary in bytes: - // Measured: `211` - // Estimated: `211` - // Minimum execution time: 26_108_000 picoseconds. - Weight::from_parts(28_102_000, 211) + // Measured: `178` + // Estimated: `178` + // Minimum execution time: 19_750_000 picoseconds. + Weight::from_parts(21_535_000, 178) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `Farming::BoostPoolInfos` (r:1 w:1) @@ -299,10 +299,10 @@ impl WeightInfo for () { /// Proof: `Farming::BoostVotingPools` (`max_values`: None, `max_size`: None, mode: `Measured`) fn vote() -> Weight { // Proof Size summary in bytes: - // Measured: `230` - // Estimated: `3695` - // Minimum execution time: 69_793_000 picoseconds. - Weight::from_parts(71_913_000, 3695) + // Measured: `197` + // Estimated: `3662` + // Minimum execution time: 58_821_000 picoseconds. + Weight::from_parts(96_670_000, 3662) .saturating_add(RocksDbWeight::get().reads(5_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -318,10 +318,10 @@ impl WeightInfo for () { /// Proof: `Farming::PoolInfos` (`max_values`: None, `max_size`: None, mode: `Measured`) fn start_boost_round() -> Weight { // Proof Size summary in bytes: - // Measured: `230` - // Estimated: `6170` - // Minimum execution time: 87_905_000 picoseconds. - Weight::from_parts(91_445_000, 6170) + // Measured: `197` + // Estimated: `6137` + // Minimum execution time: 75_184_000 picoseconds. + Weight::from_parts(78_709_000, 6137) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -329,10 +329,10 @@ impl WeightInfo for () { /// Proof: `Farming::BoostPoolInfos` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn end_boost_round() -> Weight { // Proof Size summary in bytes: - // Measured: `228` - // Estimated: `1713` - // Minimum execution time: 49_660_000 picoseconds. - Weight::from_parts(52_061_000, 1713) + // Measured: `195` + // Estimated: `1680` + // Minimum execution time: 42_881_000 picoseconds. + Weight::from_parts(46_902_000, 1680) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -342,10 +342,10 @@ impl WeightInfo for () { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn charge_boost() -> Weight { // Proof Size summary in bytes: - // Measured: `556` + // Measured: `523` // Estimated: `6176` - // Minimum execution time: 99_161_000 picoseconds. - Weight::from_parts(101_875_000, 6176) + // Minimum execution time: 82_716_000 picoseconds. + Weight::from_parts(131_148_000, 6176) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -359,10 +359,10 @@ impl WeightInfo for () { /// Proof: `BbBNC::UserPositions` (`max_values`: None, `max_size`: None, mode: `Measured`) fn refresh() -> Weight { // Proof Size summary in bytes: - // Measured: `637` - // Estimated: `6577` - // Minimum execution time: 80_542_000 picoseconds. - Weight::from_parts(84_515_000, 6577) + // Measured: `604` + // Estimated: `6544` + // Minimum execution time: 66_546_000 picoseconds. + Weight::from_parts(70_122_000, 6544) .saturating_add(RocksDbWeight::get().reads(5_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } diff --git a/pallets/fee-share/src/weights.rs b/pallets/fee-share/src/weights.rs index dbfc5c211..82c27de65 100644 --- a/pallets/fee-share/src/weights.rs +++ b/pallets/fee-share/src/weights.rs @@ -25,7 +25,7 @@ //! Autogenerated weights for bifrost_fee_share //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 53.0.0 -//! DATE: 2026-06-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2026-07-03, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! HOSTNAME: `vps-b02dace3`, CPU: `Intel Core Processor (Haswell, no TSX)` //! WASM-EXECUTION: Compiled, CHAIN: Some("bifrost-kusama-local"), DB CACHE: 1024 @@ -68,8 +68,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 413_000 picoseconds. - Weight::from_parts(452_000, 0) + // Minimum execution time: 335_000 picoseconds. + Weight::from_parts(395_000, 0) } /// Storage: `FeeShare::DistributionNextId` (r:1 w:1) /// Proof: `FeeShare::DistributionNextId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) @@ -81,8 +81,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `3` // Estimated: `1488` - // Minimum execution time: 37_110_000 picoseconds. - Weight::from_parts(39_326_000, 1488) + // Minimum execution time: 33_453_000 picoseconds. + Weight::from_parts(36_756_000, 1488) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -94,8 +94,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `179` // Estimated: `3644` - // Minimum execution time: 53_847_000 picoseconds. - Weight::from_parts(57_144_000, 3644) + // Minimum execution time: 48_669_000 picoseconds. + Weight::from_parts(51_104_000, 3644) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -105,8 +105,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 20_936_000 picoseconds. - Weight::from_parts(21_468_000, 0) + // Minimum execution time: 17_204_000 picoseconds. + Weight::from_parts(18_394_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `FeeShare::DistributionInfos` (r:1 w:0) @@ -123,8 +123,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `592` // Estimated: `6532` - // Minimum execution time: 91_449_000 picoseconds. - Weight::from_parts(94_128_000, 6532) + // Minimum execution time: 80_377_000 picoseconds. + Weight::from_parts(82_072_000, 6532) .saturating_add(RocksDbWeight::get().reads(7_u64)) } /// Storage: `FeeShare::DistributionInfos` (r:1 w:1) @@ -141,8 +141,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `592` // Estimated: `6532` - // Minimum execution time: 108_198_000 picoseconds. - Weight::from_parts(110_589_000, 6532) + // Minimum execution time: 94_927_000 picoseconds. + Weight::from_parts(97_933_000, 6532) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -154,8 +154,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `128` // Estimated: `3593` - // Minimum execution time: 37_363_000 picoseconds. - Weight::from_parts(39_841_000, 3593) + // Minimum execution time: 33_808_000 picoseconds. + Weight::from_parts(36_354_000, 3593) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } diff --git a/pallets/flexible-fee/src/weights.rs b/pallets/flexible-fee/src/weights.rs index 5091d9eac..1ed1818c6 100644 --- a/pallets/flexible-fee/src/weights.rs +++ b/pallets/flexible-fee/src/weights.rs @@ -25,7 +25,7 @@ //! Autogenerated weights for bifrost_flexible_fee //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 53.0.0 -//! DATE: 2026-06-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2026-07-03, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! HOSTNAME: `vps-b02dace3`, CPU: `Intel Core Processor (Haswell, no TSX)` //! WASM-EXECUTION: Compiled, CHAIN: Some("bifrost-kusama-local"), DB CACHE: 1024 @@ -65,8 +65,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 20_733_000 picoseconds. - Weight::from_parts(23_369_000, 0) + // Minimum execution time: 19_395_000 picoseconds. + Weight::from_parts(21_286_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `FlexibleFee::UniversalFeeCurrencyOrderList` (r:0 w:1) @@ -75,8 +75,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 18_181_000 picoseconds. - Weight::from_parts(19_193_000, 0) + // Minimum execution time: 16_596_000 picoseconds. + Weight::from_parts(19_464_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } } diff --git a/pallets/lend-market/src/weights.rs b/pallets/lend-market/src/weights.rs index 15971fb48..7151132fd 100644 --- a/pallets/lend-market/src/weights.rs +++ b/pallets/lend-market/src/weights.rs @@ -25,7 +25,7 @@ //! Autogenerated weights for lend_market //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 53.0.0 -//! DATE: 2026-06-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2026-07-03, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! HOSTNAME: `vps-b02dace3`, CPU: `Intel Core Processor (Haswell, no TSX)` //! WASM-EXECUTION: Compiled, CHAIN: Some("bifrost-kusama-local"), DB CACHE: 1024 @@ -90,8 +90,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `79` // Estimated: `8494` - // Minimum execution time: 63_875_000 picoseconds. - Weight::from_parts(65_551_000, 8494) + // Minimum execution time: 61_105_000 picoseconds. + Weight::from_parts(63_560_000, 8494) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } @@ -101,8 +101,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `346` // Estimated: `3811` - // Minimum execution time: 40_722_000 picoseconds. - Weight::from_parts(41_872_000, 3811) + // Minimum execution time: 37_996_000 picoseconds. + Weight::from_parts(39_798_000, 3811) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -112,8 +112,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `346` // Estimated: `3811` - // Minimum execution time: 40_327_000 picoseconds. - Weight::from_parts(44_374_000, 3811) + // Minimum execution time: 38_971_000 picoseconds. + Weight::from_parts(40_229_000, 3811) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -123,8 +123,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `346` // Estimated: `3811` - // Minimum execution time: 44_249_000 picoseconds. - Weight::from_parts(46_357_000, 3811) + // Minimum execution time: 42_621_000 picoseconds. + Weight::from_parts(44_060_000, 3811) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -136,8 +136,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `354` // Estimated: `3819` - // Minimum execution time: 54_769_000 picoseconds. - Weight::from_parts(58_717_000, 3819) + // Minimum execution time: 55_094_000 picoseconds. + Weight::from_parts(57_429_000, 3819) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -147,8 +147,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `103` // Estimated: `6196` - // Minimum execution time: 102_212_000 picoseconds. - Weight::from_parts(107_949_000, 6196) + // Minimum execution time: 102_419_000 picoseconds. + Weight::from_parts(105_750_000, 6196) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -158,8 +158,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `206` // Estimated: `6196` - // Minimum execution time: 95_834_000 picoseconds. - Weight::from_parts(105_374_000, 6196) + // Minimum execution time: 98_627_000 picoseconds. + Weight::from_parts(101_325_000, 6196) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -177,8 +177,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `354` // Estimated: `6294` - // Minimum execution time: 81_114_000 picoseconds. - Weight::from_parts(82_572_000, 6294) + // Minimum execution time: 77_090_000 picoseconds. + Weight::from_parts(78_917_000, 6294) .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } @@ -208,8 +208,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `376` // Estimated: `6316` - // Minimum execution time: 133_280_000 picoseconds. - Weight::from_parts(134_760_000, 6316) + // Minimum execution time: 126_488_000 picoseconds. + Weight::from_parts(129_025_000, 6316) .saturating_add(RocksDbWeight::get().reads(12_u64)) .saturating_add(RocksDbWeight::get().writes(5_u64)) } @@ -243,8 +243,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1102` // Estimated: `6196` - // Minimum execution time: 244_148_000 picoseconds. - Weight::from_parts(261_811_000, 6196) + // Minimum execution time: 231_868_000 picoseconds. + Weight::from_parts(241_442_000, 6196) .saturating_add(RocksDbWeight::get().reads(14_u64)) .saturating_add(RocksDbWeight::get().writes(7_u64)) } @@ -282,8 +282,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `978` // Estimated: `6918` - // Minimum execution time: 240_589_000 picoseconds. - Weight::from_parts(253_324_000, 6918) + // Minimum execution time: 230_629_000 picoseconds. + Weight::from_parts(238_954_000, 6918) .saturating_add(RocksDbWeight::get().reads(17_u64)) .saturating_add(RocksDbWeight::get().writes(10_u64)) } @@ -329,8 +329,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1903` // Estimated: `7843` - // Minimum execution time: 443_030_000 picoseconds. - Weight::from_parts(464_800_000, 7843) + // Minimum execution time: 418_447_000 picoseconds. + Weight::from_parts(440_819_000, 7843) .saturating_add(RocksDbWeight::get().reads(24_u64)) .saturating_add(RocksDbWeight::get().writes(8_u64)) } @@ -368,8 +368,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1755` // Estimated: `7695` - // Minimum execution time: 306_179_000 picoseconds. - Weight::from_parts(345_036_000, 7695) + // Minimum execution time: 286_071_000 picoseconds. + Weight::from_parts(294_497_000, 7695) .saturating_add(RocksDbWeight::get().reads(17_u64)) .saturating_add(RocksDbWeight::get().writes(9_u64)) } @@ -407,8 +407,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1755` // Estimated: `7695` - // Minimum execution time: 318_942_000 picoseconds. - Weight::from_parts(369_977_000, 7695) + // Minimum execution time: 296_402_000 picoseconds. + Weight::from_parts(300_018_000, 7695) .saturating_add(RocksDbWeight::get().reads(17_u64)) .saturating_add(RocksDbWeight::get().writes(10_u64)) } @@ -440,8 +440,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1756` // Estimated: `7696` - // Minimum execution time: 368_371_000 picoseconds. - Weight::from_parts(421_268_000, 7696) + // Minimum execution time: 222_753_000 picoseconds. + Weight::from_parts(226_769_000, 7696) .saturating_add(RocksDbWeight::get().reads(14_u64)) .saturating_add(RocksDbWeight::get().writes(8_u64)) } @@ -473,8 +473,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1756` // Estimated: `7696` - // Minimum execution time: 302_548_000 picoseconds. - Weight::from_parts(309_707_000, 7696) + // Minimum execution time: 247_204_000 picoseconds. + Weight::from_parts(249_691_000, 7696) .saturating_add(RocksDbWeight::get().reads(14_u64)) .saturating_add(RocksDbWeight::get().writes(8_u64)) } @@ -486,8 +486,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `529` // Estimated: `6469` - // Minimum execution time: 97_280_000 picoseconds. - Weight::from_parts(101_920_000, 6469) + // Minimum execution time: 78_435_000 picoseconds. + Weight::from_parts(81_346_000, 6469) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -537,8 +537,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `2915` // Estimated: `13805` - // Minimum execution time: 795_552_000 picoseconds. - Weight::from_parts(845_556_000, 13805) + // Minimum execution time: 636_749_000 picoseconds. + Weight::from_parts(666_659_000, 13805) .saturating_add(RocksDbWeight::get().reads(42_u64)) .saturating_add(RocksDbWeight::get().writes(18_u64)) } @@ -556,8 +556,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `942` // Estimated: `6882` - // Minimum execution time: 131_845_000 picoseconds. - Weight::from_parts(165_888_000, 6882) + // Minimum execution time: 156_589_000 picoseconds. + Weight::from_parts(195_093_000, 6882) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } @@ -575,8 +575,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1218` // Estimated: `7158` - // Minimum execution time: 133_800_000 picoseconds. - Weight::from_parts(149_247_000, 7158) + // Minimum execution time: 157_480_000 picoseconds. + Weight::from_parts(183_562_000, 7158) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -586,8 +586,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `76` // Estimated: `1561` - // Minimum execution time: 30_032_000 picoseconds. - Weight::from_parts(32_495_000, 1561) + // Minimum execution time: 36_249_000 picoseconds. + Weight::from_parts(39_475_000, 1561) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } diff --git a/pallets/leverage-staking/src/weights.rs b/pallets/leverage-staking/src/weights.rs index 1f9867e05..4dc9ab8bb 100644 --- a/pallets/leverage-staking/src/weights.rs +++ b/pallets/leverage-staking/src/weights.rs @@ -25,7 +25,7 @@ //! Autogenerated weights for leverage_staking //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 53.0.0 -//! DATE: 2026-06-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2026-07-03, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! HOSTNAME: `vps-b02dace3`, CPU: `Intel Core Processor (Haswell, no TSX)` //! WASM-EXECUTION: Compiled, CHAIN: Some("bifrost-kusama-local"), DB CACHE: 1024 @@ -124,8 +124,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `3523` // Estimated: `13955` - // Minimum execution time: 1_059_273_000 picoseconds. - Weight::from_parts(1_093_023_000, 13955) + // Minimum execution time: 1_131_570_000 picoseconds. + Weight::from_parts(1_171_341_000, 13955) .saturating_add(RocksDbWeight::get().reads(49_u64)) .saturating_add(RocksDbWeight::get().writes(22_u64)) } diff --git a/pallets/parachain-staking/Cargo.toml b/pallets/parachain-staking/Cargo.toml index a7fac525c..158ad6d4d 100644 --- a/pallets/parachain-staking/Cargo.toml +++ b/pallets/parachain-staking/Cargo.toml @@ -19,6 +19,7 @@ scale-info = { workspace = true, features = ["derive", "decode"] } sp-runtime = { workspace = true } sp-std = { workspace = true } sp-staking = { workspace = true } +sp-io = { workspace = true } substrate-fixed = { workspace = true } pallet-authorship = { workspace = true } pallet-session = { workspace = true } @@ -29,7 +30,6 @@ similar-asserts = { workspace = true } pallet-balances = { workspace = true } sp-core = { workspace = true } -sp-io = { workspace = true } [features] default = ["std"] @@ -42,6 +42,7 @@ std = [ "sp-runtime/std", "sp-std/std", "sp-staking/std", + "sp-io/std", "substrate-fixed/std", "serde/std", "pallet-authorship/std", diff --git a/pallets/parachain-staking/src/migrations.rs b/pallets/parachain-staking/src/migrations.rs index fe6c996ff..d667b1f81 100644 --- a/pallets/parachain-staking/src/migrations.rs +++ b/pallets/parachain-staking/src/migrations.rs @@ -22,15 +22,17 @@ use super::*; use frame_support::ensure; use frame_support::{ migration::storage_key_iter, + migrations::{SteppedMigration, SteppedMigrationError}, pallet, - pallet_prelude::PhantomData, + pallet_prelude::{ConstU32, PhantomData}, + storage::{storage_prefix, unhashed, PrefixIterator}, storage_alias, - traits::{Get, OnRuntimeUpgrade, ReservableCurrency}, - weights::Weight, - Twox64Concat, + traits::{Get, LockIdentifier, LockableCurrency, OnRuntimeUpgrade, ReservableCurrency}, + weights::{RuntimeDbWeight, Weight, WeightMeter}, + BoundedVec, ReversibleStorageHasher, StorageHasher, Twox128, Twox64Concat, }; -#[cfg(feature = "try-runtime")] -use parity_scale_codec::{Decode, Encode}; +use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; +use scale_info::TypeInfo; extern crate alloc; #[cfg(feature = "try-runtime")] use alloc::{format, string::ToString}; @@ -62,6 +64,291 @@ use crate::{ const COLLATOR_COMMISSION: Perbill = Perbill::from_percent(10); const PARACHAIN_BOND_RESERVE_PERCENT: Percent = Percent::from_percent(0); const BLOCKS_PER_ROUND: u32 = 2 * 300; +const REMOVE_CANDIDATE_LOCKS_MBM_ID: [u8; 16] = *b"psc-cand-lock-v1"; +const REMOVE_DELEGATOR_LOCKS_MBM_ID: [u8; 16] = *b"psc-dele-lock-v1"; +const CLEAR_PARACHAIN_STAKING_STORAGE_MBM_ID: [u8; 16] = *b"psc-clear-str-v1"; +const MBM_WEIGHT_PER_KEY_MULTIPLIER: u64 = 50; +const MBM_MAX_LOCK_KEYS_PER_STEP: u32 = 10; +const MBM_MAX_AT_STAKE_KEYS_PER_STEP: u32 = 100; +const MBM_MAX_PALLET_KEYS_PER_STEP: u32 = 10; +type RawStorageKeyCursor = BoundedVec>; +type ClearStorageRawCursor = BoundedVec>; + +#[derive(Encode, Decode, MaxEncodedLen, TypeInfo)] +pub enum ClearParachainStakingStorageCursor { + AtStake(Option), + Pallet(Option), +} + +fn decode_twox64_concat_account( + raw_key_without_prefix: &[u8], + _raw_value: &[u8], +) -> Result { + let mut key_material = Twox64Concat::reverse(raw_key_without_prefix); + T::AccountId::decode(&mut key_material) +} + +fn remove_locks_step( + cursor: Option, + meter: &mut WeightMeter, + storage_item: &'static [u8], + lock_id: LockIdentifier, + log_subject: &'static str, +) -> Result, SteppedMigrationError> +where + T: frame_system::Config + pallet_balances::Config, + C: LockableCurrency, + DbWeight: Get, +{ + let required = DbWeight::get() + .reads_writes(2, 1) + .saturating_mul(MBM_WEIGHT_PER_KEY_MULTIPLIER); + let prefix = storage_prefix(b"ParachainStaking", storage_item).to_vec(); + let previous_key = cursor + .map(|key| key.to_vec()) + .unwrap_or_else(|| prefix.clone()); + let mut iter: PrefixIterator = + PrefixIterator::new(prefix, previous_key, decode_twox64_concat_account::); + let mut processed = 0u32; + + loop { + meter + .try_consume(required) + .map_err(|_| SteppedMigrationError::InsufficientWeight { required })?; + + if let Some(account) = iter.next() { + C::remove_lock(lock_id, &account); + processed = processed.saturating_add(1); + + if processed >= MBM_MAX_LOCK_KEYS_PER_STEP || meter.remaining().any_lt(required) { + let cursor = iter + .last_raw_key() + .to_vec() + .try_into() + .map_err(|_| SteppedMigrationError::Failed)?; + log::debug!( + target: "parachain-staking-migration", + "removed {log_subject} staking locks for {processed} accounts", + ); + return Ok(Some(cursor)); + } + } else { + log::debug!( + target: "parachain-staking-migration", + "removed {log_subject} staking locks for {processed} accounts", + ); + return Ok(None); + } + } +} + +#[cfg(feature = "try-runtime")] +fn assert_locks_removed_for_storage( + storage_item: &'static [u8], + lock_id: LockIdentifier, + error: &'static str, +) -> Result<(), TryRuntimeError> +where + T: frame_system::Config + pallet_balances::Config, +{ + let prefix = storage_prefix(b"ParachainStaking", storage_item).to_vec(); + let mut previous_key = prefix.clone(); + + while let Some(next_key) = + sp_io::storage::next_key(&previous_key).filter(|key| key.starts_with(&prefix)) + { + previous_key = next_key; + let raw_key_without_prefix = &previous_key[prefix.len()..]; + let account = + decode_twox64_concat_account::(raw_key_without_prefix, &[]).map_err(|_| { + TryRuntimeError::Other("failed to decode ParachainStaking account storage key") + })?; + let locks = pallet_balances::Pallet::::locks(&account); + ensure!(!locks.iter().any(|lock| lock.id == lock_id), error); + } + + Ok(()) +} + +/// Multi-block migration to remove candidate staking locks. +pub struct RemoveCandidateLocks(PhantomData<(T, C, DbWeight)>); +impl SteppedMigration for RemoveCandidateLocks +where + T: frame_system::Config + pallet_balances::Config, + C: LockableCurrency, + DbWeight: Get, +{ + type Cursor = RawStorageKeyCursor; + type Identifier = [u8; 16]; + + fn id() -> Self::Identifier { + REMOVE_CANDIDATE_LOCKS_MBM_ID + } + + fn step( + cursor: Option, + meter: &mut WeightMeter, + ) -> Result, SteppedMigrationError> { + remove_locks_step::( + cursor, + meter, + b"CandidateInfo", + COLLATOR_LOCK_ID, + "candidate", + ) + } + + #[cfg(feature = "try-runtime")] + fn post_upgrade(_state: Vec) -> Result<(), TryRuntimeError> { + assert_locks_removed_for_storage::( + b"CandidateInfo", + COLLATOR_LOCK_ID, + "candidate staking lock still present after multi-block migration", + ) + } +} + +/// Multi-block migration to remove delegator staking locks. +pub struct RemoveDelegatorLocks(PhantomData<(T, C, DbWeight)>); +impl SteppedMigration for RemoveDelegatorLocks +where + T: frame_system::Config + pallet_balances::Config, + C: LockableCurrency, + DbWeight: Get, +{ + type Cursor = RawStorageKeyCursor; + type Identifier = [u8; 16]; + + fn id() -> Self::Identifier { + REMOVE_DELEGATOR_LOCKS_MBM_ID + } + + fn step( + cursor: Option, + meter: &mut WeightMeter, + ) -> Result, SteppedMigrationError> { + remove_locks_step::( + cursor, + meter, + b"DelegatorState", + DELEGATOR_LOCK_ID, + "delegator", + ) + } + + #[cfg(feature = "try-runtime")] + fn post_upgrade(_state: Vec) -> Result<(), TryRuntimeError> { + assert_locks_removed_for_storage::( + b"DelegatorState", + DELEGATOR_LOCK_ID, + "delegator staking lock still present after multi-block migration", + ) + } +} + +/// Multi-block migration to clear all ParachainStaking storage after participant locks are removed. +pub struct ClearParachainStakingStorage(PhantomData); +impl SteppedMigration for ClearParachainStakingStorage +where + DbWeight: Get, +{ + type Cursor = ClearParachainStakingStorageCursor; + type Identifier = [u8; 16]; + + fn id() -> Self::Identifier { + CLEAR_PARACHAIN_STAKING_STORAGE_MBM_ID + } + + fn step( + cursor: Option, + meter: &mut WeightMeter, + ) -> Result, SteppedMigrationError> { + let base_weight = DbWeight::get().reads(1); + let weight_per_key = DbWeight::get() + .reads_writes(1, 1) + .saturating_mul(MBM_WEIGHT_PER_KEY_MULTIPLIER); + + let (prefix, maybe_cursor, clearing_at_stake, max_keys, log_subject) = match cursor { + None => ( + storage_prefix(b"ParachainStaking", b"AtStake").to_vec(), + None, + true, + MBM_MAX_AT_STAKE_KEYS_PER_STEP, + "AtStake", + ), + Some(ClearParachainStakingStorageCursor::AtStake(cursor)) => ( + storage_prefix(b"ParachainStaking", b"AtStake").to_vec(), + cursor, + true, + MBM_MAX_AT_STAKE_KEYS_PER_STEP, + "AtStake", + ), + Some(ClearParachainStakingStorageCursor::Pallet(cursor)) => ( + Twox128::hash(b"ParachainStaking").to_vec(), + cursor, + false, + MBM_MAX_PALLET_KEYS_PER_STEP, + "ParachainStaking", + ), + }; + let key_budget = meter + .remaining() + .saturating_sub(base_weight) + .checked_div_per_component(&weight_per_key) + .unwrap_or_default() + .min(max_keys.into()); + + if key_budget == 0 { + return Err(SteppedMigrationError::InsufficientWeight { + required: base_weight.saturating_add(weight_per_key), + }); + } + + let result = unhashed::clear_prefix( + &prefix, + Some(key_budget.saturated_into::()), + maybe_cursor.as_ref().map(|cursor| cursor.as_slice()), + ); + let keys_removed = result.unique; + meter.consume( + base_weight.saturating_add(weight_per_key.saturating_mul(keys_removed.into())), + ); + + log::debug!( + target: "parachain-staking-migration", + "cleared {keys_removed} {log_subject} storage keys, done={}", + result.maybe_cursor.is_none(), + ); + + match result.maybe_cursor { + Some(cursor) => { + let cursor = cursor + .try_into() + .map_err(|_| SteppedMigrationError::Failed)?; + Ok(Some(if clearing_at_stake { + ClearParachainStakingStorageCursor::AtStake(Some(cursor)) + } else { + ClearParachainStakingStorageCursor::Pallet(Some(cursor)) + })) + } + None if clearing_at_stake => Ok(Some(ClearParachainStakingStorageCursor::Pallet(None))), + None => Ok(None), + } + } + + #[cfg(feature = "try-runtime")] + fn post_upgrade(_state: Vec) -> Result<(), TryRuntimeError> { + use frame_support::storage::unhashed; + + let prefix = Twox128::hash(b"ParachainStaking"); + ensure!( + !unhashed::contains_prefixed_key(&prefix), + "ParachainStaking storage prefix still has keys after multi-block migration" + ); + + Ok(()) + } +} /// Migration to purge staking storage bloat for `Points` and `AtStake` storage items pub struct InitGenesisMigration(PhantomData); diff --git a/pallets/slp-v2/src/lib.rs b/pallets/slp-v2/src/lib.rs index 7fa5a575f..1790bb211 100644 --- a/pallets/slp-v2/src/lib.rs +++ b/pallets/slp-v2/src/lib.rs @@ -556,7 +556,7 @@ pub mod pallet { staking_protocol: StakingProtocol, delegator: Option>, ) -> DispatchResultWithPostInfo { - Self::ensure_governance_or_operator(origin, staking_protocol)?; + T::ControlOrigin::ensure_origin(origin)?; Self::do_add_delegator(staking_protocol, delegator) } diff --git a/pallets/slp-v2/src/tests/kusama_tests.rs b/pallets/slp-v2/src/tests/kusama_tests.rs index 2c070a953..3baa8be82 100644 --- a/pallets/slp-v2/src/tests/kusama_tests.rs +++ b/pallets/slp-v2/src/tests/kusama_tests.rs @@ -196,6 +196,46 @@ fn add_general_xcm_staking_delegator_should_work() { }); } +#[test] +fn add_delegator_should_reject_protocol_operator() { + new_test_ext().execute_with(|| { + let operator = AccountId::new([1u8; 32]); + let configuration = ProtocolConfigurationV2 { + operator: operator.clone(), + ..CONFIGURATION + }; + + assert_ok!(SlpV2::set_protocol_configuration( + RuntimeOrigin::root(), + GENERAL_XCM_STAKING_BNC, + configuration + )); + + assert_noop!( + SlpV2::add_delegator( + RuntimeOrigin::signed(operator), + GENERAL_XCM_STAKING_BNC, + None + ), + sp_runtime::DispatchError::BadOrigin + ); + assert_eq!( + NextDelegatorIndexByStakingProtocol::::get(GENERAL_XCM_STAKING_BNC), + 0 + ); + + assert_ok!(SlpV2::add_delegator( + RuntimeOrigin::root(), + GENERAL_XCM_STAKING_BNC, + None + )); + assert_eq!( + NextDelegatorIndexByStakingProtocol::::get(GENERAL_XCM_STAKING_BNC), + 1 + ); + }); +} + #[test] fn repeat_add_delegator_should_work() { new_test_ext().execute_with(|| { diff --git a/pallets/slp-v2/src/tests/polkadot_tests.rs b/pallets/slp-v2/src/tests/polkadot_tests.rs index 94ca8ad84..a98a69cc8 100644 --- a/pallets/slp-v2/src/tests/polkadot_tests.rs +++ b/pallets/slp-v2/src/tests/polkadot_tests.rs @@ -320,6 +320,42 @@ fn general_proxy_staking_add_delegator_should_work() { }); } +#[test] +fn add_delegator_should_reject_protocol_operator() { + new_test_ext().execute_with(|| { + let operator = AccountId::new([1u8; 32]); + let configuration = ProtocolConfigurationV2 { + operator: operator.clone(), + ..CONFIGURATION + }; + + assert_ok!(SlpV2::set_protocol_configuration( + RuntimeOrigin::root(), + GENERAL_XCM_STAKING, + configuration + )); + + assert_noop!( + SlpV2::add_delegator(RuntimeOrigin::signed(operator), GENERAL_XCM_STAKING, None), + sp_runtime::DispatchError::BadOrigin + ); + assert_eq!( + NextDelegatorIndexByStakingProtocol::::get(GENERAL_XCM_STAKING), + 0 + ); + + assert_ok!(SlpV2::add_delegator( + RuntimeOrigin::root(), + GENERAL_XCM_STAKING, + None + )); + assert_eq!( + NextDelegatorIndexByStakingProtocol::::get(GENERAL_XCM_STAKING), + 1 + ); + }); +} + #[test] fn repeat_add_delegator_should_work() { new_test_ext().execute_with(|| { diff --git a/pallets/slp-v2/src/weights.rs b/pallets/slp-v2/src/weights.rs index 07178a93e..8b8f6ee1c 100644 --- a/pallets/slp-v2/src/weights.rs +++ b/pallets/slp-v2/src/weights.rs @@ -25,7 +25,7 @@ //! Autogenerated weights for bifrost_slp_v2 //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 53.0.0 -//! DATE: 2026-06-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2026-07-03, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! HOSTNAME: `vps-b02dace3`, CPU: `Intel Core Processor (Haswell, no TSX)` //! WASM-EXECUTION: Compiled, CHAIN: Some("bifrost-polkadot-local"), DB CACHE: 1024 @@ -84,10 +84,10 @@ impl WeightInfo for () { /// Proof: `SlpV2::LedgerByStakingProtocolAndDelegator` (`max_values`: None, `max_size`: Some(101), added: 2576, mode: `MaxEncodedLen`) fn add_delegator() -> Weight { // Proof Size summary in bytes: - // Measured: `382` + // Measured: `349` // Estimated: `3551` - // Minimum execution time: 64_726_000 picoseconds. - Weight::from_parts(70_568_000, 3551) + // Minimum execution time: 65_499_000 picoseconds. + Weight::from_parts(69_625_000, 3551) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } @@ -101,10 +101,10 @@ impl WeightInfo for () { /// Proof: `SlpV2::ValidatorsByStakingProtocolAndDelegator` (`max_values`: None, `max_size`: Some(154454), added: 156929, mode: `MaxEncodedLen`) fn remove_delegator() -> Weight { // Proof Size summary in bytes: - // Measured: `446` + // Measured: `413` // Estimated: `3551` - // Minimum execution time: 52_561_000 picoseconds. - Weight::from_parts(54_603_000, 3551) + // Minimum execution time: 51_953_000 picoseconds. + Weight::from_parts(64_687_000, 3551) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } @@ -116,10 +116,10 @@ impl WeightInfo for () { /// Proof: `SlpV2::ValidatorsByStakingProtocolAndDelegator` (`max_values`: None, `max_size`: Some(154454), added: 156929, mode: `MaxEncodedLen`) fn add_validator() -> Weight { // Proof Size summary in bytes: - // Measured: `507` + // Measured: `474` // Estimated: `157919` - // Minimum execution time: 55_532_000 picoseconds. - Weight::from_parts(58_208_000, 157919) + // Minimum execution time: 56_600_000 picoseconds. + Weight::from_parts(58_955_000, 157919) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -131,10 +131,10 @@ impl WeightInfo for () { /// Proof: `SlpV2::ValidatorsByStakingProtocolAndDelegator` (`max_values`: None, `max_size`: Some(154454), added: 156929, mode: `MaxEncodedLen`) fn remove_validator() -> Weight { // Proof Size summary in bytes: - // Measured: `627` + // Measured: `594` // Estimated: `157919` - // Minimum execution time: 59_021_000 picoseconds. - Weight::from_parts(62_805_000, 157919) + // Minimum execution time: 61_387_000 picoseconds. + Weight::from_parts(77_084_000, 157919) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -142,10 +142,10 @@ impl WeightInfo for () { /// Proof: `SlpV2::ConfigurationByStakingProtocol` (`max_values`: None, `max_size`: Some(711), added: 3186, mode: `MaxEncodedLen`) fn set_protocol_configuration() -> Weight { // Proof Size summary in bytes: - // Measured: `246` + // Measured: `213` // Estimated: `4176` - // Minimum execution time: 36_748_000 picoseconds. - Weight::from_parts(37_815_000, 4176) + // Minimum execution time: 34_666_000 picoseconds. + Weight::from_parts(39_469_000, 4176) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -157,10 +157,10 @@ impl WeightInfo for () { /// Proof: `SlpV2::LedgerByStakingProtocolAndDelegator` (`max_values`: None, `max_size`: Some(101), added: 2576, mode: `MaxEncodedLen`) fn set_ledger() -> Weight { // Proof Size summary in bytes: - // Measured: `570` + // Measured: `537` // Estimated: `3566` - // Minimum execution time: 56_904_000 picoseconds. - Weight::from_parts(59_748_000, 3566) + // Minimum execution time: 55_550_000 picoseconds. + Weight::from_parts(71_331_000, 3566) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -172,10 +172,10 @@ impl WeightInfo for () { /// Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(118), added: 2593, mode: `MaxEncodedLen`) fn transfer_to() -> Weight { // Proof Size summary in bytes: - // Measured: `995` + // Measured: `929` // Estimated: `3583` - // Minimum execution time: 63_281_000 picoseconds. - Weight::from_parts(64_421_000, 3583) + // Minimum execution time: 65_084_000 picoseconds. + Weight::from_parts(80_059_000, 3583) .saturating_add(RocksDbWeight::get().reads(3_u64)) } /// Storage: `VtokenMinting::OngoingTimeUnit` (r:1 w:1) @@ -184,8 +184,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `4` // Estimated: `3469` - // Minimum execution time: 25_723_000 picoseconds. - Weight::from_parts(26_797_000, 3469) + // Minimum execution time: 27_092_000 picoseconds. + Weight::from_parts(30_164_000, 3469) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -207,10 +207,10 @@ impl WeightInfo for () { /// Proof: `SlpV2::LedgerByStakingProtocolAndDelegator` (`max_values`: None, `max_size`: Some(101), added: 2576, mode: `MaxEncodedLen`) fn update_token_exchange_rate() -> Weight { // Proof Size summary in bytes: - // Measured: `531` + // Measured: `498` // Estimated: `4176` - // Minimum execution time: 88_598_000 picoseconds. - Weight::from_parts(93_305_000, 4176) + // Minimum execution time: 88_389_000 picoseconds. + Weight::from_parts(105_305_000, 4176) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -220,10 +220,10 @@ impl WeightInfo for () { /// Proof: `SlpV2::XCMExecutorWhitelist` (`max_values`: None, `max_size`: Some(32948), added: 35423, mode: `MaxEncodedLen`) fn update_xcm_executor_whitelist() -> Weight { // Proof Size summary in bytes: - // Measured: `447` + // Measured: `414` // Estimated: `36413` - // Minimum execution time: 168_374_000 picoseconds. - Weight::from_parts(174_007_000, 36413) + // Minimum execution time: 175_105_000 picoseconds. + Weight::from_parts(197_832_000, 36413) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -239,10 +239,10 @@ impl WeightInfo for () { /// Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(38), added: 2513, mode: `MaxEncodedLen`) fn general_xcm_executor() -> Weight { // Proof Size summary in bytes: - // Measured: `1060` + // Measured: `994` // Estimated: `36413` - // Minimum execution time: 96_763_000 picoseconds. - Weight::from_parts(100_457_000, 36413) + // Minimum execution time: 98_888_000 picoseconds. + Weight::from_parts(113_804_000, 36413) .saturating_add(RocksDbWeight::get().reads(6_u64)) } /// Storage: `ParachainSystem::ValidationData` (r:1 w:0) @@ -255,10 +255,10 @@ impl WeightInfo for () { /// Proof: `SlpV2::ValidatorBoostList` (`max_values`: None, `max_size`: Some(155429), added: 157904, mode: `MaxEncodedLen`) fn set_validator_boost_list() -> Weight { // Proof Size summary in bytes: - // Measured: `355` + // Measured: `322` // Estimated: `157919` - // Minimum execution time: 60_547_000 picoseconds. - Weight::from_parts(63_813_000, 157919) + // Minimum execution time: 59_928_000 picoseconds. + Weight::from_parts(68_456_000, 157919) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -272,10 +272,10 @@ impl WeightInfo for () { /// Proof: `SlpV2::ValidatorsByStakingProtocolAndDelegator` (`max_values`: None, `max_size`: Some(154454), added: 156929, mode: `MaxEncodedLen`) fn add_to_validator_boost_list() -> Weight { // Proof Size summary in bytes: - // Measured: `355` + // Measured: `322` // Estimated: `158894` - // Minimum execution time: 60_652_000 picoseconds. - Weight::from_parts(64_256_000, 158894) + // Minimum execution time: 61_941_000 picoseconds. + Weight::from_parts(67_246_000, 158894) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -283,10 +283,10 @@ impl WeightInfo for () { /// Proof: `SlpV2::ValidatorBoostList` (`max_values`: None, `max_size`: Some(155429), added: 157904, mode: `MaxEncodedLen`) fn remove_from_validator_boost_list() -> Weight { // Proof Size summary in bytes: - // Measured: `375` + // Measured: `342` // Estimated: `158894` - // Minimum execution time: 40_586_000 picoseconds. - Weight::from_parts(42_074_000, 158894) + // Minimum execution time: 40_258_000 picoseconds. + Weight::from_parts(43_744_000, 158894) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -296,10 +296,10 @@ impl WeightInfo for () { /// Proof: `ParachainSystem::ValidationData` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn clean_outdated_validator_boost_list() -> Weight { // Proof Size summary in bytes: - // Measured: `551` + // Measured: `518` // Estimated: `158894` - // Minimum execution time: 51_861_000 picoseconds. - Weight::from_parts(57_114_000, 158894) + // Minimum execution time: 52_489_000 picoseconds. + Weight::from_parts(55_051_000, 158894) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } diff --git a/pallets/slpx/src/weights.rs b/pallets/slpx/src/weights.rs index b079eb426..4c3474047 100644 --- a/pallets/slpx/src/weights.rs +++ b/pallets/slpx/src/weights.rs @@ -25,7 +25,7 @@ //! Autogenerated weights for bifrost_slpx //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 53.0.0 -//! DATE: 2026-06-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2026-07-03, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! HOSTNAME: `vps-b02dace3`, CPU: `Intel Core Processor (Haswell, no TSX)` //! WASM-EXECUTION: Compiled, CHAIN: Some("bifrost-kusama-local"), DB CACHE: 1024 @@ -74,8 +74,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `4` // Estimated: `3803` - // Minimum execution time: 31_554_000 picoseconds. - Weight::from_parts(33_377_000, 3803) + // Minimum execution time: 30_493_000 picoseconds. + Weight::from_parts(32_794_000, 3803) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -85,8 +85,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `81` // Estimated: `3803` - // Minimum execution time: 34_577_000 picoseconds. - Weight::from_parts(37_167_000, 3803) + // Minimum execution time: 35_137_000 picoseconds. + Weight::from_parts(36_522_000, 3803) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -96,8 +96,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 19_933_000 picoseconds. - Weight::from_parts(22_767_000, 0) + // Minimum execution time: 20_151_000 picoseconds. + Weight::from_parts(40_907_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `Slpx::TransferToFee` (r:0 w:1) @@ -106,8 +106,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 20_418_000 picoseconds. - Weight::from_parts(21_525_000, 0) + // Minimum execution time: 19_923_000 picoseconds. + Weight::from_parts(20_832_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `Slpx::WhitelistAccountId` (r:1 w:0) @@ -120,8 +120,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `339` // Estimated: `129987` - // Minimum execution time: 55_885_000 picoseconds. - Weight::from_parts(60_568_000, 129987) + // Minimum execution time: 54_893_000 picoseconds. + Weight::from_parts(56_336_000, 129987) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -165,8 +165,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1408` // Estimated: `4873` - // Minimum execution time: 237_790_000 picoseconds. - Weight::from_parts(243_536_000, 4873) + // Minimum execution time: 223_545_000 picoseconds. + Weight::from_parts(242_767_000, 4873) .saturating_add(RocksDbWeight::get().reads(18_u64)) .saturating_add(RocksDbWeight::get().writes(10_u64)) } @@ -180,8 +180,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `339` // Estimated: `129987` - // Minimum execution time: 55_926_000 picoseconds. - Weight::from_parts(67_691_000, 129987) + // Minimum execution time: 53_032_000 picoseconds. + Weight::from_parts(54_839_000, 129987) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -211,10 +211,10 @@ impl WeightInfo for () { /// Proof: `ChannelCommission::PeriodVtokenTotalMint` (`max_values`: None, `max_size`: None, mode: `Measured`) fn async_mint() -> Weight { // Proof Size summary in bytes: - // Measured: `1576` + // Measured: `1539` // Estimated: `8769` - // Minimum execution time: 261_175_000 picoseconds. - Weight::from_parts(286_302_000, 8769) + // Minimum execution time: 241_101_000 picoseconds. + Weight::from_parts(267_595_000, 8769) .saturating_add(RocksDbWeight::get().reads(16_u64)) .saturating_add(RocksDbWeight::get().writes(9_u64)) } @@ -224,8 +224,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 17_231_000 picoseconds. - Weight::from_parts(18_264_000, 0) + // Minimum execution time: 16_754_000 picoseconds. + Weight::from_parts(17_257_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `Slpx::AsyncMintConfig` (r:1 w:0) @@ -250,10 +250,10 @@ impl WeightInfo for () { /// Proof: `VtokenMinting::ExchangeRateCheckEnabled` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn force_increase_hyperbridge_reserve() -> Weight { // Proof Size summary in bytes: - // Measured: `1357` - // Estimated: `4822` - // Minimum execution time: 178_547_000 picoseconds. - Weight::from_parts(184_674_000, 4822) + // Measured: `1282` + // Estimated: `4747` + // Minimum execution time: 163_004_000 picoseconds. + Weight::from_parts(166_032_000, 4747) .saturating_add(RocksDbWeight::get().reads(10_u64)) .saturating_add(RocksDbWeight::get().writes(5_u64)) } @@ -263,8 +263,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 9_345_000 picoseconds. - Weight::from_parts(10_359_000, 0) + // Minimum execution time: 10_985_000 picoseconds. + Weight::from_parts(21_286_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } } diff --git a/pallets/stable-pool/src/weights.rs b/pallets/stable-pool/src/weights.rs index ca6305818..2cd693a7c 100644 --- a/pallets/stable-pool/src/weights.rs +++ b/pallets/stable-pool/src/weights.rs @@ -25,7 +25,7 @@ //! Autogenerated weights for bifrost_stable_pool //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 53.0.0 -//! DATE: 2026-06-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2026-07-03, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! HOSTNAME: `vps-b02dace3`, CPU: `Intel Core Processor (Haswell, no TSX)` //! WASM-EXECUTION: Compiled, CHAIN: Some("bifrost-kusama-local"), DB CACHE: 1024 @@ -81,8 +81,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `413` // Estimated: `3878` - // Minimum execution time: 69_082_000 picoseconds. - Weight::from_parts(72_349_000, 3878) + // Minimum execution time: 72_943_000 picoseconds. + Weight::from_parts(80_019_000, 3878) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } @@ -94,8 +94,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `230` // Estimated: `8645` - // Minimum execution time: 61_608_000 picoseconds. - Weight::from_parts(66_334_000, 8645) + // Minimum execution time: 66_380_000 picoseconds. + Weight::from_parts(69_390_000, 8645) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -105,8 +105,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 17_723_000 picoseconds. - Weight::from_parts(20_826_000, 0) + // Minimum execution time: 20_576_000 picoseconds. + Weight::from_parts(21_537_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `StableAsset::TokenRateHardcap` (r:0 w:1) @@ -115,8 +115,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 17_181_000 picoseconds. - Weight::from_parts(19_703_000, 0) + // Minimum execution time: 20_056_000 picoseconds. + Weight::from_parts(20_939_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `StableAsset::Pools` (r:1 w:1) @@ -135,8 +135,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1649` // Estimated: `13955` - // Minimum execution time: 349_710_000 picoseconds. - Weight::from_parts(376_549_000, 13955) + // Minimum execution time: 354_376_000 picoseconds. + Weight::from_parts(376_242_000, 13955) .saturating_add(RocksDbWeight::get().reads(14_u64)) .saturating_add(RocksDbWeight::get().writes(9_u64)) } @@ -158,8 +158,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1934` // Estimated: `13955` - // Minimum execution time: 607_584_000 picoseconds. - Weight::from_parts(709_658_000, 13955) + // Minimum execution time: 372_625_000 picoseconds. + Weight::from_parts(391_197_000, 13955) .saturating_add(RocksDbWeight::get().reads(16_u64)) .saturating_add(RocksDbWeight::get().writes(7_u64)) } @@ -179,8 +179,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1831` // Estimated: `13955` - // Minimum execution time: 350_064_000 picoseconds. - Weight::from_parts(409_288_000, 13955) + // Minimum execution time: 396_175_000 picoseconds. + Weight::from_parts(418_222_000, 13955) .saturating_add(RocksDbWeight::get().reads(13_u64)) .saturating_add(RocksDbWeight::get().writes(7_u64)) } @@ -200,8 +200,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1747` // Estimated: `11362` - // Minimum execution time: 322_401_000 picoseconds. - Weight::from_parts(391_760_000, 11362) + // Minimum execution time: 366_601_000 picoseconds. + Weight::from_parts(370_016_000, 11362) .saturating_add(RocksDbWeight::get().reads(11_u64)) .saturating_add(RocksDbWeight::get().writes(5_u64)) } @@ -221,8 +221,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1831` // Estimated: `13955` - // Minimum execution time: 298_091_000 picoseconds. - Weight::from_parts(362_542_000, 13955) + // Minimum execution time: 337_094_000 picoseconds. + Weight::from_parts(340_514_000, 13955) .saturating_add(RocksDbWeight::get().reads(13_u64)) .saturating_add(RocksDbWeight::get().writes(7_u64)) } @@ -232,8 +232,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `446` // Estimated: `3911` - // Minimum execution time: 36_342_000 picoseconds. - Weight::from_parts(40_689_000, 3911) + // Minimum execution time: 36_650_000 picoseconds. + Weight::from_parts(40_331_000, 3911) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -243,8 +243,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `446` // Estimated: `3911` - // Minimum execution time: 36_320_000 picoseconds. - Weight::from_parts(38_018_000, 3911) + // Minimum execution time: 38_100_000 picoseconds. + Weight::from_parts(38_965_000, 3911) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -254,8 +254,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `446` // Estimated: `3911` - // Minimum execution time: 37_303_000 picoseconds. - Weight::from_parts(38_493_000, 3911) + // Minimum execution time: 38_185_000 picoseconds. + Weight::from_parts(39_058_000, 3911) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } diff --git a/pallets/system-staking/src/weights.rs b/pallets/system-staking/src/weights.rs index 476ef82d5..1f972665f 100644 --- a/pallets/system-staking/src/weights.rs +++ b/pallets/system-staking/src/weights.rs @@ -25,7 +25,7 @@ //! Autogenerated weights for bifrost_system_staking //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 53.0.0 -//! DATE: 2026-06-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2026-07-03, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! HOSTNAME: `vps-b02dace3`, CPU: `Intel Core Processor (Haswell, no TSX)` //! WASM-EXECUTION: Compiled, CHAIN: Some("bifrost-kusama-local"), DB CACHE: 1024 @@ -74,8 +74,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `369` // Estimated: `6309` - // Minimum execution time: 28_081_000 picoseconds. - Weight::from_parts(29_871_000, 6309) + // Minimum execution time: 28_315_000 picoseconds. + Weight::from_parts(30_731_000, 6309) .saturating_add(RocksDbWeight::get().reads(4_u64)) } /// Storage: `SystemStaking::TokenStatus` (r:1 w:1) @@ -86,8 +86,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `109` // Estimated: `3574` - // Minimum execution time: 33_596_000 picoseconds. - Weight::from_parts(34_847_000, 3574) + // Minimum execution time: 33_362_000 picoseconds. + Weight::from_parts(35_497_000, 3574) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -119,8 +119,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1605` // Estimated: `8769` - // Minimum execution time: 289_655_000 picoseconds. - Weight::from_parts(326_469_000, 8769) + // Minimum execution time: 288_579_000 picoseconds. + Weight::from_parts(307_994_000, 8769) .saturating_add(RocksDbWeight::get().reads(17_u64)) .saturating_add(RocksDbWeight::get().writes(11_u64)) } @@ -138,23 +138,23 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `808` // Estimated: `4273` - // Minimum execution time: 74_650_000 picoseconds. - Weight::from_parts(84_983_000, 4273) + // Minimum execution time: 81_135_000 picoseconds. + Weight::from_parts(87_303_000, 4273) .saturating_add(RocksDbWeight::get().reads(5_u64)) } fn on_redeem_success() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 723_000 picoseconds. - Weight::from_parts(774_000, 0) + // Minimum execution time: 740_000 picoseconds. + Weight::from_parts(821_000, 0) } fn on_redeemed() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 772_000 picoseconds. - Weight::from_parts(861_000, 0) + // Minimum execution time: 699_000 picoseconds. + Weight::from_parts(756_000, 0) } /// Storage: `SystemStaking::TokenList` (r:1 w:1) /// Proof: `SystemStaking::TokenList` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) @@ -164,8 +164,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `169` // Estimated: `1654` - // Minimum execution time: 21_969_000 picoseconds. - Weight::from_parts(24_855_000, 1654) + // Minimum execution time: 24_431_000 picoseconds. + Weight::from_parts(25_524_000, 1654) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } diff --git a/pallets/token-issuer/src/weights.rs b/pallets/token-issuer/src/weights.rs index c0f8c8770..d6c8a8e43 100644 --- a/pallets/token-issuer/src/weights.rs +++ b/pallets/token-issuer/src/weights.rs @@ -25,7 +25,7 @@ //! Autogenerated weights for bifrost_token_issuer //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 53.0.0 -//! DATE: 2026-06-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2026-07-03, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! HOSTNAME: `vps-b02dace3`, CPU: `Intel Core Processor (Haswell, no TSX)` //! WASM-EXECUTION: Compiled, CHAIN: Some("bifrost-kusama-local"), DB CACHE: 1024 @@ -67,10 +67,10 @@ impl WeightInfo for () { /// Proof: `TokenIssuer::IssueWhiteList` (`max_values`: None, `max_size`: None, mode: `Measured`) fn add_to_issue_whitelist() -> Weight { // Proof Size summary in bytes: - // Measured: `109` - // Estimated: `3574` - // Minimum execution time: 27_142_000 picoseconds. - Weight::from_parts(33_713_000, 3574) + // Measured: `76` + // Estimated: `3541` + // Minimum execution time: 32_594_000 picoseconds. + Weight::from_parts(35_486_000, 3541) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -78,10 +78,10 @@ impl WeightInfo for () { /// Proof: `TokenIssuer::IssueWhiteList` (`max_values`: None, `max_size`: None, mode: `Measured`) fn remove_from_issue_whitelist() -> Weight { // Proof Size summary in bytes: - // Measured: `187` - // Estimated: `3652` - // Minimum execution time: 31_225_000 picoseconds. - Weight::from_parts(32_731_000, 3652) + // Measured: `154` + // Estimated: `3619` + // Minimum execution time: 36_697_000 picoseconds. + Weight::from_parts(37_607_000, 3619) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -89,10 +89,10 @@ impl WeightInfo for () { /// Proof: `TokenIssuer::TransferWhiteList` (`max_values`: None, `max_size`: None, mode: `Measured`) fn add_to_transfer_whitelist() -> Weight { // Proof Size summary in bytes: - // Measured: `109` - // Estimated: `3574` - // Minimum execution time: 29_682_000 picoseconds. - Weight::from_parts(33_325_000, 3574) + // Measured: `76` + // Estimated: `3541` + // Minimum execution time: 31_586_000 picoseconds. + Weight::from_parts(34_779_000, 3541) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -100,10 +100,10 @@ impl WeightInfo for () { /// Proof: `TokenIssuer::TransferWhiteList` (`max_values`: None, `max_size`: None, mode: `Measured`) fn remove_from_transfer_whitelist() -> Weight { // Proof Size summary in bytes: - // Measured: `187` - // Estimated: `3652` - // Minimum execution time: 31_340_000 picoseconds. - Weight::from_parts(43_903_000, 3652) + // Measured: `154` + // Estimated: `3619` + // Minimum execution time: 36_191_000 picoseconds. + Weight::from_parts(37_702_000, 3619) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -117,10 +117,10 @@ impl WeightInfo for () { /// Proof: `AssetRegistry::CurrencyMetadatas` (`max_values`: None, `max_size`: None, mode: `Measured`) fn issue() -> Weight { // Proof Size summary in bytes: - // Measured: `646` - // Estimated: `4111` - // Minimum execution time: 90_959_000 picoseconds. - Weight::from_parts(95_657_000, 4111) + // Measured: `613` + // Estimated: `4078` + // Minimum execution time: 98_633_000 picoseconds. + Weight::from_parts(105_362_000, 4078) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -134,10 +134,10 @@ impl WeightInfo for () { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn transfer() -> Weight { // Proof Size summary in bytes: - // Measured: `917` + // Measured: `884` // Estimated: `6176` - // Minimum execution time: 114_253_000 picoseconds. - Weight::from_parts(119_729_000, 6176) + // Minimum execution time: 109_331_000 picoseconds. + Weight::from_parts(138_687_000, 6176) .saturating_add(RocksDbWeight::get().reads(5_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } diff --git a/pallets/vbnc-convert/src/weights.rs b/pallets/vbnc-convert/src/weights.rs index 43a0b64dd..7dc68ff9a 100644 --- a/pallets/vbnc-convert/src/weights.rs +++ b/pallets/vbnc-convert/src/weights.rs @@ -25,7 +25,7 @@ //! Autogenerated weights for bifrost_vbnc_convert //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 53.0.0 -//! DATE: 2026-06-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2026-07-03, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! HOSTNAME: `vps-b02dace3`, CPU: `Intel Core Processor (Haswell, no TSX)` //! WASM-EXECUTION: Compiled, CHAIN: Some("bifrost-kusama-local"), DB CACHE: 1024 @@ -71,8 +71,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `959` // Estimated: `8769` - // Minimum execution time: 186_361_000 picoseconds. - Weight::from_parts(191_236_000, 8769) + // Minimum execution time: 182_731_000 picoseconds. + Weight::from_parts(185_438_000, 8769) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(5_u64)) } @@ -86,8 +86,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `691` // Estimated: `6176` - // Minimum execution time: 105_334_000 picoseconds. - Weight::from_parts(110_681_000, 6176) + // Minimum execution time: 107_065_000 picoseconds. + Weight::from_parts(110_111_000, 6176) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } diff --git a/pallets/vesting/src/weights.rs b/pallets/vesting/src/weights.rs index 54170a847..394783178 100644 --- a/pallets/vesting/src/weights.rs +++ b/pallets/vesting/src/weights.rs @@ -25,7 +25,7 @@ //! Autogenerated weights for bifrost_vesting //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 53.0.0 -//! DATE: 2026-06-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2026-07-03, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! HOSTNAME: `vps-b02dace3`, CPU: `Intel Core Processor (Haswell, no TSX)` //! WASM-EXECUTION: Compiled, CHAIN: Some("bifrost-kusama-local"), DB CACHE: 1024 @@ -82,14 +82,16 @@ impl WeightInfo for () { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// The range of component `l` is `[0, 50]`. /// The range of component `s` is `[2, 28]`. - fn vest_locked(l: u32, _s: u32, ) -> Weight { + fn vest_locked(l: u32, s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `1148 + l * (25 ±0)` // Estimated: `4764 + l * (25 ±0)` - // Minimum execution time: 90_840_000 picoseconds. - Weight::from_parts(104_747_086, 4764) - // Standard Error: 21_271 - .saturating_add(Weight::from_parts(179_781, 0).saturating_mul(l.into())) + // Minimum execution time: 90_410_000 picoseconds. + Weight::from_parts(95_584_458, 4764) + // Standard Error: 41_304 + .saturating_add(Weight::from_parts(174_450, 0).saturating_mul(l.into())) + // Standard Error: 78_168 + .saturating_add(Weight::from_parts(655_677, 0).saturating_mul(s.into())) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 25).saturating_mul(l.into())) @@ -114,10 +116,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1148 + l * (25 ±0)` // Estimated: `4764 + l * (25 ±0)` - // Minimum execution time: 85_254_000 picoseconds. - Weight::from_parts(106_925_204, 4764) - // Standard Error: 56_751 - .saturating_add(Weight::from_parts(133_552, 0).saturating_mul(s.into())) + // Minimum execution time: 92_471_000 picoseconds. + Weight::from_parts(118_218_134, 4764) + // Standard Error: 67_699 + .saturating_add(Weight::from_parts(76_241, 0).saturating_mul(s.into())) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 25).saturating_mul(l.into())) @@ -138,14 +140,16 @@ impl WeightInfo for () { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// The range of component `l` is `[0, 50]`. /// The range of component `s` is `[2, 28]`. - fn vest_other_locked(l: u32, _s: u32, ) -> Weight { + fn vest_other_locked(l: u32, s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `1185 + l * (25 ±0)` // Estimated: `4764 + l * (25 ±0)` - // Minimum execution time: 87_598_000 picoseconds. - Weight::from_parts(123_148_625, 4764) - // Standard Error: 30_392 - .saturating_add(Weight::from_parts(54_386, 0).saturating_mul(l.into())) + // Minimum execution time: 93_012_000 picoseconds. + Weight::from_parts(102_712_851, 4764) + // Standard Error: 9_313 + .saturating_add(Weight::from_parts(129_254, 0).saturating_mul(l.into())) + // Standard Error: 17_624 + .saturating_add(Weight::from_parts(41_637, 0).saturating_mul(s.into())) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 25).saturating_mul(l.into())) @@ -166,14 +170,16 @@ impl WeightInfo for () { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// The range of component `l` is `[0, 50]`. /// The range of component `s` is `[2, 28]`. - fn vest_other_unlocked(l: u32, _s: u32, ) -> Weight { + fn vest_other_unlocked(l: u32, s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `1185 + l * (25 ±0)` // Estimated: `4764 + l * (25 ±0)` - // Minimum execution time: 93_185_000 picoseconds. - Weight::from_parts(119_403_508, 4764) - // Standard Error: 21_785 - .saturating_add(Weight::from_parts(97_305, 0).saturating_mul(l.into())) + // Minimum execution time: 90_889_000 picoseconds. + Weight::from_parts(100_966_144, 4764) + // Standard Error: 25_698 + .saturating_add(Weight::from_parts(341_939, 0).saturating_mul(l.into())) + // Standard Error: 48_633 + .saturating_add(Weight::from_parts(100_858, 0).saturating_mul(s.into())) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 25).saturating_mul(l.into())) @@ -194,14 +200,12 @@ impl WeightInfo for () { /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`) /// The range of component `l` is `[0, 50]`. /// The range of component `s` is `[2, 28]`. - fn vested_transfer(l: u32, _s: u32, ) -> Weight { + fn vested_transfer(_l: u32, _s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `931` // Estimated: `4764` - // Minimum execution time: 150_122_000 picoseconds. - Weight::from_parts(176_935_653, 4764) - // Standard Error: 29_955 - .saturating_add(Weight::from_parts(184_486, 0).saturating_mul(l.into())) + // Minimum execution time: 169_266_000 picoseconds. + Weight::from_parts(204_160_225, 4764) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -225,12 +229,12 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1034` // Estimated: `6196` - // Minimum execution time: 152_345_000 picoseconds. - Weight::from_parts(169_410_311, 6196) - // Standard Error: 50_734 - .saturating_add(Weight::from_parts(114_874, 0).saturating_mul(l.into())) - // Standard Error: 96_013 - .saturating_add(Weight::from_parts(903_380, 0).saturating_mul(s.into())) + // Minimum execution time: 169_919_000 picoseconds. + Weight::from_parts(198_376_312, 6196) + // Standard Error: 23_293 + .saturating_add(Weight::from_parts(45_811, 0).saturating_mul(l.into())) + // Standard Error: 44_082 + .saturating_add(Weight::from_parts(77_042, 0).saturating_mul(s.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } @@ -248,14 +252,16 @@ impl WeightInfo for () { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// The range of component `l` is `[0, 50]`. /// The range of component `s` is `[2, 28]`. - fn not_unlocking_merge_schedules(l: u32, _s: u32, ) -> Weight { + fn not_unlocking_merge_schedules(l: u32, s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `1185 + l * (25 ±0)` // Estimated: `4764 + l * (25 ±0)` - // Minimum execution time: 85_851_000 picoseconds. - Weight::from_parts(104_249_980, 4764) - // Standard Error: 26_696 - .saturating_add(Weight::from_parts(106_460, 0).saturating_mul(l.into())) + // Minimum execution time: 98_188_000 picoseconds. + Weight::from_parts(107_517_787, 4764) + // Standard Error: 13_767 + .saturating_add(Weight::from_parts(145_835, 0).saturating_mul(l.into())) + // Standard Error: 26_054 + .saturating_add(Weight::from_parts(113_907, 0).saturating_mul(s.into())) .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 25).saturating_mul(l.into())) @@ -278,12 +284,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1185 + l * (25 ±0)` // Estimated: `4764 + l * (25 ±0)` - // Minimum execution time: 90_819_000 picoseconds. - Weight::from_parts(100_537_318, 4764) - // Standard Error: 32_324 - .saturating_add(Weight::from_parts(281_836, 0).saturating_mul(l.into())) - // Standard Error: 61_173 - .saturating_add(Weight::from_parts(67_740, 0).saturating_mul(s.into())) + // Minimum execution time: 93_199_000 picoseconds. + Weight::from_parts(109_153_871, 4764) + // Standard Error: 30_579 + .saturating_add(Weight::from_parts(114_979, 0).saturating_mul(s.into())) .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 25).saturating_mul(l.into())) @@ -295,10 +299,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `500 + x * (36 ±0)` // Estimated: `4522` - // Minimum execution time: 18_771_000 picoseconds. - Weight::from_parts(21_662_741, 4522) - // Standard Error: 11_829 - .saturating_add(Weight::from_parts(79_128, 0).saturating_mul(x.into())) + // Minimum execution time: 20_049_000 picoseconds. + Weight::from_parts(21_720_611, 4522) + // Standard Error: 1_502 + .saturating_add(Weight::from_parts(50_076, 0).saturating_mul(x.into())) .saturating_add(RocksDbWeight::get().reads(1_u64)) } } diff --git a/pallets/vstoken-conversion/src/weights.rs b/pallets/vstoken-conversion/src/weights.rs index 029d803d9..68bb6a449 100644 --- a/pallets/vstoken-conversion/src/weights.rs +++ b/pallets/vstoken-conversion/src/weights.rs @@ -25,7 +25,7 @@ //! Autogenerated weights for bifrost_vstoken_conversion //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 53.0.0 -//! DATE: 2026-06-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2026-07-03, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! HOSTNAME: `vps-b02dace3`, CPU: `Intel Core Processor (Haswell, no TSX)` //! WASM-EXECUTION: Compiled, CHAIN: Some("bifrost-kusama-local"), DB CACHE: 1024 @@ -68,8 +68,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `109` // Estimated: `1517` - // Minimum execution time: 23_735_000 picoseconds. - Weight::from_parts(25_556_000, 1517) + // Minimum execution time: 41_653_000 picoseconds. + Weight::from_parts(49_983_000, 1517) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -79,8 +79,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `109` // Estimated: `3479` - // Minimum execution time: 26_934_000 picoseconds. - Weight::from_parts(28_307_000, 3479) + // Minimum execution time: 27_257_000 picoseconds. + Weight::from_parts(52_315_000, 3479) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -90,8 +90,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `109` // Estimated: `1489` - // Minimum execution time: 23_575_000 picoseconds. - Weight::from_parts(24_516_000, 1489) + // Minimum execution time: 23_697_000 picoseconds. + Weight::from_parts(25_066_000, 1489) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -113,8 +113,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1427` // Estimated: `11362` - // Minimum execution time: 231_670_000 picoseconds. - Weight::from_parts(241_278_000, 11362) + // Minimum execution time: 233_885_000 picoseconds. + Weight::from_parts(254_143_000, 11362) .saturating_add(RocksDbWeight::get().reads(14_u64)) .saturating_add(RocksDbWeight::get().writes(9_u64)) } @@ -136,8 +136,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1419` // Estimated: `11362` - // Minimum execution time: 216_629_000 picoseconds. - Weight::from_parts(230_974_000, 11362) + // Minimum execution time: 205_996_000 picoseconds. + Weight::from_parts(243_895_000, 11362) .saturating_add(RocksDbWeight::get().reads(13_u64)) .saturating_add(RocksDbWeight::get().writes(7_u64)) } diff --git a/pallets/vtoken-minting/src/weights.rs b/pallets/vtoken-minting/src/weights.rs index c5af393b6..a453a6594 100644 --- a/pallets/vtoken-minting/src/weights.rs +++ b/pallets/vtoken-minting/src/weights.rs @@ -25,7 +25,7 @@ //! Autogenerated weights for bifrost_vtoken_minting //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 53.0.0 -//! DATE: 2026-06-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2026-07-03, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! HOSTNAME: `vps-b02dace3`, CPU: `Intel Core Processor (Haswell, no TSX)` //! WASM-EXECUTION: Compiled, CHAIN: Some("bifrost-kusama-local"), DB CACHE: 1024 @@ -85,8 +85,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `114` // Estimated: `3579` - // Minimum execution time: 29_877_000 picoseconds. - Weight::from_parts(31_279_000, 3579) + // Minimum execution time: 29_482_000 picoseconds. + Weight::from_parts(32_348_000, 3579) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -96,8 +96,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `114` // Estimated: `3579` - // Minimum execution time: 30_038_000 picoseconds. - Weight::from_parts(31_438_000, 3579) + // Minimum execution time: 27_398_000 picoseconds. + Weight::from_parts(31_633_000, 3579) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -107,8 +107,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `114` // Estimated: `3579` - // Minimum execution time: 30_519_000 picoseconds. - Weight::from_parts(31_459_000, 3579) + // Minimum execution time: 28_454_000 picoseconds. + Weight::from_parts(32_225_000, 3579) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -118,8 +118,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `114` // Estimated: `3579` - // Minimum execution time: 30_264_000 picoseconds. - Weight::from_parts(31_213_000, 3579) + // Minimum execution time: 29_367_000 picoseconds. + Weight::from_parts(32_433_000, 3579) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -129,8 +129,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `164` // Estimated: `3629` - // Minimum execution time: 33_436_000 picoseconds. - Weight::from_parts(34_257_000, 3629) + // Minimum execution time: 31_009_000 picoseconds. + Weight::from_parts(34_182_000, 3629) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -140,8 +140,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `114` // Estimated: `1599` - // Minimum execution time: 27_053_000 picoseconds. - Weight::from_parts(27_538_000, 1599) + // Minimum execution time: 26_325_000 picoseconds. + Weight::from_parts(27_364_000, 1599) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -151,8 +151,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `114` // Estimated: `1599` - // Minimum execution time: 26_422_000 picoseconds. - Weight::from_parts(27_309_000, 1599) + // Minimum execution time: 24_897_000 picoseconds. + Weight::from_parts(26_878_000, 1599) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -162,8 +162,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `114` // Estimated: `3579` - // Minimum execution time: 30_394_000 picoseconds. - Weight::from_parts(31_141_000, 3579) + // Minimum execution time: 29_225_000 picoseconds. + Weight::from_parts(31_052_000, 3579) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -173,8 +173,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `114` // Estimated: `3579` - // Minimum execution time: 31_468_000 picoseconds. - Weight::from_parts(32_060_000, 3579) + // Minimum execution time: 28_230_000 picoseconds. + Weight::from_parts(30_658_000, 3579) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -184,8 +184,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `114` // Estimated: `3579` - // Minimum execution time: 30_489_000 picoseconds. - Weight::from_parts(31_958_000, 3579) + // Minimum execution time: 29_104_000 picoseconds. + Weight::from_parts(31_299_000, 3579) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -215,8 +215,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1175` // Estimated: `8769` - // Minimum execution time: 222_162_000 picoseconds. - Weight::from_parts(229_559_000, 8769) + // Minimum execution time: 222_369_000 picoseconds. + Weight::from_parts(241_841_000, 8769) .saturating_add(RocksDbWeight::get().reads(14_u64)) .saturating_add(RocksDbWeight::get().writes(8_u64)) } @@ -262,8 +262,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1662` // Estimated: `6176` - // Minimum execution time: 295_020_000 picoseconds. - Weight::from_parts(304_022_000, 6176) + // Minimum execution time: 282_690_000 picoseconds. + Weight::from_parts(301_467_000, 6176) .saturating_add(RocksDbWeight::get().reads(20_u64)) .saturating_add(RocksDbWeight::get().writes(12_u64)) } @@ -279,8 +279,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1094` // Estimated: `6176` - // Minimum execution time: 119_430_000 picoseconds. - Weight::from_parts(122_886_000, 6176) + // Minimum execution time: 112_663_000 picoseconds. + Weight::from_parts(127_169_000, 6176) .saturating_add(RocksDbWeight::get().reads(5_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -314,8 +314,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1832` // Estimated: `8769` - // Minimum execution time: 273_411_000 picoseconds. - Weight::from_parts(301_190_000, 8769) + // Minimum execution time: 262_896_000 picoseconds. + Weight::from_parts(284_729_000, 8769) .saturating_add(RocksDbWeight::get().reads(16_u64)) .saturating_add(RocksDbWeight::get().writes(11_u64)) } @@ -349,8 +349,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1869` // Estimated: `8769` - // Minimum execution time: 267_632_000 picoseconds. - Weight::from_parts(273_807_000, 8769) + // Minimum execution time: 260_012_000 picoseconds. + Weight::from_parts(279_651_000, 8769) .saturating_add(RocksDbWeight::get().reads(16_u64)) .saturating_add(RocksDbWeight::get().writes(11_u64)) } @@ -373,10 +373,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `233 + k * (26 ±0)` // Estimated: `3699 + k * (2501 ±0)` - // Minimum execution time: 59_460_000 picoseconds. - Weight::from_parts(42_712_548, 3699) - // Standard Error: 86_155 - .saturating_add(Weight::from_parts(20_558_251, 0).saturating_mul(k.into())) + // Minimum execution time: 52_074_000 picoseconds. + Weight::from_parts(37_790_107, 3699) + // Standard Error: 119_661 + .saturating_add(Weight::from_parts(21_896_561, 0).saturating_mul(k.into())) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().reads((3_u64).saturating_mul(k.into()))) .saturating_add(RocksDbWeight::get().writes(1_u64)) @@ -417,8 +417,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1660` // Estimated: `13955` - // Minimum execution time: 438_615_000 picoseconds. - Weight::from_parts(456_861_000, 13955) + // Minimum execution time: 415_258_000 picoseconds. + Weight::from_parts(495_448_000, 13955) .saturating_add(RocksDbWeight::get().reads(22_u64)) .saturating_add(RocksDbWeight::get().writes(14_u64)) } @@ -434,8 +434,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1355` // Estimated: `4820` - // Minimum execution time: 108_302_000 picoseconds. - Weight::from_parts(116_441_000, 4820) + // Minimum execution time: 112_919_000 picoseconds. + Weight::from_parts(115_778_000, 4820) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -445,8 +445,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 20_315_000 picoseconds. - Weight::from_parts(23_960_000, 0) + // Minimum execution time: 20_296_000 picoseconds. + Weight::from_parts(21_505_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `VtokenMinting::MintWithLockBlocks` (r:0 w:1) @@ -455,8 +455,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 19_658_000 picoseconds. - Weight::from_parts(21_261_000, 0) + // Minimum execution time: 19_271_000 picoseconds. + Weight::from_parts(21_073_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `VtokenMinting::TokenPool` (r:10 w:0) @@ -476,10 +476,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `114` // Estimated: `1104 + n * (2475 ±0)` - // Minimum execution time: 57_888_000 picoseconds. - Weight::from_parts(47_692_386, 1104) - // Standard Error: 73_258 - .saturating_add(Weight::from_parts(17_275_236, 0).saturating_mul(n.into())) + // Minimum execution time: 57_360_000 picoseconds. + Weight::from_parts(48_087_945, 1104) + // Standard Error: 136_423 + .saturating_add(Weight::from_parts(18_190_043, 0).saturating_mul(n.into())) .saturating_add(RocksDbWeight::get().reads((2_u64).saturating_mul(n.into()))) .saturating_add(RocksDbWeight::get().writes(2_u64)) .saturating_add(RocksDbWeight::get().writes((2_u64).saturating_mul(n.into()))) @@ -495,8 +495,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `145` // Estimated: `3610` - // Minimum execution time: 36_840_000 picoseconds. - Weight::from_parts(39_681_000, 3610) + // Minimum execution time: 35_324_000 picoseconds. + Weight::from_parts(39_006_000, 3610) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } diff --git a/pallets/vtoken-voting/src/weights.rs b/pallets/vtoken-voting/src/weights.rs index 482e423a2..0c28f4d21 100644 --- a/pallets/vtoken-voting/src/weights.rs +++ b/pallets/vtoken-voting/src/weights.rs @@ -25,7 +25,7 @@ //! Autogenerated weights for bifrost_vtoken_voting //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 53.0.0 -//! DATE: 2026-06-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2026-07-03, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! HOSTNAME: `vps-b02dace3`, CPU: `Intel Core Processor (Haswell, no TSX)` //! WASM-EXECUTION: Compiled, CHAIN: Some("bifrost-kusama-local"), DB CACHE: 1024 @@ -124,8 +124,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `14389` // Estimated: `69556` - // Minimum execution time: 399_241_000 picoseconds. - Weight::from_parts(445_911_000, 69556) + // Minimum execution time: 409_642_000 picoseconds. + Weight::from_parts(435_547_000, 69556) .saturating_add(RocksDbWeight::get().reads(24_u64)) .saturating_add(RocksDbWeight::get().writes(10_u64)) } @@ -179,8 +179,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `5910` // Estimated: `69556` - // Minimum execution time: 377_537_000 picoseconds. - Weight::from_parts(469_466_000, 69556) + // Minimum execution time: 353_050_000 picoseconds. + Weight::from_parts(370_626_000, 69556) .saturating_add(RocksDbWeight::get().reads(23_u64)) .saturating_add(RocksDbWeight::get().writes(9_u64)) } @@ -208,8 +208,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1592` // Estimated: `35273` - // Minimum execution time: 182_356_000 picoseconds. - Weight::from_parts(210_390_000, 35273) + // Minimum execution time: 184_770_000 picoseconds. + Weight::from_parts(187_954_000, 35273) .saturating_add(RocksDbWeight::get().reads(10_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } @@ -233,8 +233,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1011` // Estimated: `8601` - // Minimum execution time: 102_614_000 picoseconds. - Weight::from_parts(129_544_000, 8601) + // Minimum execution time: 109_452_000 picoseconds. + Weight::from_parts(112_468_000, 8601) .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -248,8 +248,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `480` // Estimated: `3552` - // Minimum execution time: 44_008_000 picoseconds. - Weight::from_parts(49_549_000, 3552) + // Minimum execution time: 46_967_000 picoseconds. + Weight::from_parts(49_176_000, 3552) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -261,8 +261,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `929` // Estimated: `3689` - // Minimum execution time: 53_907_000 picoseconds. - Weight::from_parts(61_286_000, 3689) + // Minimum execution time: 57_180_000 picoseconds. + Weight::from_parts(59_736_000, 3689) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -272,8 +272,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `421` // Estimated: `3552` - // Minimum execution time: 39_404_000 picoseconds. - Weight::from_parts(44_745_000, 3552) + // Minimum execution time: 37_713_000 picoseconds. + Weight::from_parts(42_455_000, 3552) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -283,8 +283,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 18_677_000 picoseconds. - Weight::from_parts(22_014_000, 0) + // Minimum execution time: 19_387_000 picoseconds. + Weight::from_parts(25_674_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `VtokenVoting::VoteLockingPeriod` (r:0 w:1) @@ -293,8 +293,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 18_287_000 picoseconds. - Weight::from_parts(21_440_000, 0) + // Minimum execution time: 18_774_000 picoseconds. + Weight::from_parts(20_409_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `VtokenVoting::PendingVotingInfo` (r:1 w:0) @@ -305,8 +305,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `439` // Estimated: `35273` - // Minimum execution time: 39_175_000 picoseconds. - Weight::from_parts(46_288_000, 35273) + // Minimum execution time: 41_750_000 picoseconds. + Weight::from_parts(42_294_000, 35273) .saturating_add(RocksDbWeight::get().reads(2_u64)) } /// Storage: `VtokenVoting::PendingRemoveDelegatorVote` (r:1 w:0) @@ -315,8 +315,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `394` // Estimated: `3501` - // Minimum execution time: 33_442_000 picoseconds. - Weight::from_parts(38_126_000, 3501) + // Minimum execution time: 35_219_000 picoseconds. + Weight::from_parts(36_236_000, 3501) .saturating_add(RocksDbWeight::get().reads(1_u64)) } /// Storage: `VtokenVoting::VoteCapRatio` (r:0 w:1) @@ -325,8 +325,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 18_488_000 picoseconds. - Weight::from_parts(21_007_000, 0) + // Minimum execution time: 19_634_000 picoseconds. + Weight::from_parts(21_013_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `ParachainSystem::ValidationData` (r:1 w:0) @@ -341,8 +341,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `218` // Estimated: `3552` - // Minimum execution time: 41_824_000 picoseconds. - Weight::from_parts(43_540_000, 3552) + // Minimum execution time: 40_716_000 picoseconds. + Weight::from_parts(42_037_000, 3552) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -369,10 +369,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `2205` // Estimated: `42526 + v * (6 ±0)` - // Minimum execution time: 138_071_000 picoseconds. - Weight::from_parts(232_308_523, 42526) - // Standard Error: 10_672 - .saturating_add(Weight::from_parts(3_951, 0).saturating_mul(v.into())) + // Minimum execution time: 149_010_000 picoseconds. + Weight::from_parts(207_266_228, 42526) + // Standard Error: 13_264 + .saturating_add(Weight::from_parts(145_905, 0).saturating_mul(v.into())) .saturating_add(RocksDbWeight::get().reads(17_u64)) .saturating_add(RocksDbWeight::get().writes(5_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(v.into())) @@ -398,10 +398,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1515` // Estimated: `42526 + v * (5 ±0)` - // Minimum execution time: 87_564_000 picoseconds. - Weight::from_parts(155_129_151, 42526) - // Standard Error: 14_117 - .saturating_add(Weight::from_parts(77_658, 0).saturating_mul(v.into())) + // Minimum execution time: 111_452_000 picoseconds. + Weight::from_parts(151_667_312, 42526) + // Standard Error: 9_745 + .saturating_add(Weight::from_parts(81_735, 0).saturating_mul(v.into())) .saturating_add(RocksDbWeight::get().reads(16_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) .saturating_add(Weight::from_parts(0, 5).saturating_mul(v.into())) diff --git a/pallets/xcm-interface/src/weights.rs b/pallets/xcm-interface/src/weights.rs index 44728432a..aadb7d82e 100644 --- a/pallets/xcm-interface/src/weights.rs +++ b/pallets/xcm-interface/src/weights.rs @@ -25,7 +25,7 @@ //! Autogenerated weights for bifrost_xcm_interface //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 53.0.0 -//! DATE: 2026-06-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2026-07-03, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! HOSTNAME: `vps-b02dace3`, CPU: `Intel Core Processor (Haswell, no TSX)` //! WASM-EXECUTION: Compiled, CHAIN: Some("bifrost-polkadot-local"), DB CACHE: 1024 @@ -64,8 +64,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `109` // Estimated: `3574` - // Minimum execution time: 61_697_000 picoseconds. - Weight::from_parts(65_132_000, 3574) + // Minimum execution time: 62_156_000 picoseconds. + Weight::from_parts(64_426_000, 3574) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } diff --git a/runtime/bifrost-kusama/Cargo.toml b/runtime/bifrost-kusama/Cargo.toml index 1aae0fdb2..7c296e8c0 100644 --- a/runtime/bifrost-kusama/Cargo.toml +++ b/runtime/bifrost-kusama/Cargo.toml @@ -113,6 +113,7 @@ bifrost-stable-asset = { workspace = true } # Bifrost bifrost-asset-registry = { workspace = true } bifrost-p-k-bridge = { workspace = true } +bifrost-parachain-staking = { workspace = true } bifrost-currencies = { workspace = true } bifrost-farming = { workspace = true, features = ["kusama"] } bifrost-farming-rpc-runtime-api = { workspace = true } @@ -134,7 +135,6 @@ bifrost-vstoken-conversion = { workspace = true } bifrost-vtoken-minting = { workspace = true, features = ["kusama"] } bifrost-vtoken-voting = { workspace = true, features = [ "kusama" ] } bifrost-xcm-interface = { workspace = true } -bifrost-parachain-staking = { workspace = true } lend-market = { workspace = true } lend-market-rpc-runtime-api = { workspace = true } pallet-prices = { workspace = true } @@ -239,6 +239,7 @@ std = [ "bifrost-primitives/std", "bifrost-asset-registry/std", "bifrost-p-k-bridge/std", + "bifrost-parachain-staking/std", "bifrost-currencies/std", "bifrost-farming-rpc-runtime-api/std", "bifrost-farming/std", @@ -264,7 +265,6 @@ std = [ "pallet-prices/std", "leverage-staking/std", "bifrost-stable-asset/std", - "bifrost-parachain-staking/std", "bifrost-xcm-interface/std", "bifrost-channel-commission/std", "bifrost-vbnc-convert/std", @@ -308,7 +308,6 @@ runtime-benchmarks = [ "bifrost-vstoken-conversion/runtime-benchmarks", "bifrost-slp-v2/runtime-benchmarks", "bifrost-asset-registry/runtime-benchmarks", - "bifrost-parachain-staking/runtime-benchmarks", "sp-api/disable-logging", "bifrost-fee-share/runtime-benchmarks", "bifrost-slpx/runtime-benchmarks", @@ -339,7 +338,6 @@ try-runtime = [ "pallet-session/try-runtime", "pallet-aura/try-runtime", "cumulus-pallet-aura-ext/try-runtime", - "bifrost-parachain-staking/try-runtime", "pallet-collective/try-runtime", "pallet-conviction-voting/try-runtime", "pallet-membership/try-runtime", @@ -370,6 +368,7 @@ try-runtime = [ "bifrost-flexible-fee/try-runtime", "bifrost-salp/try-runtime", "bifrost-token-issuer/try-runtime", + "bifrost-parachain-staking/try-runtime", "bifrost-asset-registry/try-runtime", "bifrost-vtoken-minting/try-runtime", "bifrost-slp-v2/try-runtime", @@ -412,4 +411,4 @@ fast-runtime = [] force-debug = ["sp-debug-derive/force-debug"] # Enable sudo pallet. -sudo = ["pallet-sudo"] \ No newline at end of file +sudo = ["pallet-sudo"] diff --git a/runtime/bifrost-kusama/src/lib.rs b/runtime/bifrost-kusama/src/lib.rs index 049f361b8..267412f5e 100644 --- a/runtime/bifrost-kusama/src/lib.rs +++ b/runtime/bifrost-kusama/src/lib.rs @@ -34,9 +34,6 @@ use bifrost_primitives::{ AssetHubChainId, BLP_BNC_VBNC, BNC, KSM, KUSAMA_VBNC_ASSET_INDEX, KUSAMA_VBNC_LP_ASSET_INDEX, KUSD, LP_BNC_VBNC, VBNC, VKSM, }; -use core::convert::TryInto; -// A few exports that help ease life for downstream crates. -pub use bifrost_parachain_staking::{InflationInfo, Range}; use bifrost_primitives::{ BifrostCrowdloanId, BifrostVsbondAccount, BuybackPalletId, CommissionPalletId, FarmingBoostPalletId, FarmingGaugeRewardIssuerPalletId, FarmingKeeperPalletId, @@ -45,6 +42,7 @@ use bifrost_primitives::{ SlpEntrancePalletId, SlpExitPalletId, SlpxPalletId, SystemMakerPalletId, SystemStakingPalletId, TreasuryPalletId, VBNCConvertPalletId, VtokenVotingPalletId, }; +use core::convert::TryInto; use frame_support::traits::ExistenceRequirement; pub use frame_support::{ construct_runtime, match_types, parameter_types, @@ -113,7 +111,7 @@ use frame_support::{ fungible::HoldConsideration, tokens::{PayFromAccount, UnityAssetBalanceConversion}, Currency, EitherOf, EitherOfDiverse, Get, Imbalance, InsideBoth, LinearStoragePrice, - LockIdentifier, OnUnbalanced, + LockIdentifier, OnRuntimeUpgrade, OnUnbalanced, ReservableCurrency, }, weights::WeightToFee as _, }; @@ -175,7 +173,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: Cow::Borrowed("bifrost"), impl_name: Cow::Borrowed("bifrost"), authoring_version: 1, - spec_version: 25000, + spec_version: 25002, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 1, @@ -371,13 +369,31 @@ impl frame_system::Config for Runtime { type MaxConsumers = ConstU32<16>; type RuntimeTask = (); type SingleBlockMigrations = (); - type MultiBlockMigrator = (); + type MultiBlockMigrator = MultiBlockMigrations; type PreInherents = (); type PostInherents = (); type PostTransactions = (); type ExtensionsWeightInfo = (); } +parameter_types! { + pub MbmServiceWeight: Weight = Perbill::from_percent(30) * RuntimeBlockWeights::get().max_block; +} + +impl pallet_migrations::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + #[cfg(not(feature = "runtime-benchmarks"))] + type Migrations = migrations::MultiBlockMigrations; + #[cfg(feature = "runtime-benchmarks")] + type Migrations = pallet_migrations::mock_helpers::MockedMigrations; + type CursorMaxLen = ConstU32<65_536>; + type IdentifierMaxLen = ConstU32<256>; + type MigrationStatusHandler = (); + type FailedMigrationHandler = frame_support::migrations::FreezeChainOnFailedMigration; + type MaxServiceWeight = MbmServiceWeight; + type WeightInfo = pallet_migrations::weights::SubstrateWeight; +} + impl pallet_timestamp::Config for Runtime { type MinimumPeriod = ConstU64<{ SLOT_DURATION / 2 }>; /// A timestamp: milliseconds since the unix epoch. @@ -830,79 +846,6 @@ impl parachain_info::Config for Runtime {} impl cumulus_pallet_aura_ext::Config for Runtime {} -parameter_types! { - /// Minimum round length is 2 minutes - pub const MinBlocksPerRound: u32 = 2 * MINUTES; - /// Rounds before the collator leaving the candidates request can be executed - pub const LeaveCandidatesDelay: u32 = 84; - /// Rounds before the candidate bond increase/decrease can be executed - pub const CandidateBondLessDelay: u32 = 84; - /// Rounds before the delegator exit can be executed - pub const LeaveDelegatorsDelay: u32 = 84; - /// Rounds before the delegator revocation can be executed - pub const RevokeDelegationDelay: u32 = 84; - /// Rounds before the delegator bond increase/decrease can be executed - pub const DelegationBondLessDelay: u32 = 84; - /// Rounds before the reward is paid - pub const RewardPaymentDelay: u32 = 2; - /// Minimum collators selected per round, default at genesis and minimum forever after - /// The collator incentives on Bifrost-Kusama will be discontinued. The number of active - /// collators will be set to 4, ensuring that all collators are nodes operated by Bifrost - /// itself. - pub const MinSelectedCandidates: u32 = prod_or_fast!(4,4); - /// Maximum top delegations per candidate - pub const MaxTopDelegationsPerCandidate: u32 = 300; - /// Maximum bottom delegations per candidate - pub const MaxBottomDelegationsPerCandidate: u32 = 50; - /// Maximum delegations per delegator - pub const MaxDelegationsPerDelegator: u32 = 100; - /// Minimum stake required to become a collator - pub MinCollatorStk: u128 = 5000 * BNCS; - /// Minimum stake required to be reserved to be a candidate - pub MinCandidateStk: u128 = 5000 * BNCS; - /// Minimum stake required to be reserved to be a delegator - pub MinDelegatorStk: u128 = 50 * BNCS; - pub AllowInflation: bool = false; - pub ToMigrateInvulnables: Vec = prod_or_fast!(vec![ - hex!["8cf80f0bafcd0a3d80ca61cb688e4400e275b39d3411b4299b47e712e9dab809"].into(), - hex!["40ac4effe39181731a8feb8a8ee0780e177bdd0d752b09c8fd71047e67189022"].into(), - hex!["624d6a004c72a1abcf93131e185515ebe1410e43a301fe1f25d20d8da345376e"].into(), - hex!["985d2738e512909c81289e6055e60a6824818964535ecfbf10e4d69017084756"].into(), - ],vec![ - hex!["d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d"].into(), - hex!["8eaf04151687736326c9fea17e25fc5287613693c912909cb226aa4794f26a48"].into(), - ]); - pub PaymentInRound: u128 = 180 * BNCS; - pub InitSeedStk: u128 = 5000 * BNCS; -} -impl bifrost_parachain_staking::Config for Runtime { - type Currency = Balances; - type MonetaryGovernanceOrigin = TechAdminOrRoot; - type MinBlocksPerRound = MinBlocksPerRound; - type LeaveCandidatesDelay = LeaveCandidatesDelay; - type CandidateBondLessDelay = CandidateBondLessDelay; - type LeaveDelegatorsDelay = LeaveDelegatorsDelay; - type RevokeDelegationDelay = RevokeDelegationDelay; - type DelegationBondLessDelay = DelegationBondLessDelay; - type RewardPaymentDelay = RewardPaymentDelay; - type MinSelectedCandidates = MinSelectedCandidates; - type MaxTopDelegationsPerCandidate = MaxTopDelegationsPerCandidate; - type MaxBottomDelegationsPerCandidate = MaxBottomDelegationsPerCandidate; - type MaxDelegationsPerDelegator = MaxDelegationsPerDelegator; - type MinCollatorStk = MinCollatorStk; - type MinCandidateStk = MinCandidateStk; - type MinDelegation = MinDelegatorStk; - type MinDelegatorStk = MinDelegatorStk; - type AllowInflation = AllowInflation; - type PaymentInRound = PaymentInRound; - type ToMigrateInvulnables = ToMigrateInvulnables; - type PalletId = ParachainStakingPalletId; - type InitSeedStk = InitSeedStk; - type OnCollatorPayout = (); - type OnNewRound = (); - type WeightInfo = bifrost_parachain_staking::weights::SubstrateWeight; -} - parameter_types! { pub const Period: u32 = 6 * HOURS; pub const Offset: u32 = 0; @@ -1787,6 +1730,7 @@ construct_runtime! { System: frame_system = 0, Timestamp: pallet_timestamp = 1, Indices: pallet_indices = 2, + MultiBlockMigrations: pallet_migrations = 4, ParachainSystem: cumulus_pallet_parachain_system = 5, ParachainInfo: parachain_info = 6, TxPause: pallet_tx_pause = 7, @@ -1801,7 +1745,6 @@ construct_runtime! { Session: pallet_session = 22, Aura: pallet_aura = 23, AuraExt: cumulus_pallet_aura_ext = 24, - ParachainStaking: bifrost_parachain_staking = 25, // Governance stuff #[cfg(feature = "sudo")] @@ -1914,6 +1857,117 @@ impl cumulus_pallet_xcmp_queue::migration::v5::V5Config for Runtime { /// upgrades in case governance decides to do so. THE ORDER IS IMPORTANT. pub type Migrations = migrations::Unreleased; +pub struct TransferParachainStakingAccountToTreasury; +impl OnRuntimeUpgrade for TransferParachainStakingAccountToTreasury { + fn on_runtime_upgrade() -> Weight { + let parachain_staking_account: AccountId = + ParachainStakingPalletId::get().into_account_truncating(); + let treasury_account: AccountId = TreasuryPalletId::get().into_account_truncating(); + let free = >::free_balance(¶chain_staking_account); + let reserved = >::reserved_balance( + ¶chain_staking_account, + ); + + if !reserved.is_zero() { + log::warn!( + target: "runtime::parachain_staking_removal", + "ParachainStaking account has unexpected reserved balance: {reserved:?}", + ); + } + + if free.is_zero() { + log::info!( + target: "runtime::parachain_staking_removal", + "ParachainStaking account has no free balance to transfer", + ); + return RocksDbWeight::get().reads(2); + } + + match >::transfer( + ¶chain_staking_account, + &treasury_account, + free, + ExistenceRequirement::AllowDeath, + ) { + Ok(()) => log::info!( + target: "runtime::parachain_staking_removal", + "Transferred ParachainStaking account free balance to treasury: {free:?}", + ), + Err(error) => log::error!( + target: "runtime::parachain_staking_removal", + "Failed to transfer ParachainStaking account free balance to treasury: {error:?}", + ), + } + + RocksDbWeight::get().reads_writes(3, 2) + } + + #[cfg(feature = "try-runtime")] + fn pre_upgrade() -> Result, sp_runtime::TryRuntimeError> { + let parachain_staking_account: AccountId = + ParachainStakingPalletId::get().into_account_truncating(); + let treasury_account: AccountId = TreasuryPalletId::get().into_account_truncating(); + let staking_free = + >::free_balance(¶chain_staking_account); + let staking_reserved = >::reserved_balance( + ¶chain_staking_account, + ); + let treasury_free = >::free_balance(&treasury_account); + + log::info!( + target: "runtime::parachain_staking_removal", + "pre_upgrade: ParachainStaking free={staking_free:?}, reserved={staking_reserved:?}, treasury_free={treasury_free:?}", + ); + + Ok((staking_free, staking_reserved, treasury_free).encode()) + } + + #[cfg(feature = "try-runtime")] + fn post_upgrade(state: Vec) -> Result<(), sp_runtime::TryRuntimeError> { + use frame_support::ensure; + + let (staking_free_before, staking_reserved_before, treasury_free_before): ( + Balance, + Balance, + Balance, + ) = Decode::decode(&mut state.as_slice()).map_err(|_| { + sp_runtime::TryRuntimeError::Other( + "failed to decode ParachainStaking treasury transfer migration state", + ) + })?; + + let parachain_staking_account: AccountId = + ParachainStakingPalletId::get().into_account_truncating(); + let treasury_account: AccountId = TreasuryPalletId::get().into_account_truncating(); + let staking_free_after = + >::free_balance(¶chain_staking_account); + let staking_reserved_after = >::reserved_balance( + ¶chain_staking_account, + ); + let treasury_free_after = + >::free_balance(&treasury_account); + + ensure!( + staking_reserved_before.is_zero(), + "ParachainStaking account had reserved balance before migration" + ); + ensure!( + staking_free_after.is_zero(), + "ParachainStaking account still has free balance after migration" + ); + ensure!( + staking_reserved_after.is_zero(), + "ParachainStaking account still has reserved balance after migration" + ); + ensure!( + treasury_free_after >= treasury_free_before.saturating_add(staking_free_before), + "treasury did not receive ParachainStaking account free balance" + ); + + Ok(()) + } +} + /// The runtime migrations per release. pub mod migrations { use super::*; @@ -1922,12 +1976,21 @@ pub mod migrations { pub type Unreleased = ( // permanent migration, do not remove pallet_xcm::migration::MigrateToLatestXcmVersion, - bifrost_slp_v2::migrations::v3::SlpV2StorageV2MigrationToV3, - bifrost_fee_share::migration::MigrateDollarStandardInfoToV2< + TransferParachainStakingAccountToTreasury, + ); + + pub type MultiBlockMigrations = ( + bifrost_parachain_staking::migrations::RemoveCandidateLocks< + Runtime, + Balances, + RocksDbWeight, + >, + bifrost_parachain_staking::migrations::RemoveDelegatorLocks< Runtime, - FeeShareUsdtCurrencyId, - FeeShareUsdtSwapPalletId, + Balances, + RocksDbWeight, >, + bifrost_parachain_staking::migrations::ClearParachainStakingStorage, ); } diff --git a/runtime/bifrost-kusama/src/weights/bifrost_asset_registry.rs b/runtime/bifrost-kusama/src/weights/bifrost_asset_registry.rs index 087f5facb..49440c071 100644 --- a/runtime/bifrost-kusama/src/weights/bifrost_asset_registry.rs +++ b/runtime/bifrost-kusama/src/weights/bifrost_asset_registry.rs @@ -25,7 +25,7 @@ //! Autogenerated weights for bifrost_asset_registry //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 53.0.0 -//! DATE: 2026-06-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2026-07-03, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! HOSTNAME: `vps-b02dace3`, CPU: `Intel Core Processor (Haswell, no TSX)` //! WASM-EXECUTION: Compiled, CHAIN: Some("bifrost-kusama-local"), DB CACHE: 1024 @@ -62,8 +62,8 @@ impl bifrost_asset_registry::WeightInfo for BifrostWeig // Proof Size summary in bytes: // Measured: `337` // Estimated: `3802` - // Minimum execution time: 46_597 nanoseconds. - Weight::from_parts(47_610_000, 3802) + // Minimum execution time: 39_964 nanoseconds. + Weight::from_parts(40_936_000, 3802) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -73,8 +73,8 @@ impl bifrost_asset_registry::WeightInfo for BifrostWeig // Proof Size summary in bytes: // Measured: `424` // Estimated: `6364` - // Minimum execution time: 54_427 nanoseconds. - Weight::from_parts(55_774_000, 6364) + // Minimum execution time: 46_024 nanoseconds. + Weight::from_parts(47_736_000, 6364) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -90,8 +90,8 @@ impl bifrost_asset_registry::WeightInfo for BifrostWeig // Proof Size summary in bytes: // Measured: `414` // Estimated: `3879` - // Minimum execution time: 55_232 nanoseconds. - Weight::from_parts(56_352_000, 3879) + // Minimum execution time: 49_002 nanoseconds. + Weight::from_parts(97_293_000, 3879) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -107,8 +107,8 @@ impl bifrost_asset_registry::WeightInfo for BifrostWeig // Proof Size summary in bytes: // Measured: `414` // Estimated: `3879` - // Minimum execution time: 52_704 nanoseconds. - Weight::from_parts(53_721_000, 3879) + // Minimum execution time: 45_650 nanoseconds. + Weight::from_parts(47_035_000, 3879) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -118,8 +118,8 @@ impl bifrost_asset_registry::WeightInfo for BifrostWeig // Proof Size summary in bytes: // Measured: `409` // Estimated: `3874` - // Minimum execution time: 45_132 nanoseconds. - Weight::from_parts(46_841_000, 3874) + // Minimum execution time: 39_477 nanoseconds. + Weight::from_parts(40_886_000, 3874) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/runtime/bifrost-kusama/src/weights/bifrost_fee_share.rs b/runtime/bifrost-kusama/src/weights/bifrost_fee_share.rs index 84c72d0a6..bd2026968 100644 --- a/runtime/bifrost-kusama/src/weights/bifrost_fee_share.rs +++ b/runtime/bifrost-kusama/src/weights/bifrost_fee_share.rs @@ -25,7 +25,7 @@ //! Autogenerated weights for bifrost_fee_share //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 53.0.0 -//! DATE: 2026-06-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2026-07-03, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! HOSTNAME: `vps-b02dace3`, CPU: `Intel Core Processor (Haswell, no TSX)` //! WASM-EXECUTION: Compiled, CHAIN: Some("bifrost-kusama-local"), DB CACHE: 1024 @@ -58,8 +58,8 @@ impl bifrost_fee_share::WeightInfo for BifrostWeight // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 326 nanoseconds. - Weight::from_parts(348_000, 0) + // Minimum execution time: 324 nanoseconds. + Weight::from_parts(371_000, 0) } // Storage: `FeeShare::DistributionNextId` (r:1 w:1) // Proof: `FeeShare::DistributionNextId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) @@ -71,8 +71,8 @@ impl bifrost_fee_share::WeightInfo for BifrostWeight // Proof Size summary in bytes: // Measured: `3` // Estimated: `1488` - // Minimum execution time: 33_408 nanoseconds. - Weight::from_parts(34_926_000, 1488) + // Minimum execution time: 32_718 nanoseconds. + Weight::from_parts(33_965_000, 1488) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -84,8 +84,8 @@ impl bifrost_fee_share::WeightInfo for BifrostWeight // Proof Size summary in bytes: // Measured: `179` // Estimated: `3644` - // Minimum execution time: 47_310 nanoseconds. - Weight::from_parts(50_078_000, 3644) + // Minimum execution time: 48_300 nanoseconds. + Weight::from_parts(49_254_000, 3644) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -95,8 +95,8 @@ impl bifrost_fee_share::WeightInfo for BifrostWeight // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 17_263 nanoseconds. - Weight::from_parts(17_902_000, 0) + // Minimum execution time: 16_846 nanoseconds. + Weight::from_parts(17_448_000, 0) .saturating_add(T::DbWeight::get().writes(1)) } // Storage: `FeeShare::DistributionInfos` (r:1 w:0) @@ -113,8 +113,8 @@ impl bifrost_fee_share::WeightInfo for BifrostWeight // Proof Size summary in bytes: // Measured: `592` // Estimated: `6532` - // Minimum execution time: 79_121 nanoseconds. - Weight::from_parts(80_890_000, 6532) + // Minimum execution time: 79_071 nanoseconds. + Weight::from_parts(81_711_000, 6532) .saturating_add(T::DbWeight::get().reads(7)) } // Storage: `FeeShare::DistributionInfos` (r:1 w:1) @@ -131,8 +131,8 @@ impl bifrost_fee_share::WeightInfo for BifrostWeight // Proof Size summary in bytes: // Measured: `592` // Estimated: `6532` - // Minimum execution time: 91_509 nanoseconds. - Weight::from_parts(95_636_000, 6532) + // Minimum execution time: 93_427 nanoseconds. + Weight::from_parts(95_454_000, 6532) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -144,8 +144,8 @@ impl bifrost_fee_share::WeightInfo for BifrostWeight // Proof Size summary in bytes: // Measured: `128` // Estimated: `3593` - // Minimum execution time: 33_391 nanoseconds. - Weight::from_parts(34_659_000, 3593) + // Minimum execution time: 32_638 nanoseconds. + Weight::from_parts(33_807_000, 3593) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/runtime/bifrost-kusama/src/weights/bifrost_flexible_fee.rs b/runtime/bifrost-kusama/src/weights/bifrost_flexible_fee.rs index 858c3eef9..f8dadcdd0 100644 --- a/runtime/bifrost-kusama/src/weights/bifrost_flexible_fee.rs +++ b/runtime/bifrost-kusama/src/weights/bifrost_flexible_fee.rs @@ -25,7 +25,7 @@ //! Autogenerated weights for bifrost_flexible_fee //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 53.0.0 -//! DATE: 2026-06-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2026-07-03, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! HOSTNAME: `vps-b02dace3`, CPU: `Intel Core Processor (Haswell, no TSX)` //! WASM-EXECUTION: Compiled, CHAIN: Some("bifrost-kusama-local"), DB CACHE: 1024 @@ -60,8 +60,8 @@ impl bifrost_flexible_fee::WeightInfo for BifrostWeight // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 20_812 nanoseconds. - Weight::from_parts(21_687_000, 0) + // Minimum execution time: 19_111 nanoseconds. + Weight::from_parts(21_388_000, 0) .saturating_add(T::DbWeight::get().writes(1)) } // Storage: `FlexibleFee::UniversalFeeCurrencyOrderList` (r:0 w:1) @@ -70,8 +70,8 @@ impl bifrost_flexible_fee::WeightInfo for BifrostWeight // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 18_979 nanoseconds. - Weight::from_parts(25_586_000, 0) + // Minimum execution time: 17_583 nanoseconds. + Weight::from_parts(18_570_000, 0) .saturating_add(T::DbWeight::get().writes(1)) } } diff --git a/runtime/bifrost-kusama/src/weights/bifrost_slpx.rs b/runtime/bifrost-kusama/src/weights/bifrost_slpx.rs index 6a0b6661f..c5202f758 100644 --- a/runtime/bifrost-kusama/src/weights/bifrost_slpx.rs +++ b/runtime/bifrost-kusama/src/weights/bifrost_slpx.rs @@ -25,7 +25,7 @@ //! Autogenerated weights for bifrost_slpx //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 53.0.0 -//! DATE: 2026-06-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2026-07-03, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! HOSTNAME: `vps-b02dace3`, CPU: `Intel Core Processor (Haswell, no TSX)` //! WASM-EXECUTION: Compiled, CHAIN: Some("bifrost-kusama-local"), DB CACHE: 1024 @@ -60,8 +60,8 @@ impl bifrost_slpx::WeightInfo for BifrostWeight { // Proof Size summary in bytes: // Measured: `4` // Estimated: `3803` - // Minimum execution time: 30_603 nanoseconds. - Weight::from_parts(32_448_000, 3803) + // Minimum execution time: 31_673 nanoseconds. + Weight::from_parts(63_344_000, 3803) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -71,8 +71,8 @@ impl bifrost_slpx::WeightInfo for BifrostWeight { // Proof Size summary in bytes: // Measured: `81` // Estimated: `3803` - // Minimum execution time: 34_939 nanoseconds. - Weight::from_parts(36_111_000, 3803) + // Minimum execution time: 34_047 nanoseconds. + Weight::from_parts(36_078_000, 3803) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -82,8 +82,8 @@ impl bifrost_slpx::WeightInfo for BifrostWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 20_129 nanoseconds. - Weight::from_parts(20_946_000, 0) + // Minimum execution time: 20_147 nanoseconds. + Weight::from_parts(21_102_000, 0) .saturating_add(T::DbWeight::get().writes(1)) } // Storage: `Slpx::TransferToFee` (r:0 w:1) @@ -92,8 +92,8 @@ impl bifrost_slpx::WeightInfo for BifrostWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 19_487 nanoseconds. - Weight::from_parts(20_646_000, 0) + // Minimum execution time: 17_893 nanoseconds. + Weight::from_parts(20_642_000, 0) .saturating_add(T::DbWeight::get().writes(1)) } // Storage: `Slpx::WhitelistAccountId` (r:1 w:0) @@ -106,8 +106,8 @@ impl bifrost_slpx::WeightInfo for BifrostWeight { // Proof Size summary in bytes: // Measured: `339` // Estimated: `129987` - // Minimum execution time: 54_056 nanoseconds. - Weight::from_parts(58_389_000, 129987) + // Minimum execution time: 53_493 nanoseconds. + Weight::from_parts(56_625_000, 129987) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -151,8 +151,8 @@ impl bifrost_slpx::WeightInfo for BifrostWeight { // Proof Size summary in bytes: // Measured: `1408` // Estimated: `4873` - // Minimum execution time: 225_824 nanoseconds. - Weight::from_parts(229_510_000, 4873) + // Minimum execution time: 226_377 nanoseconds. + Weight::from_parts(241_079_000, 4873) .saturating_add(T::DbWeight::get().reads(18)) .saturating_add(T::DbWeight::get().writes(10)) } @@ -166,8 +166,8 @@ impl bifrost_slpx::WeightInfo for BifrostWeight { // Proof Size summary in bytes: // Measured: `339` // Estimated: `129987` - // Minimum execution time: 53_407 nanoseconds. - Weight::from_parts(56_016_000, 129987) + // Minimum execution time: 50_230 nanoseconds. + Weight::from_parts(55_101_000, 129987) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -197,10 +197,10 @@ impl bifrost_slpx::WeightInfo for BifrostWeight { // Proof: `ChannelCommission::PeriodVtokenTotalMint` (`max_values`: None, `max_size`: None, mode: `Measured`) fn async_mint() -> Weight { // Proof Size summary in bytes: - // Measured: `1576` + // Measured: `1539` // Estimated: `8769` - // Minimum execution time: 245_526 nanoseconds. - Weight::from_parts(248_698_000, 8769) + // Minimum execution time: 242_558 nanoseconds. + Weight::from_parts(265_304_000, 8769) .saturating_add(T::DbWeight::get().reads(16)) .saturating_add(T::DbWeight::get().writes(9)) } @@ -210,8 +210,8 @@ impl bifrost_slpx::WeightInfo for BifrostWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 16_696 nanoseconds. - Weight::from_parts(17_870_000, 0) + // Minimum execution time: 16_556 nanoseconds. + Weight::from_parts(17_616_000, 0) .saturating_add(T::DbWeight::get().writes(1)) } // Storage: `Slpx::AsyncMintConfig` (r:1 w:0) @@ -236,10 +236,10 @@ impl bifrost_slpx::WeightInfo for BifrostWeight { // Proof: `VtokenMinting::ExchangeRateCheckEnabled` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn force_increase_hyperbridge_reserve() -> Weight { // Proof Size summary in bytes: - // Measured: `1357` - // Estimated: `4822` - // Minimum execution time: 163_770 nanoseconds. - Weight::from_parts(171_960_000, 4822) + // Measured: `1282` + // Estimated: `4747` + // Minimum execution time: 164_580 nanoseconds. + Weight::from_parts(168_852_000, 4747) .saturating_add(T::DbWeight::get().reads(10)) .saturating_add(T::DbWeight::get().writes(5)) } @@ -249,8 +249,8 @@ impl bifrost_slpx::WeightInfo for BifrostWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 9_750 nanoseconds. - Weight::from_parts(10_254_000, 0) + // Minimum execution time: 10_318 nanoseconds. + Weight::from_parts(10_886_000, 0) .saturating_add(T::DbWeight::get().writes(1)) } } diff --git a/runtime/bifrost-kusama/src/weights/bifrost_stable_pool.rs b/runtime/bifrost-kusama/src/weights/bifrost_stable_pool.rs index c3b490b30..744aa0ca5 100644 --- a/runtime/bifrost-kusama/src/weights/bifrost_stable_pool.rs +++ b/runtime/bifrost-kusama/src/weights/bifrost_stable_pool.rs @@ -25,7 +25,7 @@ //! Autogenerated weights for bifrost_stable_pool //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 53.0.0 -//! DATE: 2026-06-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2026-07-03, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! HOSTNAME: `vps-b02dace3`, CPU: `Intel Core Processor (Haswell, no TSX)` //! WASM-EXECUTION: Compiled, CHAIN: Some("bifrost-kusama-local"), DB CACHE: 1024 @@ -66,8 +66,8 @@ impl bifrost_stable_pool::WeightInfo for BifrostWeight< // Proof Size summary in bytes: // Measured: `413` // Estimated: `3878` - // Minimum execution time: 73_565 nanoseconds. - Weight::from_parts(74_709_000, 3878) + // Minimum execution time: 67_531 nanoseconds. + Weight::from_parts(71_950_000, 3878) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -79,8 +79,8 @@ impl bifrost_stable_pool::WeightInfo for BifrostWeight< // Proof Size summary in bytes: // Measured: `230` // Estimated: `8645` - // Minimum execution time: 65_651 nanoseconds. - Weight::from_parts(69_025_000, 8645) + // Minimum execution time: 63_935 nanoseconds. + Weight::from_parts(65_147_000, 8645) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -90,8 +90,8 @@ impl bifrost_stable_pool::WeightInfo for BifrostWeight< // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 18_548 nanoseconds. - Weight::from_parts(20_580_000, 0) + // Minimum execution time: 19_597 nanoseconds. + Weight::from_parts(20_462_000, 0) .saturating_add(T::DbWeight::get().writes(1)) } // Storage: `StableAsset::TokenRateHardcap` (r:0 w:1) @@ -100,8 +100,8 @@ impl bifrost_stable_pool::WeightInfo for BifrostWeight< // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 19_074 nanoseconds. - Weight::from_parts(20_218_000, 0) + // Minimum execution time: 18_571 nanoseconds. + Weight::from_parts(19_612_000, 0) .saturating_add(T::DbWeight::get().writes(1)) } // Storage: `StableAsset::Pools` (r:1 w:1) @@ -120,8 +120,8 @@ impl bifrost_stable_pool::WeightInfo for BifrostWeight< // Proof Size summary in bytes: // Measured: `1649` // Estimated: `13955` - // Minimum execution time: 362_128 nanoseconds. - Weight::from_parts(576_420_000, 13955) + // Minimum execution time: 350_177 nanoseconds. + Weight::from_parts(366_507_000, 13955) .saturating_add(T::DbWeight::get().reads(14)) .saturating_add(T::DbWeight::get().writes(9)) } @@ -143,8 +143,8 @@ impl bifrost_stable_pool::WeightInfo for BifrostWeight< // Proof Size summary in bytes: // Measured: `1934` // Estimated: `13955` - // Minimum execution time: 379_521 nanoseconds. - Weight::from_parts(398_302_000, 13955) + // Minimum execution time: 365_316 nanoseconds. + Weight::from_parts(373_625_000, 13955) .saturating_add(T::DbWeight::get().reads(16)) .saturating_add(T::DbWeight::get().writes(7)) } @@ -164,8 +164,8 @@ impl bifrost_stable_pool::WeightInfo for BifrostWeight< // Proof Size summary in bytes: // Measured: `1831` // Estimated: `13955` - // Minimum execution time: 383_793 nanoseconds. - Weight::from_parts(431_609_000, 13955) + // Minimum execution time: 390_421 nanoseconds. + Weight::from_parts(414_603_000, 13955) .saturating_add(T::DbWeight::get().reads(13)) .saturating_add(T::DbWeight::get().writes(7)) } @@ -185,8 +185,8 @@ impl bifrost_stable_pool::WeightInfo for BifrostWeight< // Proof Size summary in bytes: // Measured: `1747` // Estimated: `11362` - // Minimum execution time: 363_542 nanoseconds. - Weight::from_parts(406_696_000, 11362) + // Minimum execution time: 362_847 nanoseconds. + Weight::from_parts(379_354_000, 11362) .saturating_add(T::DbWeight::get().reads(11)) .saturating_add(T::DbWeight::get().writes(5)) } @@ -206,8 +206,8 @@ impl bifrost_stable_pool::WeightInfo for BifrostWeight< // Proof Size summary in bytes: // Measured: `1831` // Estimated: `13955` - // Minimum execution time: 324_367 nanoseconds. - Weight::from_parts(355_511_000, 13955) + // Minimum execution time: 331_511 nanoseconds. + Weight::from_parts(342_149_000, 13955) .saturating_add(T::DbWeight::get().reads(13)) .saturating_add(T::DbWeight::get().writes(7)) } @@ -217,8 +217,8 @@ impl bifrost_stable_pool::WeightInfo for BifrostWeight< // Proof Size summary in bytes: // Measured: `446` // Estimated: `3911` - // Minimum execution time: 40_069 nanoseconds. - Weight::from_parts(41_973_000, 3911) + // Minimum execution time: 37_792 nanoseconds. + Weight::from_parts(39_393_000, 3911) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -228,8 +228,8 @@ impl bifrost_stable_pool::WeightInfo for BifrostWeight< // Proof Size summary in bytes: // Measured: `446` // Estimated: `3911` - // Minimum execution time: 36_913 nanoseconds. - Weight::from_parts(41_120_000, 3911) + // Minimum execution time: 37_272 nanoseconds. + Weight::from_parts(38_597_000, 3911) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -239,8 +239,8 @@ impl bifrost_stable_pool::WeightInfo for BifrostWeight< // Proof Size summary in bytes: // Measured: `446` // Estimated: `3911` - // Minimum execution time: 38_252 nanoseconds. - Weight::from_parts(40_042_000, 3911) + // Minimum execution time: 34_700 nanoseconds. + Weight::from_parts(37_759_000, 3911) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/runtime/bifrost-kusama/src/weights/bifrost_system_staking.rs b/runtime/bifrost-kusama/src/weights/bifrost_system_staking.rs index 818ece6af..c022bc484 100644 --- a/runtime/bifrost-kusama/src/weights/bifrost_system_staking.rs +++ b/runtime/bifrost-kusama/src/weights/bifrost_system_staking.rs @@ -25,7 +25,7 @@ //! Autogenerated weights for bifrost_system_staking //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 53.0.0 -//! DATE: 2026-06-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2026-07-03, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! HOSTNAME: `vps-b02dace3`, CPU: `Intel Core Processor (Haswell, no TSX)` //! WASM-EXECUTION: Compiled, CHAIN: Some("bifrost-kusama-local"), DB CACHE: 1024 @@ -64,8 +64,8 @@ impl bifrost_system_staking::WeightInfo for BifrostWeig // Proof Size summary in bytes: // Measured: `369` // Estimated: `6309` - // Minimum execution time: 27_329 nanoseconds. - Weight::from_parts(28_713_000, 6309) + // Minimum execution time: 28_129 nanoseconds. + Weight::from_parts(29_123_000, 6309) .saturating_add(T::DbWeight::get().reads(4)) } // Storage: `SystemStaking::TokenStatus` (r:1 w:1) @@ -76,8 +76,8 @@ impl bifrost_system_staking::WeightInfo for BifrostWeig // Proof Size summary in bytes: // Measured: `109` // Estimated: `3574` - // Minimum execution time: 32_315 nanoseconds. - Weight::from_parts(33_852_000, 3574) + // Minimum execution time: 33_412 nanoseconds. + Weight::from_parts(34_714_000, 3574) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -109,8 +109,8 @@ impl bifrost_system_staking::WeightInfo for BifrostWeig // Proof Size summary in bytes: // Measured: `1605` // Estimated: `8769` - // Minimum execution time: 280_345 nanoseconds. - Weight::from_parts(317_286_000, 8769) + // Minimum execution time: 283_522 nanoseconds. + Weight::from_parts(303_469_000, 8769) .saturating_add(T::DbWeight::get().reads(17)) .saturating_add(T::DbWeight::get().writes(11)) } @@ -128,23 +128,23 @@ impl bifrost_system_staking::WeightInfo for BifrostWeig // Proof Size summary in bytes: // Measured: `808` // Estimated: `4273` - // Minimum execution time: 77_091 nanoseconds. - Weight::from_parts(82_569_000, 4273) + // Minimum execution time: 81_563 nanoseconds. + Weight::from_parts(88_294_000, 4273) .saturating_add(T::DbWeight::get().reads(5)) } fn on_redeem_success() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 739 nanoseconds. - Weight::from_parts(812_000, 0) + // Minimum execution time: 711 nanoseconds. + Weight::from_parts(776_000, 0) } fn on_redeemed() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 721 nanoseconds. - Weight::from_parts(852_000, 0) + // Minimum execution time: 684 nanoseconds. + Weight::from_parts(782_000, 0) } // Storage: `SystemStaking::TokenList` (r:1 w:1) // Proof: `SystemStaking::TokenList` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) @@ -154,8 +154,8 @@ impl bifrost_system_staking::WeightInfo for BifrostWeig // Proof Size summary in bytes: // Measured: `169` // Estimated: `1654` - // Minimum execution time: 22_891 nanoseconds. - Weight::from_parts(25_242_000, 1654) + // Minimum execution time: 24_083 nanoseconds. + Weight::from_parts(25_000_000, 1654) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } diff --git a/runtime/bifrost-kusama/src/weights/bifrost_token_issuer.rs b/runtime/bifrost-kusama/src/weights/bifrost_token_issuer.rs index 87755932e..3a557ed46 100644 --- a/runtime/bifrost-kusama/src/weights/bifrost_token_issuer.rs +++ b/runtime/bifrost-kusama/src/weights/bifrost_token_issuer.rs @@ -25,7 +25,7 @@ //! Autogenerated weights for bifrost_token_issuer //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 53.0.0 -//! DATE: 2026-06-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2026-07-03, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! HOSTNAME: `vps-b02dace3`, CPU: `Intel Core Processor (Haswell, no TSX)` //! WASM-EXECUTION: Compiled, CHAIN: Some("bifrost-kusama-local"), DB CACHE: 1024 @@ -58,10 +58,10 @@ impl bifrost_token_issuer::WeightInfo for BifrostWeight // Proof: `TokenIssuer::IssueWhiteList` (`max_values`: None, `max_size`: None, mode: `Measured`) fn add_to_issue_whitelist() -> Weight { // Proof Size summary in bytes: - // Measured: `109` - // Estimated: `3574` - // Minimum execution time: 29_473 nanoseconds. - Weight::from_parts(31_841_000, 3574) + // Measured: `76` + // Estimated: `3541` + // Minimum execution time: 28_968 nanoseconds. + Weight::from_parts(31_696_000, 3541) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -69,10 +69,10 @@ impl bifrost_token_issuer::WeightInfo for BifrostWeight // Proof: `TokenIssuer::IssueWhiteList` (`max_values`: None, `max_size`: None, mode: `Measured`) fn remove_from_issue_whitelist() -> Weight { // Proof Size summary in bytes: - // Measured: `187` - // Estimated: `3652` - // Minimum execution time: 31_761 nanoseconds. - Weight::from_parts(33_718_000, 3652) + // Measured: `154` + // Estimated: `3619` + // Minimum execution time: 31_795 nanoseconds. + Weight::from_parts(32_710_000, 3619) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -80,10 +80,10 @@ impl bifrost_token_issuer::WeightInfo for BifrostWeight // Proof: `TokenIssuer::TransferWhiteList` (`max_values`: None, `max_size`: None, mode: `Measured`) fn add_to_transfer_whitelist() -> Weight { // Proof Size summary in bytes: - // Measured: `109` - // Estimated: `3574` - // Minimum execution time: 30_534 nanoseconds. - Weight::from_parts(31_442_000, 3574) + // Measured: `76` + // Estimated: `3541` + // Minimum execution time: 28_595 nanoseconds. + Weight::from_parts(30_455_000, 3541) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -91,10 +91,10 @@ impl bifrost_token_issuer::WeightInfo for BifrostWeight // Proof: `TokenIssuer::TransferWhiteList` (`max_values`: None, `max_size`: None, mode: `Measured`) fn remove_from_transfer_whitelist() -> Weight { // Proof Size summary in bytes: - // Measured: `187` - // Estimated: `3652` - // Minimum execution time: 31_353 nanoseconds. - Weight::from_parts(33_477_000, 3652) + // Measured: `154` + // Estimated: `3619` + // Minimum execution time: 30_160 nanoseconds. + Weight::from_parts(32_014_000, 3619) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -108,10 +108,10 @@ impl bifrost_token_issuer::WeightInfo for BifrostWeight // Proof: `AssetRegistry::CurrencyMetadatas` (`max_values`: None, `max_size`: None, mode: `Measured`) fn issue() -> Weight { // Proof Size summary in bytes: - // Measured: `646` - // Estimated: `4111` - // Minimum execution time: 87_854 nanoseconds. - Weight::from_parts(94_525_000, 4111) + // Measured: `613` + // Estimated: `4078` + // Minimum execution time: 90_482 nanoseconds. + Weight::from_parts(93_284_000, 4078) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -125,10 +125,10 @@ impl bifrost_token_issuer::WeightInfo for BifrostWeight // Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn transfer() -> Weight { // Proof Size summary in bytes: - // Measured: `917` + // Measured: `884` // Estimated: `6176` - // Minimum execution time: 106_880 nanoseconds. - Weight::from_parts(113_534_000, 6176) + // Minimum execution time: 102_935 nanoseconds. + Weight::from_parts(111_394_000, 6176) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(3)) } diff --git a/runtime/bifrost-kusama/src/weights/bifrost_vbnc_convert.rs b/runtime/bifrost-kusama/src/weights/bifrost_vbnc_convert.rs index 64a6d0f69..3fc706290 100644 --- a/runtime/bifrost-kusama/src/weights/bifrost_vbnc_convert.rs +++ b/runtime/bifrost-kusama/src/weights/bifrost_vbnc_convert.rs @@ -25,7 +25,7 @@ //! Autogenerated weights for bifrost_vbnc_convert //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 53.0.0 -//! DATE: 2026-06-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2026-07-03, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! HOSTNAME: `vps-b02dace3`, CPU: `Intel Core Processor (Haswell, no TSX)` //! WASM-EXECUTION: Compiled, CHAIN: Some("bifrost-kusama-local"), DB CACHE: 1024 @@ -66,8 +66,8 @@ impl bifrost_vbnc_convert::WeightInfo for BifrostWeight // Proof Size summary in bytes: // Measured: `959` // Estimated: `8769` - // Minimum execution time: 196_357 nanoseconds. - Weight::from_parts(199_017_000, 8769) + // Minimum execution time: 185_501 nanoseconds. + Weight::from_parts(190_172_000, 8769) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(5)) } @@ -81,8 +81,8 @@ impl bifrost_vbnc_convert::WeightInfo for BifrostWeight // Proof Size summary in bytes: // Measured: `691` // Estimated: `6176` - // Minimum execution time: 108_398 nanoseconds. - Weight::from_parts(113_443_000, 6176) + // Minimum execution time: 106_110 nanoseconds. + Weight::from_parts(109_006_000, 6176) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } diff --git a/runtime/bifrost-kusama/src/weights/bifrost_vesting.rs b/runtime/bifrost-kusama/src/weights/bifrost_vesting.rs index 065e316f9..c6c0219a3 100644 --- a/runtime/bifrost-kusama/src/weights/bifrost_vesting.rs +++ b/runtime/bifrost-kusama/src/weights/bifrost_vesting.rs @@ -25,7 +25,7 @@ //! Autogenerated weights for bifrost_vesting //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 53.0.0 -//! DATE: 2026-06-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2026-07-03, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! HOSTNAME: `vps-b02dace3`, CPU: `Intel Core Processor (Haswell, no TSX)` //! WASM-EXECUTION: Compiled, CHAIN: Some("bifrost-kusama-local"), DB CACHE: 1024 @@ -74,10 +74,8 @@ impl bifrost_vesting::WeightInfo for BifrostWeight { // Proof Size summary in bytes: // Measured: `1148 + l * (25 ±0)` // Estimated: `4764 + l * (25 ±0)` - // Minimum execution time: 90_639 nanoseconds. - Weight::from_parts(112_151_744, 4764) - // Standard Error: 21_689 - .saturating_add(Weight::from_parts(180_808, 0).saturating_mul(l.into())) + // Minimum execution time: 92_572 nanoseconds. + Weight::from_parts(131_863_954, 4764) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(Weight::from_parts(0, 25).saturating_mul(l.into())) @@ -98,14 +96,16 @@ impl bifrost_vesting::WeightInfo for BifrostWeight { // Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// The range of component `l` is `[0, 50]`. /// The range of component `s` is `[2, 28]`. - fn vest_unlocked(l: u32, _s: u32, ) -> Weight { + fn vest_unlocked(l: u32, s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `1148 + l * (25 ±0)` // Estimated: `4764 + l * (25 ±0)` - // Minimum execution time: 95_256 nanoseconds. - Weight::from_parts(99_697_857, 4764) - // Standard Error: 21_566 - .saturating_add(Weight::from_parts(184_607, 0).saturating_mul(l.into())) + // Minimum execution time: 91_484 nanoseconds. + Weight::from_parts(105_466_750, 4764) + // Standard Error: 35_955 + .saturating_add(Weight::from_parts(69_740, 0).saturating_mul(l.into())) + // Standard Error: 68_045 + .saturating_add(Weight::from_parts(139_183, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(Weight::from_parts(0, 25).saturating_mul(l.into())) @@ -126,14 +126,12 @@ impl bifrost_vesting::WeightInfo for BifrostWeight { // Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// The range of component `l` is `[0, 50]`. /// The range of component `s` is `[2, 28]`. - fn vest_other_locked(l: u32, s: u32, ) -> Weight { + fn vest_other_locked(l: u32, _s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `1185 + l * (25 ±0)` // Estimated: `4764 + l * (25 ±0)` - // Minimum execution time: 95_342 nanoseconds. - Weight::from_parts(116_755_700, 4764) - // Standard Error: 56_486 - .saturating_add(Weight::from_parts(91_956, 0).saturating_mul(s.into())) + // Minimum execution time: 95_101 nanoseconds. + Weight::from_parts(126_393_026, 4764) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(Weight::from_parts(0, 25).saturating_mul(l.into())) @@ -154,14 +152,14 @@ impl bifrost_vesting::WeightInfo for BifrostWeight { // Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// The range of component `l` is `[0, 50]`. /// The range of component `s` is `[2, 28]`. - fn vest_other_unlocked(l: u32, _s: u32, ) -> Weight { + fn vest_other_unlocked(l: u32, s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `1185 + l * (25 ±0)` // Estimated: `4764 + l * (25 ±0)` - // Minimum execution time: 97_189 nanoseconds. - Weight::from_parts(116_864_232, 4764) - // Standard Error: 21_279 - .saturating_add(Weight::from_parts(109_449, 0).saturating_mul(l.into())) + // Minimum execution time: 99_292 nanoseconds. + Weight::from_parts(121_977_779, 4764) + // Standard Error: 118_203 + .saturating_add(Weight::from_parts(374_706, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(Weight::from_parts(0, 25).saturating_mul(l.into())) @@ -182,14 +180,16 @@ impl bifrost_vesting::WeightInfo for BifrostWeight { // Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`) /// The range of component `l` is `[0, 50]`. /// The range of component `s` is `[2, 28]`. - fn vested_transfer(_l: u32, s: u32, ) -> Weight { + fn vested_transfer(l: u32, s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `931` // Estimated: `4764` - // Minimum execution time: 151_640 nanoseconds. - Weight::from_parts(182_217_444, 4764) - // Standard Error: 40_563 - .saturating_add(Weight::from_parts(127_217, 0).saturating_mul(s.into())) + // Minimum execution time: 151_769 nanoseconds. + Weight::from_parts(171_122_556, 4764) + // Standard Error: 15_265 + .saturating_add(Weight::from_parts(44_434, 0).saturating_mul(l.into())) + // Standard Error: 28_889 + .saturating_add(Weight::from_parts(85_639, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -213,12 +213,12 @@ impl bifrost_vesting::WeightInfo for BifrostWeight { // Proof Size summary in bytes: // Measured: `1034` // Estimated: `6196` - // Minimum execution time: 151_895 nanoseconds. - Weight::from_parts(180_635_182, 6196) - // Standard Error: 20_366 - .saturating_add(Weight::from_parts(30_678, 0).saturating_mul(l.into())) - // Standard Error: 38_542 - .saturating_add(Weight::from_parts(21_856, 0).saturating_mul(s.into())) + // Minimum execution time: 151_510 nanoseconds. + Weight::from_parts(135_729_962, 6196) + // Standard Error: 67_312 + .saturating_add(Weight::from_parts(801_758, 0).saturating_mul(l.into())) + // Standard Error: 127_387 + .saturating_add(Weight::from_parts(1_265_625, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -236,16 +236,12 @@ impl bifrost_vesting::WeightInfo for BifrostWeight { // Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// The range of component `l` is `[0, 50]`. /// The range of component `s` is `[2, 28]`. - fn not_unlocking_merge_schedules(l: u32, s: u32, ) -> Weight { + fn not_unlocking_merge_schedules(l: u32, _s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `1185 + l * (25 ±0)` // Estimated: `4764 + l * (25 ±0)` - // Minimum execution time: 85_444 nanoseconds. - Weight::from_parts(91_051_639, 4764) - // Standard Error: 17_075 - .saturating_add(Weight::from_parts(292_603, 0).saturating_mul(l.into())) - // Standard Error: 32_315 - .saturating_add(Weight::from_parts(227_466, 0).saturating_mul(s.into())) + // Minimum execution time: 89_282 nanoseconds. + Weight::from_parts(118_519_692, 4764) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(Weight::from_parts(0, 25).saturating_mul(l.into())) @@ -264,16 +260,14 @@ impl bifrost_vesting::WeightInfo for BifrostWeight { // Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// The range of component `l` is `[0, 50]`. /// The range of component `s` is `[2, 28]`. - fn unlocking_merge_schedules(l: u32, s: u32, ) -> Weight { + fn unlocking_merge_schedules(l: u32, _s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `1185 + l * (25 ±0)` // Estimated: `4764 + l * (25 ±0)` - // Minimum execution time: 90_124 nanoseconds. - Weight::from_parts(99_860_688, 4764) - // Standard Error: 14_986 - .saturating_add(Weight::from_parts(156_293, 0).saturating_mul(l.into())) - // Standard Error: 28_361 - .saturating_add(Weight::from_parts(157_874, 0).saturating_mul(s.into())) + // Minimum execution time: 91_400 nanoseconds. + Weight::from_parts(104_368_514, 4764) + // Standard Error: 15_192 + .saturating_add(Weight::from_parts(157_806, 0).saturating_mul(l.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(Weight::from_parts(0, 25).saturating_mul(l.into())) @@ -285,10 +279,10 @@ impl bifrost_vesting::WeightInfo for BifrostWeight { // Proof Size summary in bytes: // Measured: `500 + x * (36 ±0)` // Estimated: `4522` - // Minimum execution time: 19_169 nanoseconds. - Weight::from_parts(23_115_621, 4522) - // Standard Error: 14_845 - .saturating_add(Weight::from_parts(54_429, 0).saturating_mul(x.into())) + // Minimum execution time: 19_231 nanoseconds. + Weight::from_parts(21_300_008, 4522) + // Standard Error: 1_285 + .saturating_add(Weight::from_parts(49_100, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(1)) } } diff --git a/runtime/bifrost-kusama/src/weights/bifrost_vstoken_conversion.rs b/runtime/bifrost-kusama/src/weights/bifrost_vstoken_conversion.rs index f97067044..87c2b4cd6 100644 --- a/runtime/bifrost-kusama/src/weights/bifrost_vstoken_conversion.rs +++ b/runtime/bifrost-kusama/src/weights/bifrost_vstoken_conversion.rs @@ -25,7 +25,7 @@ //! Autogenerated weights for bifrost_vstoken_conversion //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 53.0.0 -//! DATE: 2026-06-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2026-07-03, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! HOSTNAME: `vps-b02dace3`, CPU: `Intel Core Processor (Haswell, no TSX)` //! WASM-EXECUTION: Compiled, CHAIN: Some("bifrost-kusama-local"), DB CACHE: 1024 @@ -60,8 +60,8 @@ impl bifrost_vstoken_conversion::WeightInfo for Bifrost // Proof Size summary in bytes: // Measured: `109` // Estimated: `1517` - // Minimum execution time: 23_886 nanoseconds. - Weight::from_parts(25_160_000, 1517) + // Minimum execution time: 23_810 nanoseconds. + Weight::from_parts(25_311_000, 1517) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -71,8 +71,8 @@ impl bifrost_vstoken_conversion::WeightInfo for Bifrost // Proof Size summary in bytes: // Measured: `109` // Estimated: `3479` - // Minimum execution time: 45_026 nanoseconds. - Weight::from_parts(49_758_000, 3479) + // Minimum execution time: 24_539 nanoseconds. + Weight::from_parts(27_318_000, 3479) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -82,8 +82,8 @@ impl bifrost_vstoken_conversion::WeightInfo for Bifrost // Proof Size summary in bytes: // Measured: `109` // Estimated: `1489` - // Minimum execution time: 34_389 nanoseconds. - Weight::from_parts(42_602_000, 1489) + // Minimum execution time: 21_971 nanoseconds. + Weight::from_parts(24_206_000, 1489) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -105,8 +105,8 @@ impl bifrost_vstoken_conversion::WeightInfo for Bifrost // Proof Size summary in bytes: // Measured: `1427` // Estimated: `11362` - // Minimum execution time: 241_016 nanoseconds. - Weight::from_parts(264_178_000, 11362) + // Minimum execution time: 235_002 nanoseconds. + Weight::from_parts(248_750_000, 11362) .saturating_add(T::DbWeight::get().reads(14)) .saturating_add(T::DbWeight::get().writes(9)) } @@ -128,8 +128,8 @@ impl bifrost_vstoken_conversion::WeightInfo for Bifrost // Proof Size summary in bytes: // Measured: `1419` // Estimated: `11362` - // Minimum execution time: 235_344 nanoseconds. - Weight::from_parts(265_966_000, 11362) + // Minimum execution time: 228_651 nanoseconds. + Weight::from_parts(235_845_000, 11362) .saturating_add(T::DbWeight::get().reads(13)) .saturating_add(T::DbWeight::get().writes(7)) } diff --git a/runtime/bifrost-kusama/src/weights/bifrost_vtoken_minting.rs b/runtime/bifrost-kusama/src/weights/bifrost_vtoken_minting.rs index a26ad86de..df1bc550c 100644 --- a/runtime/bifrost-kusama/src/weights/bifrost_vtoken_minting.rs +++ b/runtime/bifrost-kusama/src/weights/bifrost_vtoken_minting.rs @@ -25,7 +25,7 @@ //! Autogenerated weights for bifrost_vtoken_minting //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 53.0.0 -//! DATE: 2026-06-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2026-07-03, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! HOSTNAME: `vps-b02dace3`, CPU: `Intel Core Processor (Haswell, no TSX)` //! WASM-EXECUTION: Compiled, CHAIN: Some("bifrost-kusama-local"), DB CACHE: 1024 @@ -60,8 +60,8 @@ impl bifrost_vtoken_minting::WeightInfo for BifrostWeig // Proof Size summary in bytes: // Measured: `114` // Estimated: `3579` - // Minimum execution time: 27_604 nanoseconds. - Weight::from_parts(29_744_000, 3579) + // Minimum execution time: 29_566 nanoseconds. + Weight::from_parts(31_302_000, 3579) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -71,8 +71,8 @@ impl bifrost_vtoken_minting::WeightInfo for BifrostWeig // Proof Size summary in bytes: // Measured: `114` // Estimated: `3579` - // Minimum execution time: 27_895 nanoseconds. - Weight::from_parts(29_308_000, 3579) + // Minimum execution time: 28_954 nanoseconds. + Weight::from_parts(29_925_000, 3579) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -82,8 +82,8 @@ impl bifrost_vtoken_minting::WeightInfo for BifrostWeig // Proof Size summary in bytes: // Measured: `114` // Estimated: `3579` - // Minimum execution time: 27_928 nanoseconds. - Weight::from_parts(29_585_000, 3579) + // Minimum execution time: 29_787 nanoseconds. + Weight::from_parts(31_290_000, 3579) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -93,8 +93,8 @@ impl bifrost_vtoken_minting::WeightInfo for BifrostWeig // Proof Size summary in bytes: // Measured: `114` // Estimated: `3579` - // Minimum execution time: 27_356 nanoseconds. - Weight::from_parts(29_465_000, 3579) + // Minimum execution time: 29_089 nanoseconds. + Weight::from_parts(29_677_000, 3579) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -104,8 +104,8 @@ impl bifrost_vtoken_minting::WeightInfo for BifrostWeig // Proof Size summary in bytes: // Measured: `164` // Estimated: `3629` - // Minimum execution time: 31_021 nanoseconds. - Weight::from_parts(32_270_000, 3629) + // Minimum execution time: 31_607 nanoseconds. + Weight::from_parts(32_155_000, 3629) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -115,8 +115,8 @@ impl bifrost_vtoken_minting::WeightInfo for BifrostWeig // Proof Size summary in bytes: // Measured: `114` // Estimated: `1599` - // Minimum execution time: 24_923 nanoseconds. - Weight::from_parts(26_531_000, 1599) + // Minimum execution time: 26_501 nanoseconds. + Weight::from_parts(27_425_000, 1599) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -126,8 +126,8 @@ impl bifrost_vtoken_minting::WeightInfo for BifrostWeig // Proof Size summary in bytes: // Measured: `114` // Estimated: `1599` - // Minimum execution time: 25_098 nanoseconds. - Weight::from_parts(26_006_000, 1599) + // Minimum execution time: 25_594 nanoseconds. + Weight::from_parts(27_150_000, 1599) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -137,8 +137,8 @@ impl bifrost_vtoken_minting::WeightInfo for BifrostWeig // Proof Size summary in bytes: // Measured: `114` // Estimated: `3579` - // Minimum execution time: 27_628 nanoseconds. - Weight::from_parts(29_749_000, 3579) + // Minimum execution time: 29_309 nanoseconds. + Weight::from_parts(30_184_000, 3579) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -148,8 +148,8 @@ impl bifrost_vtoken_minting::WeightInfo for BifrostWeig // Proof Size summary in bytes: // Measured: `114` // Estimated: `3579` - // Minimum execution time: 29_420 nanoseconds. - Weight::from_parts(30_602_000, 3579) + // Minimum execution time: 29_775 nanoseconds. + Weight::from_parts(31_645_000, 3579) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -159,8 +159,8 @@ impl bifrost_vtoken_minting::WeightInfo for BifrostWeig // Proof Size summary in bytes: // Measured: `114` // Estimated: `3579` - // Minimum execution time: 28_900 nanoseconds. - Weight::from_parts(30_752_000, 3579) + // Minimum execution time: 29_513 nanoseconds. + Weight::from_parts(31_082_000, 3579) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -190,8 +190,8 @@ impl bifrost_vtoken_minting::WeightInfo for BifrostWeig // Proof Size summary in bytes: // Measured: `1175` // Estimated: `8769` - // Minimum execution time: 226_554 nanoseconds. - Weight::from_parts(231_237_000, 8769) + // Minimum execution time: 225_547 nanoseconds. + Weight::from_parts(243_815_000, 8769) .saturating_add(T::DbWeight::get().reads(14)) .saturating_add(T::DbWeight::get().writes(8)) } @@ -237,8 +237,8 @@ impl bifrost_vtoken_minting::WeightInfo for BifrostWeig // Proof Size summary in bytes: // Measured: `1662` // Estimated: `6176` - // Minimum execution time: 290_175 nanoseconds. - Weight::from_parts(300_877_000, 6176) + // Minimum execution time: 286_240 nanoseconds. + Weight::from_parts(306_654_000, 6176) .saturating_add(T::DbWeight::get().reads(20)) .saturating_add(T::DbWeight::get().writes(12)) } @@ -254,8 +254,8 @@ impl bifrost_vtoken_minting::WeightInfo for BifrostWeig // Proof Size summary in bytes: // Measured: `1094` // Estimated: `6176` - // Minimum execution time: 127_243 nanoseconds. - Weight::from_parts(183_224_000, 6176) + // Minimum execution time: 114_447 nanoseconds. + Weight::from_parts(117_027_000, 6176) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -289,8 +289,8 @@ impl bifrost_vtoken_minting::WeightInfo for BifrostWeig // Proof Size summary in bytes: // Measured: `1832` // Estimated: `8769` - // Minimum execution time: 267_642 nanoseconds. - Weight::from_parts(280_066_000, 8769) + // Minimum execution time: 260_482 nanoseconds. + Weight::from_parts(290_027_000, 8769) .saturating_add(T::DbWeight::get().reads(16)) .saturating_add(T::DbWeight::get().writes(11)) } @@ -324,8 +324,8 @@ impl bifrost_vtoken_minting::WeightInfo for BifrostWeig // Proof Size summary in bytes: // Measured: `1869` // Estimated: `8769` - // Minimum execution time: 237_324 nanoseconds. - Weight::from_parts(267_272_000, 8769) + // Minimum execution time: 256_636 nanoseconds. + Weight::from_parts(275_574_000, 8769) .saturating_add(T::DbWeight::get().reads(16)) .saturating_add(T::DbWeight::get().writes(11)) } @@ -348,10 +348,10 @@ impl bifrost_vtoken_minting::WeightInfo for BifrostWeig // Proof Size summary in bytes: // Measured: `233 + k * (26 ±0)` // Estimated: `3699 + k * (2501 ±0)` - // Minimum execution time: 54_208 nanoseconds. - Weight::from_parts(9_213_304, 3699) - // Standard Error: 416_857 - .saturating_add(Weight::from_parts(25_046_959, 0).saturating_mul(k.into())) + // Minimum execution time: 50_825 nanoseconds. + Weight::from_parts(39_181_426, 3699) + // Standard Error: 219_195 + .saturating_add(Weight::from_parts(20_566_463, 0).saturating_mul(k.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(k.into()))) .saturating_add(T::DbWeight::get().writes(1)) @@ -392,8 +392,8 @@ impl bifrost_vtoken_minting::WeightInfo for BifrostWeig // Proof Size summary in bytes: // Measured: `1660` // Estimated: `13955` - // Minimum execution time: 531_763 nanoseconds. - Weight::from_parts(555_023_000, 13955) + // Minimum execution time: 425_812 nanoseconds. + Weight::from_parts(470_345_000, 13955) .saturating_add(T::DbWeight::get().reads(22)) .saturating_add(T::DbWeight::get().writes(14)) } @@ -409,8 +409,8 @@ impl bifrost_vtoken_minting::WeightInfo for BifrostWeig // Proof Size summary in bytes: // Measured: `1355` // Estimated: `4820` - // Minimum execution time: 136_325 nanoseconds. - Weight::from_parts(138_391_000, 4820) + // Minimum execution time: 111_777 nanoseconds. + Weight::from_parts(122_973_000, 4820) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -420,8 +420,8 @@ impl bifrost_vtoken_minting::WeightInfo for BifrostWeig // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 24_537 nanoseconds. - Weight::from_parts(26_030_000, 0) + // Minimum execution time: 20_980 nanoseconds. + Weight::from_parts(21_833_000, 0) .saturating_add(T::DbWeight::get().writes(1)) } // Storage: `VtokenMinting::MintWithLockBlocks` (r:0 w:1) @@ -430,8 +430,8 @@ impl bifrost_vtoken_minting::WeightInfo for BifrostWeig // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 23_852 nanoseconds. - Weight::from_parts(25_285_000, 0) + // Minimum execution time: 20_511 nanoseconds. + Weight::from_parts(22_415_000, 0) .saturating_add(T::DbWeight::get().writes(1)) } // Storage: `VtokenMinting::TokenPool` (r:10 w:0) @@ -451,10 +451,10 @@ impl bifrost_vtoken_minting::WeightInfo for BifrostWeig // Proof Size summary in bytes: // Measured: `114` // Estimated: `1104 + n * (2475 ±0)` - // Minimum execution time: 51_473 nanoseconds. - Weight::from_parts(45_521_118, 1104) - // Standard Error: 121_848 - .saturating_add(Weight::from_parts(16_813_938, 0).saturating_mul(n.into())) + // Minimum execution time: 55_240 nanoseconds. + Weight::from_parts(50_085_115, 1104) + // Standard Error: 92_860 + .saturating_add(Weight::from_parts(16_131_801, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes(2)) .saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(n.into()))) @@ -470,8 +470,8 @@ impl bifrost_vtoken_minting::WeightInfo for BifrostWeig // Proof Size summary in bytes: // Measured: `145` // Estimated: `3610` - // Minimum execution time: 32_445 nanoseconds. - Weight::from_parts(36_669_000, 3610) + // Minimum execution time: 36_976 nanoseconds. + Weight::from_parts(38_415_000, 3610) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } diff --git a/runtime/bifrost-kusama/src/weights/bifrost_vtoken_voting.rs b/runtime/bifrost-kusama/src/weights/bifrost_vtoken_voting.rs index 3a3940345..6ebdc5de0 100644 --- a/runtime/bifrost-kusama/src/weights/bifrost_vtoken_voting.rs +++ b/runtime/bifrost-kusama/src/weights/bifrost_vtoken_voting.rs @@ -25,7 +25,7 @@ //! Autogenerated weights for bifrost_vtoken_voting //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 53.0.0 -//! DATE: 2026-06-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2026-07-03, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! HOSTNAME: `vps-b02dace3`, CPU: `Intel Core Processor (Haswell, no TSX)` //! WASM-EXECUTION: Compiled, CHAIN: Some("bifrost-kusama-local"), DB CACHE: 1024 @@ -106,8 +106,8 @@ impl bifrost_vtoken_voting::WeightInfo for BifrostWeigh // Proof Size summary in bytes: // Measured: `14389` // Estimated: `69556` - // Minimum execution time: 351_683 nanoseconds. - Weight::from_parts(421_645_000, 69556) + // Minimum execution time: 403_659 nanoseconds. + Weight::from_parts(445_771_000, 69556) .saturating_add(T::DbWeight::get().reads(24)) .saturating_add(T::DbWeight::get().writes(10)) } @@ -161,8 +161,8 @@ impl bifrost_vtoken_voting::WeightInfo for BifrostWeigh // Proof Size summary in bytes: // Measured: `5910` // Estimated: `69556` - // Minimum execution time: 318_365 nanoseconds. - Weight::from_parts(373_083_000, 69556) + // Minimum execution time: 350_346 nanoseconds. + Weight::from_parts(367_129_000, 69556) .saturating_add(T::DbWeight::get().reads(23)) .saturating_add(T::DbWeight::get().writes(9)) } @@ -190,8 +190,8 @@ impl bifrost_vtoken_voting::WeightInfo for BifrostWeigh // Proof Size summary in bytes: // Measured: `1592` // Estimated: `35273` - // Minimum execution time: 184_896 nanoseconds. - Weight::from_parts(196_807_000, 35273) + // Minimum execution time: 185_231 nanoseconds. + Weight::from_parts(189_899_000, 35273) .saturating_add(T::DbWeight::get().reads(10)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -215,8 +215,8 @@ impl bifrost_vtoken_voting::WeightInfo for BifrostWeigh // Proof Size summary in bytes: // Measured: `1011` // Estimated: `8601` - // Minimum execution time: 105_445 nanoseconds. - Weight::from_parts(126_658_000, 8601) + // Minimum execution time: 108_114 nanoseconds. + Weight::from_parts(110_318_000, 8601) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -230,8 +230,8 @@ impl bifrost_vtoken_voting::WeightInfo for BifrostWeigh // Proof Size summary in bytes: // Measured: `480` // Estimated: `3552` - // Minimum execution time: 46_781 nanoseconds. - Weight::from_parts(49_549_000, 3552) + // Minimum execution time: 46_717 nanoseconds. + Weight::from_parts(48_110_000, 3552) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -243,8 +243,8 @@ impl bifrost_vtoken_voting::WeightInfo for BifrostWeigh // Proof Size summary in bytes: // Measured: `929` // Estimated: `3689` - // Minimum execution time: 53_392 nanoseconds. - Weight::from_parts(61_218_000, 3689) + // Minimum execution time: 57_101 nanoseconds. + Weight::from_parts(58_231_000, 3689) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -254,8 +254,8 @@ impl bifrost_vtoken_voting::WeightInfo for BifrostWeigh // Proof Size summary in bytes: // Measured: `421` // Estimated: `3552` - // Minimum execution time: 37_699 nanoseconds. - Weight::from_parts(42_608_000, 3552) + // Minimum execution time: 39_466 nanoseconds. + Weight::from_parts(41_623_000, 3552) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -265,8 +265,8 @@ impl bifrost_vtoken_voting::WeightInfo for BifrostWeigh // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 17_643 nanoseconds. - Weight::from_parts(19_885_000, 0) + // Minimum execution time: 19_102 nanoseconds. + Weight::from_parts(20_114_000, 0) .saturating_add(T::DbWeight::get().writes(1)) } // Storage: `VtokenVoting::VoteLockingPeriod` (r:0 w:1) @@ -275,8 +275,8 @@ impl bifrost_vtoken_voting::WeightInfo for BifrostWeigh // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 18_583 nanoseconds. - Weight::from_parts(19_916_000, 0) + // Minimum execution time: 19_087 nanoseconds. + Weight::from_parts(19_784_000, 0) .saturating_add(T::DbWeight::get().writes(1)) } // Storage: `VtokenVoting::PendingVotingInfo` (r:1 w:0) @@ -287,8 +287,8 @@ impl bifrost_vtoken_voting::WeightInfo for BifrostWeigh // Proof Size summary in bytes: // Measured: `439` // Estimated: `35273` - // Minimum execution time: 39_909 nanoseconds. - Weight::from_parts(43_905_000, 35273) + // Minimum execution time: 40_950 nanoseconds. + Weight::from_parts(41_861_000, 35273) .saturating_add(T::DbWeight::get().reads(2)) } // Storage: `VtokenVoting::PendingRemoveDelegatorVote` (r:1 w:0) @@ -297,8 +297,8 @@ impl bifrost_vtoken_voting::WeightInfo for BifrostWeigh // Proof Size summary in bytes: // Measured: `394` // Estimated: `3501` - // Minimum execution time: 34_110 nanoseconds. - Weight::from_parts(37_790_000, 3501) + // Minimum execution time: 35_412 nanoseconds. + Weight::from_parts(36_211_000, 3501) .saturating_add(T::DbWeight::get().reads(1)) } // Storage: `VtokenVoting::VoteCapRatio` (r:0 w:1) @@ -307,8 +307,8 @@ impl bifrost_vtoken_voting::WeightInfo for BifrostWeigh // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 17_362 nanoseconds. - Weight::from_parts(20_118_000, 0) + // Minimum execution time: 19_311 nanoseconds. + Weight::from_parts(20_344_000, 0) .saturating_add(T::DbWeight::get().writes(1)) } // Storage: `ParachainSystem::ValidationData` (r:1 w:0) @@ -323,8 +323,8 @@ impl bifrost_vtoken_voting::WeightInfo for BifrostWeigh // Proof Size summary in bytes: // Measured: `218` // Estimated: `3552` - // Minimum execution time: 36_221 nanoseconds. - Weight::from_parts(38_109_000, 3552) + // Minimum execution time: 40_113 nanoseconds. + Weight::from_parts(41_284_000, 3552) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -351,10 +351,10 @@ impl bifrost_vtoken_voting::WeightInfo for BifrostWeigh // Proof Size summary in bytes: // Measured: `2205` // Estimated: `42526 + v * (6 ±0)` - // Minimum execution time: 134_193 nanoseconds. - Weight::from_parts(224_992_230, 42526) - // Standard Error: 18_585 - .saturating_add(Weight::from_parts(56_699, 0).saturating_mul(v.into())) + // Minimum execution time: 149_803 nanoseconds. + Weight::from_parts(204_340_814, 42526) + // Standard Error: 14_848 + .saturating_add(Weight::from_parts(140_383, 0).saturating_mul(v.into())) .saturating_add(T::DbWeight::get().reads(17)) .saturating_add(T::DbWeight::get().writes(5)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(v.into())) @@ -380,10 +380,10 @@ impl bifrost_vtoken_voting::WeightInfo for BifrostWeigh // Proof Size summary in bytes: // Measured: `1515` // Estimated: `42526 + v * (5 ±0)` - // Minimum execution time: 87_793 nanoseconds. - Weight::from_parts(140_358_587, 42526) - // Standard Error: 9_153 - .saturating_add(Weight::from_parts(121_631, 0).saturating_mul(v.into())) + // Minimum execution time: 112_183 nanoseconds. + Weight::from_parts(153_185_294, 42526) + // Standard Error: 12_161 + .saturating_add(Weight::from_parts(50_857, 0).saturating_mul(v.into())) .saturating_add(T::DbWeight::get().reads(16)) .saturating_add(T::DbWeight::get().writes(2)) .saturating_add(Weight::from_parts(0, 5).saturating_mul(v.into())) diff --git a/runtime/bifrost-kusama/src/weights/bifrost_xcm_interface.rs b/runtime/bifrost-kusama/src/weights/bifrost_xcm_interface.rs index 776b53113..c83ad5a68 100644 --- a/runtime/bifrost-kusama/src/weights/bifrost_xcm_interface.rs +++ b/runtime/bifrost-kusama/src/weights/bifrost_xcm_interface.rs @@ -25,7 +25,7 @@ //! Autogenerated weights for bifrost_xcm_interface //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 53.0.0 -//! DATE: 2026-06-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2026-07-03, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! HOSTNAME: `vps-b02dace3`, CPU: `Intel Core Processor (Haswell, no TSX)` //! WASM-EXECUTION: Compiled, CHAIN: Some("bifrost-kusama-local"), DB CACHE: 1024 @@ -60,8 +60,8 @@ impl bifrost_xcm_interface::WeightInfo for BifrostWeigh // Proof Size summary in bytes: // Measured: `109` // Estimated: `3574` - // Minimum execution time: 57_523 nanoseconds. - Weight::from_parts(62_168_000, 3574) + // Minimum execution time: 62_493 nanoseconds. + Weight::from_parts(63_921_000, 3574) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/runtime/bifrost-kusama/src/weights/lend_market.rs b/runtime/bifrost-kusama/src/weights/lend_market.rs index a77a0bd73..f4d53f048 100644 --- a/runtime/bifrost-kusama/src/weights/lend_market.rs +++ b/runtime/bifrost-kusama/src/weights/lend_market.rs @@ -25,7 +25,7 @@ //! Autogenerated weights for lend_market //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 53.0.0 -//! DATE: 2026-06-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2026-07-03, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! HOSTNAME: `vps-b02dace3`, CPU: `Intel Core Processor (Haswell, no TSX)` //! WASM-EXECUTION: Compiled, CHAIN: Some("bifrost-kusama-local"), DB CACHE: 1024 @@ -66,8 +66,8 @@ impl lend_market::WeightInfo for BifrostWeight { // Proof Size summary in bytes: // Measured: `79` // Estimated: `8494` - // Minimum execution time: 56_843 nanoseconds. - Weight::from_parts(62_308_000, 8494) + // Minimum execution time: 61_621 nanoseconds. + Weight::from_parts(63_791_000, 8494) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -77,8 +77,8 @@ impl lend_market::WeightInfo for BifrostWeight { // Proof Size summary in bytes: // Measured: `346` // Estimated: `3811` - // Minimum execution time: 33_261 nanoseconds. - Weight::from_parts(36_233_000, 3811) + // Minimum execution time: 38_652 nanoseconds. + Weight::from_parts(39_380_000, 3811) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -88,8 +88,8 @@ impl lend_market::WeightInfo for BifrostWeight { // Proof Size summary in bytes: // Measured: `346` // Estimated: `3811` - // Minimum execution time: 34_542 nanoseconds. - Weight::from_parts(39_042_000, 3811) + // Minimum execution time: 39_348 nanoseconds. + Weight::from_parts(40_792_000, 3811) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -99,8 +99,8 @@ impl lend_market::WeightInfo for BifrostWeight { // Proof Size summary in bytes: // Measured: `346` // Estimated: `3811` - // Minimum execution time: 37_509 nanoseconds. - Weight::from_parts(41_932_000, 3811) + // Minimum execution time: 42_677 nanoseconds. + Weight::from_parts(44_205_000, 3811) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -112,8 +112,8 @@ impl lend_market::WeightInfo for BifrostWeight { // Proof Size summary in bytes: // Measured: `354` // Estimated: `3819` - // Minimum execution time: 52_414 nanoseconds. - Weight::from_parts(54_945_000, 3819) + // Minimum execution time: 55_673 nanoseconds. + Weight::from_parts(57_004_000, 3819) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -123,8 +123,8 @@ impl lend_market::WeightInfo for BifrostWeight { // Proof Size summary in bytes: // Measured: `103` // Estimated: `6196` - // Minimum execution time: 93_272 nanoseconds. - Weight::from_parts(106_093_000, 6196) + // Minimum execution time: 104_803 nanoseconds. + Weight::from_parts(107_180_000, 6196) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -134,8 +134,8 @@ impl lend_market::WeightInfo for BifrostWeight { // Proof Size summary in bytes: // Measured: `206` // Estimated: `6196` - // Minimum execution time: 88_292 nanoseconds. - Weight::from_parts(105_588_000, 6196) + // Minimum execution time: 99_875 nanoseconds. + Weight::from_parts(101_762_000, 6196) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -153,8 +153,8 @@ impl lend_market::WeightInfo for BifrostWeight { // Proof Size summary in bytes: // Measured: `354` // Estimated: `6294` - // Minimum execution time: 71_276 nanoseconds. - Weight::from_parts(151_768_000, 6294) + // Minimum execution time: 77_344 nanoseconds. + Weight::from_parts(79_599_000, 6294) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -184,8 +184,8 @@ impl lend_market::WeightInfo for BifrostWeight { // Proof Size summary in bytes: // Measured: `376` // Estimated: `6316` - // Minimum execution time: 126_252 nanoseconds. - Weight::from_parts(130_604_000, 6316) + // Minimum execution time: 130_955 nanoseconds. + Weight::from_parts(133_750_000, 6316) .saturating_add(T::DbWeight::get().reads(12)) .saturating_add(T::DbWeight::get().writes(5)) } @@ -219,8 +219,8 @@ impl lend_market::WeightInfo for BifrostWeight { // Proof Size summary in bytes: // Measured: `1102` // Estimated: `6196` - // Minimum execution time: 223_671 nanoseconds. - Weight::from_parts(269_892_000, 6196) + // Minimum execution time: 238_421 nanoseconds. + Weight::from_parts(244_669_000, 6196) .saturating_add(T::DbWeight::get().reads(14)) .saturating_add(T::DbWeight::get().writes(7)) } @@ -258,8 +258,8 @@ impl lend_market::WeightInfo for BifrostWeight { // Proof Size summary in bytes: // Measured: `978` // Estimated: `6918` - // Minimum execution time: 202_568 nanoseconds. - Weight::from_parts(252_780_000, 6918) + // Minimum execution time: 233_590 nanoseconds. + Weight::from_parts(237_136_000, 6918) .saturating_add(T::DbWeight::get().reads(17)) .saturating_add(T::DbWeight::get().writes(10)) } @@ -305,8 +305,8 @@ impl lend_market::WeightInfo for BifrostWeight { // Proof Size summary in bytes: // Measured: `1903` // Estimated: `7843` - // Minimum execution time: 369_582 nanoseconds. - Weight::from_parts(465_276_000, 7843) + // Minimum execution time: 429_322 nanoseconds. + Weight::from_parts(447_619_000, 7843) .saturating_add(T::DbWeight::get().reads(24)) .saturating_add(T::DbWeight::get().writes(8)) } @@ -344,8 +344,8 @@ impl lend_market::WeightInfo for BifrostWeight { // Proof Size summary in bytes: // Measured: `1755` // Estimated: `7695` - // Minimum execution time: 256_743 nanoseconds. - Weight::from_parts(317_211_000, 7695) + // Minimum execution time: 293_068 nanoseconds. + Weight::from_parts(303_199_000, 7695) .saturating_add(T::DbWeight::get().reads(17)) .saturating_add(T::DbWeight::get().writes(9)) } @@ -383,8 +383,8 @@ impl lend_market::WeightInfo for BifrostWeight { // Proof Size summary in bytes: // Measured: `1755` // Estimated: `7695` - // Minimum execution time: 264_193 nanoseconds. - Weight::from_parts(316_263_000, 7695) + // Minimum execution time: 302_966 nanoseconds. + Weight::from_parts(307_963_000, 7695) .saturating_add(T::DbWeight::get().reads(17)) .saturating_add(T::DbWeight::get().writes(10)) } @@ -416,8 +416,8 @@ impl lend_market::WeightInfo for BifrostWeight { // Proof Size summary in bytes: // Measured: `1756` // Estimated: `7696` - // Minimum execution time: 209_671 nanoseconds. - Weight::from_parts(227_512_000, 7696) + // Minimum execution time: 213_302 nanoseconds. + Weight::from_parts(231_411_000, 7696) .saturating_add(T::DbWeight::get().reads(14)) .saturating_add(T::DbWeight::get().writes(8)) } @@ -449,8 +449,8 @@ impl lend_market::WeightInfo for BifrostWeight { // Proof Size summary in bytes: // Measured: `1756` // Estimated: `7696` - // Minimum execution time: 245_651 nanoseconds. - Weight::from_parts(259_624_000, 7696) + // Minimum execution time: 251_728 nanoseconds. + Weight::from_parts(265_869_000, 7696) .saturating_add(T::DbWeight::get().reads(14)) .saturating_add(T::DbWeight::get().writes(8)) } @@ -462,8 +462,8 @@ impl lend_market::WeightInfo for BifrostWeight { // Proof Size summary in bytes: // Measured: `529` // Estimated: `6469` - // Minimum execution time: 68_756 nanoseconds. - Weight::from_parts(90_978_000, 6469) + // Minimum execution time: 78_564 nanoseconds. + Weight::from_parts(79_571_000, 6469) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -513,8 +513,8 @@ impl lend_market::WeightInfo for BifrostWeight { // Proof Size summary in bytes: // Measured: `2915` // Estimated: `13805` - // Minimum execution time: 572_188 nanoseconds. - Weight::from_parts(705_913_000, 13805) + // Minimum execution time: 655_501 nanoseconds. + Weight::from_parts(680_825_000, 13805) .saturating_add(T::DbWeight::get().reads(42)) .saturating_add(T::DbWeight::get().writes(18)) } @@ -532,8 +532,8 @@ impl lend_market::WeightInfo for BifrostWeight { // Proof Size summary in bytes: // Measured: `942` // Estimated: `6882` - // Minimum execution time: 115_409 nanoseconds. - Weight::from_parts(134_180_000, 6882) + // Minimum execution time: 129_983 nanoseconds. + Weight::from_parts(135_568_000, 6882) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -551,8 +551,8 @@ impl lend_market::WeightInfo for BifrostWeight { // Proof Size summary in bytes: // Measured: `1218` // Estimated: `7158` - // Minimum execution time: 116_092 nanoseconds. - Weight::from_parts(134_005_000, 7158) + // Minimum execution time: 125_973 nanoseconds. + Weight::from_parts(136_927_000, 7158) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -562,8 +562,8 @@ impl lend_market::WeightInfo for BifrostWeight { // Proof Size summary in bytes: // Measured: `76` // Estimated: `1561` - // Minimum execution time: 26_881 nanoseconds. - Weight::from_parts(30_325_000, 1561) + // Minimum execution time: 31_025 nanoseconds. + Weight::from_parts(32_342_000, 1561) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/runtime/bifrost-kusama/src/weights/leverage_staking.rs b/runtime/bifrost-kusama/src/weights/leverage_staking.rs index 3634e4d54..59c3fad8d 100644 --- a/runtime/bifrost-kusama/src/weights/leverage_staking.rs +++ b/runtime/bifrost-kusama/src/weights/leverage_staking.rs @@ -25,7 +25,7 @@ //! Autogenerated weights for leverage_staking //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 53.0.0 -//! DATE: 2026-06-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2026-07-03, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! HOSTNAME: `vps-b02dace3`, CPU: `Intel Core Processor (Haswell, no TSX)` //! WASM-EXECUTION: Compiled, CHAIN: Some("bifrost-kusama-local"), DB CACHE: 1024 @@ -120,8 +120,8 @@ impl leverage_staking::WeightInfo for BifrostWeight // Proof Size summary in bytes: // Measured: `3523` // Estimated: `13955` - // Minimum execution time: 1_012_584 nanoseconds. - Weight::from_parts(1_055_700_000, 13955) + // Minimum execution time: 995_519 nanoseconds. + Weight::from_parts(1_048_333_000, 13955) .saturating_add(T::DbWeight::get().reads(49)) .saturating_add(T::DbWeight::get().writes(22)) } diff --git a/runtime/bifrost-kusama/src/xcm_config.rs b/runtime/bifrost-kusama/src/xcm_config.rs index 474aa9cf3..8f35f3c4a 100644 --- a/runtime/bifrost-kusama/src/xcm_config.rs +++ b/runtime/bifrost-kusama/src/xcm_config.rs @@ -402,7 +402,6 @@ impl Contains for DustRemovalWhitelist { SystemMakerPalletId::get().into_account_truncating(), ZenklinkFeeAccount::get(), CommissionPalletId::get().into_account_truncating(), - ParachainStakingPalletId::get().into_account_truncating(), SystemStakingPalletId::get().into_account_truncating(), VBNCConvertPalletId::get().into_account_truncating(), ]; diff --git a/runtime/bifrost-paseo/src/lib.rs b/runtime/bifrost-paseo/src/lib.rs index 270f908bf..1e78f5fee 100644 --- a/runtime/bifrost-paseo/src/lib.rs +++ b/runtime/bifrost-paseo/src/lib.rs @@ -199,7 +199,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: Cow::Borrowed("bifrost_paseo"), impl_name: Cow::Borrowed("bifrost_paseo"), authoring_version: 0, - spec_version: 25001, + spec_version: 25002, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 1, @@ -1748,25 +1748,11 @@ pub type Migrations = migrations::Unreleased; pub mod migrations { use super::*; - parameter_types! { - pub const RemovedHyperbridgePalletName: &'static str = "Hyperbridge"; - pub const RemovedTokenGatewayPalletName: &'static str = "TokenGateway"; - } - /// Unreleased migrations. Add new ones here: pub type Unreleased = ( + bb_bnc::migrations::v2::MigrateToV2, // permanent migration, do not remove pallet_xcm::migration::MigrateToLatestXcmVersion, - migration::MigrateLegacyHyperbridgeCustody, - frame_support::migrations::RemovePallet, - frame_support::migrations::RemovePallet, - bifrost_slp_v2::migrations::v3::SlpV2StorageV2MigrationToV3, - bifrost_fee_share::migration::MigrateDollarStandardInfoToV2< - Runtime, - FeeShareUsdtCurrencyId, - FeeShareUsdtSwapPalletId, - >, - bb_bnc::migrations::v1::MigrateToV1, ); } diff --git a/runtime/bifrost-polkadot/src/lib.rs b/runtime/bifrost-polkadot/src/lib.rs index fa15dd381..e0043b93f 100644 --- a/runtime/bifrost-polkadot/src/lib.rs +++ b/runtime/bifrost-polkadot/src/lib.rs @@ -203,7 +203,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: Cow::Borrowed("bifrost_polkadot"), impl_name: Cow::Borrowed("bifrost_polkadot"), authoring_version: 0, - spec_version: 25000, + spec_version: 25002, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 1, @@ -727,7 +727,7 @@ parameter_types! { hex!["b6ba81e73bd39203e006fc99cc1e41976745de2ea2007bf62ed7c9a48ccc5b1d"].into(), hex!["ce42cea2dd0d4ac87ccdd5f0f2e1010955467f5a37587cf6af8ee2b4ba781034"].into(), ],vec![]); - pub PaymentInRound: u128 = 180 * BNCS; + pub PaymentInRound: u128 = 90 * BNCS; pub InitSeedStk: u128 = 5000 * BNCS; } impl bifrost_parachain_staking::Config for Runtime { @@ -1764,25 +1764,11 @@ pub type Migrations = migrations::Unreleased; pub mod migrations { use super::*; - parameter_types! { - pub const RemovedHyperbridgePalletName: &'static str = "Hyperbridge"; - pub const RemovedTokenGatewayPalletName: &'static str = "TokenGateway"; - } - /// Unreleased migrations. Add new ones here: pub type Unreleased = ( + bb_bnc::migrations::v2::MigrateToV2, // permanent migration, do not remove pallet_xcm::migration::MigrateToLatestXcmVersion, - migration::MigrateLegacyHyperbridgeCustody, - frame_support::migrations::RemovePallet, - frame_support::migrations::RemovePallet, - bifrost_slp_v2::migrations::v3::SlpV2StorageV2MigrationToV3, - bifrost_fee_share::migration::MigrateDollarStandardInfoToV2< - Runtime, - FeeShareUsdtCurrencyId, - FeeShareUsdtSwapPalletId, - >, - bb_bnc::migrations::v1::MigrateToV1, ); } diff --git a/runtime/bifrost-polkadot/src/weights/bb_bnc.rs b/runtime/bifrost-polkadot/src/weights/bb_bnc.rs index 675e7d9a4..582c4dd63 100644 --- a/runtime/bifrost-polkadot/src/weights/bb_bnc.rs +++ b/runtime/bifrost-polkadot/src/weights/bb_bnc.rs @@ -25,7 +25,7 @@ //! Autogenerated weights for bb_bnc //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 53.0.0 -//! DATE: 2026-06-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2026-07-03, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! HOSTNAME: `vps-b02dace3`, CPU: `Intel Core Processor (Haswell, no TSX)` //! WASM-EXECUTION: Compiled, CHAIN: Some("bifrost-polkadot-local"), DB CACHE: 1024 @@ -54,26 +54,26 @@ use sp_std::marker::PhantomData; /// Weight functions for bb_bnc. pub struct BifrostWeight(PhantomData); impl bb_bnc::WeightInfo for BifrostWeight { - // Storage: `BbBNC::IncentiveConfigs` (r:1 w:0) - // Proof: `BbBNC::IncentiveConfigs` (`max_values`: None, `max_size`: None, mode: `Measured`) // Storage: `BbBNC::NextExpiringBlock` (r:1 w:0) // Proof: `BbBNC::NextExpiringBlock` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `BbBNC::IncentiveConfigs` (r:1 w:0) + // Proof: `BbBNC::IncentiveConfigs` (`max_values`: None, `max_size`: None, mode: `Measured`) fn on_initialize() -> Weight { // Proof Size summary in bytes: - // Measured: `292` - // Estimated: `3757` - // Minimum execution time: 21_890 nanoseconds. - Weight::from_parts(24_257_000, 3757) + // Measured: `259` + // Estimated: `3724` + // Minimum execution time: 23_031 nanoseconds. + Weight::from_parts(23_894_000, 3724) .saturating_add(T::DbWeight::get().reads(2)) } // Storage: `BbBNC::BbConfigs` (r:1 w:1) // Proof: `BbBNC::BbConfigs` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn set_config() -> Weight { // Proof Size summary in bytes: - // Measured: `142` - // Estimated: `1627` - // Minimum execution time: 21_890 nanoseconds. - Weight::from_parts(25_250_000, 1627) + // Measured: `109` + // Estimated: `1594` + // Minimum execution time: 22_320 nanoseconds. + Weight::from_parts(24_585_000, 1594) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -111,14 +111,16 @@ impl bb_bnc::WeightInfo for BifrostWeight { // Proof: `BbBNC::UserPointEpoch` (`max_values`: None, `max_size`: None, mode: `Measured`) // Storage: `BbBNC::Rewards` (r:1 w:0) // Proof: `BbBNC::Rewards` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `BbBNC::UserRewardPerTokenPaid` (r:1 w:1) + // Proof: `BbBNC::UserRewardPerTokenPaid` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `BbBNC::BoostedSupply` (r:1 w:1) + // Proof: `BbBNC::BoostedSupply` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) // Storage: `BbBNC::SlopeChanges` (r:2 w:1) // Proof: `BbBNC::SlopeChanges` (`max_values`: None, `max_size`: None, mode: `Measured`) // Storage: `Farming::UserFarmingPool` (r:1 w:1) // Proof: `Farming::UserFarmingPool` (`max_values`: None, `max_size`: None, mode: `Measured`) // Storage: `BbBNC::UserPointHistory` (r:0 w:1) // Proof: `BbBNC::UserPointHistory` (`max_values`: None, `max_size`: None, mode: `Measured`) - // Storage: `BbBNC::UserRewardPerTokenPaid` (r:0 w:1) - // Proof: `BbBNC::UserRewardPerTokenPaid` (`max_values`: None, `max_size`: None, mode: `Measured`) // Storage: `BbBNC::Locked` (r:0 w:1) // Proof: `BbBNC::Locked` (`max_values`: None, `max_size`: None, mode: `Measured`) // Storage: `BbBNC::PositionOwner` (r:0 w:1) @@ -127,10 +129,10 @@ impl bb_bnc::WeightInfo for BifrostWeight { // Proof Size summary in bytes: // Measured: `1389` // Estimated: `7329` - // Minimum execution time: 269_211 nanoseconds. - Weight::from_parts(290_444_000, 7329) - .saturating_add(T::DbWeight::get().reads(20)) - .saturating_add(T::DbWeight::get().writes(19)) + // Minimum execution time: 261_234 nanoseconds. + Weight::from_parts(282_762_000, 7329) + .saturating_add(T::DbWeight::get().reads(22)) + .saturating_add(T::DbWeight::get().writes(20)) } // Storage: `BbBNC::UserPositions` (r:1 w:0) // Proof: `BbBNC::UserPositions` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -148,6 +150,8 @@ impl bb_bnc::WeightInfo for BifrostWeight { // Proof: `AssetRegistry::CurrencyMetadatas` (`max_values`: None, `max_size`: None, mode: `Measured`) // Storage: `BbBNC::UserMarkupInfos` (r:1 w:0) // Proof: `BbBNC::UserMarkupInfos` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `BbBNC::NextExpiringBlock` (r:1 w:0) + // Proof: `BbBNC::NextExpiringBlock` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) // Storage: `BbBNC::IncentiveConfigs` (r:1 w:1) // Proof: `BbBNC::IncentiveConfigs` (`max_values`: None, `max_size`: None, mode: `Measured`) // Storage: `BbBNC::Epoch` (r:1 w:1) @@ -162,18 +166,20 @@ impl bb_bnc::WeightInfo for BifrostWeight { // Proof: `BbBNC::Rewards` (`max_values`: None, `max_size`: None, mode: `Measured`) // Storage: `BbBNC::UserRewardPerTokenPaid` (r:1 w:1) // Proof: `BbBNC::UserRewardPerTokenPaid` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `BbBNC::BoostedSupply` (r:1 w:1) + // Proof: `BbBNC::BoostedSupply` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) // Storage: `BbBNC::SlopeChanges` (r:1 w:1) // Proof: `BbBNC::SlopeChanges` (`max_values`: None, `max_size`: None, mode: `Measured`) // Storage: `Farming::UserFarmingPool` (r:1 w:1) // Proof: `Farming::UserFarmingPool` (`max_values`: None, `max_size`: None, mode: `Measured`) fn increase_amount() -> Weight { // Proof Size summary in bytes: - // Measured: `2368` - // Estimated: `5833` - // Minimum execution time: 290_930 nanoseconds. - Weight::from_parts(339_460_000, 5833) - .saturating_add(T::DbWeight::get().reads(17)) - .saturating_add(T::DbWeight::get().writes(14)) + // Measured: `2408` + // Estimated: `5873` + // Minimum execution time: 307_694 nanoseconds. + Weight::from_parts(319_429_000, 5873) + .saturating_add(T::DbWeight::get().reads(19)) + .saturating_add(T::DbWeight::get().writes(15)) } // Storage: `BbBNC::UserPositions` (r:1 w:0) // Proof: `BbBNC::UserPositions` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -181,7 +187,7 @@ impl bb_bnc::WeightInfo for BifrostWeight { // Proof: `BbBNC::BbConfigs` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) // Storage: `BbBNC::Locked` (r:1 w:1) // Proof: `BbBNC::Locked` (`max_values`: None, `max_size`: None, mode: `Measured`) - // Storage: `BbBNC::ExpiringPositions` (r:1 w:2) + // Storage: `BbBNC::ExpiringPositions` (r:3 w:2) // Proof: `BbBNC::ExpiringPositions` (`max_values`: None, `max_size`: None, mode: `Measured`) // Storage: `BbBNC::NextExpiringBlock` (r:1 w:1) // Proof: `BbBNC::NextExpiringBlock` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) @@ -205,35 +211,29 @@ impl bb_bnc::WeightInfo for BifrostWeight { // Proof: `BbBNC::Rewards` (`max_values`: None, `max_size`: None, mode: `Measured`) // Storage: `BbBNC::UserRewardPerTokenPaid` (r:1 w:1) // Proof: `BbBNC::UserRewardPerTokenPaid` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `BbBNC::BoostedSupply` (r:1 w:1) + // Proof: `BbBNC::BoostedSupply` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) // Storage: `BbBNC::SlopeChanges` (r:2 w:2) // Proof: `BbBNC::SlopeChanges` (`max_values`: None, `max_size`: None, mode: `Measured`) // Storage: `Farming::UserFarmingPool` (r:1 w:1) // Proof: `Farming::UserFarmingPool` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `BbBNC::ExpiryRewardPerToken` (r:0 w:1) + // Proof: `BbBNC::ExpiryRewardPerToken` (`max_values`: None, `max_size`: None, mode: `Measured`) fn increase_unlock_time() -> Weight { // Proof Size summary in bytes: - // Measured: `1718` - // Estimated: `7658` - // Minimum execution time: 253_214 nanoseconds. - Weight::from_parts(298_732_000, 7658) - .saturating_add(T::DbWeight::get().reads(18)) - .saturating_add(T::DbWeight::get().writes(15)) + // Measured: `1800` + // Estimated: `10215` + // Minimum execution time: 280_151 nanoseconds. + Weight::from_parts(300_575_000, 10215) + .saturating_add(T::DbWeight::get().reads(21)) + .saturating_add(T::DbWeight::get().writes(17)) } // Storage: `BbBNC::UserPositions` (r:1 w:1) // Proof: `BbBNC::UserPositions` (`max_values`: None, `max_size`: None, mode: `Measured`) // Storage: `BbBNC::Locked` (r:1 w:1) // Proof: `BbBNC::Locked` (`max_values`: None, `max_size`: None, mode: `Measured`) - // Storage: `BbBNC::Supply` (r:1 w:1) - // Proof: `BbBNC::Supply` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - // Storage: `BbBNC::UserLocked` (r:1 w:1) - // Proof: `BbBNC::UserLocked` (`max_values`: None, `max_size`: None, mode: `Measured`) - // Storage: `Tokens::Locks` (r:1 w:1) - // Proof: `Tokens::Locks` (`max_values`: None, `max_size`: Some(1271), added: 3746, mode: `MaxEncodedLen`) - // Storage: `Tokens::Accounts` (r:1 w:1) - // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(118), added: 2593, mode: `MaxEncodedLen`) - // Storage: `AssetRegistry::CurrencyMetadatas` (r:1 w:0) - // Proof: `AssetRegistry::CurrencyMetadatas` (`max_values`: None, `max_size`: None, mode: `Measured`) - // Storage: `System::Account` (r:1 w:1) - // Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + // Storage: `BbBNC::ExpiryRewardPerToken` (r:1 w:1) + // Proof: `BbBNC::ExpiryRewardPerToken` (`max_values`: None, `max_size`: None, mode: `Measured`) // Storage: `BbBNC::IncentiveConfigs` (r:1 w:1) // Proof: `BbBNC::IncentiveConfigs` (`max_values`: None, `max_size`: None, mode: `Measured`) // Storage: `BbBNC::Epoch` (r:1 w:1) @@ -242,55 +242,85 @@ impl bb_bnc::WeightInfo for BifrostWeight { // Proof: `BbBNC::PointHistory` (`max_values`: None, `max_size`: None, mode: `Measured`) // Storage: `BbBNC::SlopeChanges` (r:52 w:0) // Proof: `BbBNC::SlopeChanges` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `BbBNC::UserPointEpoch` (r:1 w:1) + // Proof: `BbBNC::UserPointEpoch` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `BbBNC::UserPointHistory` (r:1 w:1) + // Proof: `BbBNC::UserPointHistory` (`max_values`: None, `max_size`: None, mode: `Measured`) // Storage: `BbBNC::Rewards` (r:1 w:1) // Proof: `BbBNC::Rewards` (`max_values`: None, `max_size`: None, mode: `Measured`) // Storage: `BbBNC::UserRewardPerTokenPaid` (r:1 w:1) // Proof: `BbBNC::UserRewardPerTokenPaid` (`max_values`: None, `max_size`: None, mode: `Measured`) - // Storage: `BbBNC::UserPointEpoch` (r:1 w:1) - // Proof: `BbBNC::UserPointEpoch` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `BbBNC::Supply` (r:1 w:1) + // Proof: `BbBNC::Supply` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `BbBNC::UserLocked` (r:1 w:1) + // Proof: `BbBNC::UserLocked` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Tokens::Locks` (r:1 w:1) + // Proof: `Tokens::Locks` (`max_values`: None, `max_size`: Some(1271), added: 3746, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(118), added: 2593, mode: `MaxEncodedLen`) + // Storage: `AssetRegistry::CurrencyMetadatas` (r:1 w:0) + // Proof: `AssetRegistry::CurrencyMetadatas` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `System::Account` (r:1 w:1) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + // Storage: `BbBNC::UserMarkupInfos` (r:1 w:0) + // Proof: `BbBNC::UserMarkupInfos` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `BbBNC::NextExpiringBlock` (r:1 w:0) + // Proof: `BbBNC::NextExpiringBlock` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `BbBNC::BoostedSupply` (r:1 w:1) + // Proof: `BbBNC::BoostedSupply` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) // Storage: `Farming::UserFarmingPool` (r:1 w:1) // Proof: `Farming::UserFarmingPool` (`max_values`: None, `max_size`: None, mode: `Measured`) - // Storage: `BbBNC::UserPointHistory` (r:0 w:1) - // Proof: `BbBNC::UserPointHistory` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `BbBNC::ExpiringPositions` (r:2 w:1) + // Proof: `BbBNC::ExpiringPositions` (`max_values`: None, `max_size`: None, mode: `Measured`) // Storage: `BbBNC::PermanentLock` (r:0 w:1) // Proof: `BbBNC::PermanentLock` (`max_values`: None, `max_size`: None, mode: `Measured`) // Storage: `BbBNC::PositionOwner` (r:0 w:1) // Proof: `BbBNC::PositionOwner` (`max_values`: None, `max_size`: None, mode: `Measured`) - // Storage: `BbBNC::ExpiringPositions` (r:0 w:1) - // Proof: `BbBNC::ExpiringPositions` (`max_values`: None, `max_size`: None, mode: `Measured`) fn withdraw() -> Weight { // Proof Size summary in bytes: - // Measured: `2348` - // Estimated: `132038` - // Minimum execution time: 897_571 nanoseconds. - Weight::from_parts(964_205_000, 132038) - .saturating_add(T::DbWeight::get().reads(67)) - .saturating_add(T::DbWeight::get().writes(70)) + // Measured: `2619` + // Estimated: `132309` + // Minimum execution time: 956_864 nanoseconds. + Weight::from_parts(978_367_000, 132309) + .saturating_add(T::DbWeight::get().reads(74)) + .saturating_add(T::DbWeight::get().writes(72)) } + // Storage: `BbBNC::NextExpiringBlock` (r:1 w:0) + // Proof: `BbBNC::NextExpiringBlock` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `BbBNC::UserPositions` (r:1 w:0) + // Proof: `BbBNC::UserPositions` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `BbBNC::Locked` (r:20 w:0) + // Proof: `BbBNC::Locked` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `BbBNC::ExpiringPositions` (r:20 w:0) + // Proof: `BbBNC::ExpiringPositions` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `BbBNC::ExpiryRewardPerToken` (r:1 w:1) + // Proof: `BbBNC::ExpiryRewardPerToken` (`max_values`: None, `max_size`: None, mode: `Measured`) // Storage: `BbBNC::IncentiveConfigs` (r:1 w:1) // Proof: `BbBNC::IncentiveConfigs` (`max_values`: None, `max_size`: None, mode: `Measured`) // Storage: `BbBNC::Epoch` (r:1 w:0) // Proof: `BbBNC::Epoch` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) // Storage: `BbBNC::PointHistory` (r:1 w:0) // Proof: `BbBNC::PointHistory` (`max_values`: None, `max_size`: None, mode: `Measured`) - // Storage: `BbBNC::SlopeChanges` (r:52 w:0) - // Proof: `BbBNC::SlopeChanges` (`max_values`: None, `max_size`: None, mode: `Measured`) - // Storage: `BbBNC::UserPositions` (r:1 w:0) - // Proof: `BbBNC::UserPositions` (`max_values`: None, `max_size`: None, mode: `Measured`) - // Storage: `BbBNC::Locked` (r:1 w:0) - // Proof: `BbBNC::Locked` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `BbBNC::UserPointEpoch` (r:20 w:0) + // Proof: `BbBNC::UserPointEpoch` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `BbBNC::UserPointHistory` (r:20 w:0) + // Proof: `BbBNC::UserPointHistory` (`max_values`: None, `max_size`: None, mode: `Measured`) // Storage: `BbBNC::Rewards` (r:1 w:1) // Proof: `BbBNC::Rewards` (`max_values`: None, `max_size`: None, mode: `Measured`) // Storage: `BbBNC::UserRewardPerTokenPaid` (r:1 w:1) // Proof: `BbBNC::UserRewardPerTokenPaid` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `BbBNC::SlopeChanges` (r:1 w:0) + // Proof: `BbBNC::SlopeChanges` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `System::Account` (r:4 w:4) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn get_rewards() -> Weight { // Proof Size summary in bytes: - // Measured: `974` - // Estimated: `130664` - // Minimum execution time: 423_146 nanoseconds. - Weight::from_parts(447_848_000, 130664) - .saturating_add(T::DbWeight::get().reads(59)) - .saturating_add(T::DbWeight::get().writes(3)) + // Measured: `8240` + // Estimated: `58730` + // Minimum execution time: 1_152_192 nanoseconds. + Weight::from_parts(1_177_348_000, 58730) + .saturating_add(T::DbWeight::get().reads(93)) + .saturating_add(T::DbWeight::get().writes(8)) } // Storage: `BbBNC::IncentiveConfigs` (r:1 w:1) // Proof: `BbBNC::IncentiveConfigs` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -302,10 +332,10 @@ impl bb_bnc::WeightInfo for BifrostWeight { // Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn notify_rewards() -> Weight { // Proof Size summary in bytes: - // Measured: `423` + // Measured: `390` // Estimated: `6196` - // Minimum execution time: 158_462 nanoseconds. - Weight::from_parts(181_043_000, 6196) + // Minimum execution time: 172_999 nanoseconds. + Weight::from_parts(178_407_000, 6196) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -315,8 +345,8 @@ impl bb_bnc::WeightInfo for BifrostWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 13_624 nanoseconds. - Weight::from_parts(15_224_000, 0) + // Minimum execution time: 13_583 nanoseconds. + Weight::from_parts(14_824_000, 0) .saturating_add(T::DbWeight::get().writes(1)) } // Storage: `BbBNC::MarkupCoefficient` (r:1 w:1) @@ -341,6 +371,12 @@ impl bb_bnc::WeightInfo for BifrostWeight { // Proof: `BbBNC::UserPositions` (`max_values`: None, `max_size`: None, mode: `Measured`) // Storage: `BbBNC::Locked` (r:1 w:0) // Proof: `BbBNC::Locked` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `BbBNC::NextExpiringBlock` (r:1 w:0) + // Proof: `BbBNC::NextExpiringBlock` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `BbBNC::ExpiringPositions` (r:1 w:0) + // Proof: `BbBNC::ExpiringPositions` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `BbBNC::ExpiryRewardPerToken` (r:1 w:1) + // Proof: `BbBNC::ExpiryRewardPerToken` (`max_values`: None, `max_size`: None, mode: `Measured`) // Storage: `BbBNC::IncentiveConfigs` (r:1 w:1) // Proof: `BbBNC::IncentiveConfigs` (`max_values`: None, `max_size`: None, mode: `Measured`) // Storage: `BbBNC::Epoch` (r:1 w:1) @@ -349,24 +385,24 @@ impl bb_bnc::WeightInfo for BifrostWeight { // Proof: `BbBNC::PointHistory` (`max_values`: None, `max_size`: None, mode: `Measured`) // Storage: `BbBNC::SlopeChanges` (r:52 w:0) // Proof: `BbBNC::SlopeChanges` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `BbBNC::UserPointEpoch` (r:1 w:1) + // Proof: `BbBNC::UserPointEpoch` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `BbBNC::UserPointHistory` (r:1 w:1) + // Proof: `BbBNC::UserPointHistory` (`max_values`: None, `max_size`: None, mode: `Measured`) // Storage: `BbBNC::Rewards` (r:1 w:1) // Proof: `BbBNC::Rewards` (`max_values`: None, `max_size`: None, mode: `Measured`) // Storage: `BbBNC::UserRewardPerTokenPaid` (r:1 w:1) // Proof: `BbBNC::UserRewardPerTokenPaid` (`max_values`: None, `max_size`: None, mode: `Measured`) - // Storage: `BbBNC::Supply` (r:1 w:0) - // Proof: `BbBNC::Supply` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - // Storage: `BbBNC::UserPointEpoch` (r:1 w:1) - // Proof: `BbBNC::UserPointEpoch` (`max_values`: None, `max_size`: None, mode: `Measured`) - // Storage: `BbBNC::UserPointHistory` (r:0 w:1) - // Proof: `BbBNC::UserPointHistory` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `BbBNC::BoostedSupply` (r:1 w:1) + // Proof: `BbBNC::BoostedSupply` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn deposit_markup() -> Weight { // Proof Size summary in bytes: - // Measured: `2327` - // Estimated: `132017` - // Minimum execution time: 783_716 nanoseconds. - Weight::from_parts(910_892_000, 132017) - .saturating_add(T::DbWeight::get().reads(70)) - .saturating_add(T::DbWeight::get().writes(65)) + // Measured: `2520` + // Estimated: `132210` + // Minimum execution time: 843_303 nanoseconds. + Weight::from_parts(877_161_000, 132210) + .saturating_add(T::DbWeight::get().reads(74)) + .saturating_add(T::DbWeight::get().writes(67)) } // Storage: `BbBNC::MarkupCoefficient` (r:1 w:1) // Proof: `BbBNC::MarkupCoefficient` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -386,6 +422,12 @@ impl bb_bnc::WeightInfo for BifrostWeight { // Proof: `BbBNC::UserPositions` (`max_values`: None, `max_size`: None, mode: `Measured`) // Storage: `BbBNC::Locked` (r:1 w:0) // Proof: `BbBNC::Locked` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `BbBNC::NextExpiringBlock` (r:1 w:0) + // Proof: `BbBNC::NextExpiringBlock` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `BbBNC::ExpiringPositions` (r:1 w:0) + // Proof: `BbBNC::ExpiringPositions` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `BbBNC::ExpiryRewardPerToken` (r:1 w:1) + // Proof: `BbBNC::ExpiryRewardPerToken` (`max_values`: None, `max_size`: None, mode: `Measured`) // Storage: `BbBNC::IncentiveConfigs` (r:1 w:1) // Proof: `BbBNC::IncentiveConfigs` (`max_values`: None, `max_size`: None, mode: `Measured`) // Storage: `BbBNC::Epoch` (r:1 w:1) @@ -394,29 +436,47 @@ impl bb_bnc::WeightInfo for BifrostWeight { // Proof: `BbBNC::PointHistory` (`max_values`: None, `max_size`: None, mode: `Measured`) // Storage: `BbBNC::SlopeChanges` (r:52 w:0) // Proof: `BbBNC::SlopeChanges` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `BbBNC::UserPointEpoch` (r:1 w:1) + // Proof: `BbBNC::UserPointEpoch` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `BbBNC::UserPointHistory` (r:2 w:1) + // Proof: `BbBNC::UserPointHistory` (`max_values`: None, `max_size`: None, mode: `Measured`) // Storage: `BbBNC::Rewards` (r:1 w:1) // Proof: `BbBNC::Rewards` (`max_values`: None, `max_size`: None, mode: `Measured`) // Storage: `BbBNC::UserRewardPerTokenPaid` (r:1 w:1) // Proof: `BbBNC::UserRewardPerTokenPaid` (`max_values`: None, `max_size`: None, mode: `Measured`) - // Storage: `BbBNC::Supply` (r:1 w:0) - // Proof: `BbBNC::Supply` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - // Storage: `BbBNC::UserPointEpoch` (r:1 w:1) - // Proof: `BbBNC::UserPointEpoch` (`max_values`: None, `max_size`: None, mode: `Measured`) - // Storage: `BbBNC::UserPointHistory` (r:0 w:1) - // Proof: `BbBNC::UserPointHistory` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `BbBNC::BoostedSupply` (r:1 w:1) + // Proof: `BbBNC::BoostedSupply` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn withdraw_markup() -> Weight { // Proof Size summary in bytes: - // Measured: `2671` - // Estimated: `132361` - // Minimum execution time: 860_423 nanoseconds. - Weight::from_parts(909_087_000, 132361) - .saturating_add(T::DbWeight::get().reads(68)) - .saturating_add(T::DbWeight::get().writes(65)) + // Measured: `2884` + // Estimated: `132574` + // Minimum execution time: 860_203 nanoseconds. + Weight::from_parts(890_290_000, 132574) + .saturating_add(T::DbWeight::get().reads(73)) + .saturating_add(T::DbWeight::get().writes(67)) } // Storage: `BbBNC::UserPositions` (r:1 w:1) // Proof: `BbBNC::UserPositions` (`max_values`: None, `max_size`: None, mode: `Measured`) // Storage: `BbBNC::Locked` (r:1 w:1) // Proof: `BbBNC::Locked` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `BbBNC::ExpiringPositions` (r:2 w:1) + // Proof: `BbBNC::ExpiringPositions` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `BbBNC::NextExpiringBlock` (r:1 w:0) + // Proof: `BbBNC::NextExpiringBlock` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `BbBNC::IncentiveConfigs` (r:1 w:1) + // Proof: `BbBNC::IncentiveConfigs` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `BbBNC::Epoch` (r:1 w:1) + // Proof: `BbBNC::Epoch` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `BbBNC::PointHistory` (r:1 w:1) + // Proof: `BbBNC::PointHistory` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `BbBNC::UserPointEpoch` (r:1 w:1) + // Proof: `BbBNC::UserPointEpoch` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `BbBNC::UserPointHistory` (r:1 w:1) + // Proof: `BbBNC::UserPointHistory` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `BbBNC::Rewards` (r:1 w:1) + // Proof: `BbBNC::Rewards` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `BbBNC::UserRewardPerTokenPaid` (r:1 w:1) + // Proof: `BbBNC::UserRewardPerTokenPaid` (`max_values`: None, `max_size`: None, mode: `Measured`) // Storage: `BbBNC::Supply` (r:1 w:1) // Proof: `BbBNC::Supply` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) // Storage: `BbBNC::UserLocked` (r:1 w:1) @@ -429,38 +489,28 @@ impl bb_bnc::WeightInfo for BifrostWeight { // Proof: `AssetRegistry::CurrencyMetadatas` (`max_values`: None, `max_size`: None, mode: `Measured`) // Storage: `System::Account` (r:2 w:1) // Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - // Storage: `BbBNC::IncentiveConfigs` (r:1 w:1) - // Proof: `BbBNC::IncentiveConfigs` (`max_values`: None, `max_size`: None, mode: `Measured`) - // Storage: `BbBNC::Epoch` (r:1 w:1) - // Proof: `BbBNC::Epoch` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - // Storage: `BbBNC::PointHistory` (r:1 w:1) - // Proof: `BbBNC::PointHistory` (`max_values`: None, `max_size`: None, mode: `Measured`) - // Storage: `BbBNC::Rewards` (r:1 w:1) - // Proof: `BbBNC::Rewards` (`max_values`: None, `max_size`: None, mode: `Measured`) - // Storage: `BbBNC::UserRewardPerTokenPaid` (r:1 w:1) - // Proof: `BbBNC::UserRewardPerTokenPaid` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `BbBNC::UserMarkupInfos` (r:1 w:0) + // Proof: `BbBNC::UserMarkupInfos` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `BbBNC::BoostedSupply` (r:1 w:1) + // Proof: `BbBNC::BoostedSupply` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) // Storage: `BbBNC::SlopeChanges` (r:1 w:1) // Proof: `BbBNC::SlopeChanges` (`max_values`: None, `max_size`: None, mode: `Measured`) - // Storage: `BbBNC::UserPointEpoch` (r:1 w:1) - // Proof: `BbBNC::UserPointEpoch` (`max_values`: None, `max_size`: None, mode: `Measured`) // Storage: `Farming::UserFarmingPool` (r:1 w:1) // Proof: `Farming::UserFarmingPool` (`max_values`: None, `max_size`: None, mode: `Measured`) - // Storage: `BbBNC::UserPointHistory` (r:0 w:1) - // Proof: `BbBNC::UserPointHistory` (`max_values`: None, `max_size`: None, mode: `Measured`) // Storage: `BbBNC::PermanentLock` (r:0 w:1) // Proof: `BbBNC::PermanentLock` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `BbBNC::ExpiryRewardPerToken` (r:0 w:1) + // Proof: `BbBNC::ExpiryRewardPerToken` (`max_values`: None, `max_size`: None, mode: `Measured`) // Storage: `BbBNC::PositionOwner` (r:0 w:1) // Proof: `BbBNC::PositionOwner` (`max_values`: None, `max_size`: None, mode: `Measured`) - // Storage: `BbBNC::ExpiringPositions` (r:0 w:1) - // Proof: `BbBNC::ExpiringPositions` (`max_values`: None, `max_size`: None, mode: `Measured`) fn redeem_unlock() -> Weight { // Proof Size summary in bytes: - // Measured: `2873` - // Estimated: `6338` - // Minimum execution time: 378_924 nanoseconds. - Weight::from_parts(436_535_000, 6338) - .saturating_add(T::DbWeight::get().reads(18)) - .saturating_add(T::DbWeight::get().writes(20)) + // Measured: `3171` + // Estimated: `9111` + // Minimum execution time: 481_122 nanoseconds. + Weight::from_parts(500_768_000, 9111) + .saturating_add(T::DbWeight::get().reads(24)) + .saturating_add(T::DbWeight::get().writes(22)) } // Storage: `BbBNC::MarkupCoefficient` (r:1 w:0) // Proof: `BbBNC::MarkupCoefficient` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -478,6 +528,8 @@ impl bb_bnc::WeightInfo for BifrostWeight { // Proof: `BbBNC::UserPositions` (`max_values`: None, `max_size`: None, mode: `Measured`) // Storage: `BbBNC::Locked` (r:1 w:0) // Proof: `BbBNC::Locked` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `BbBNC::NextExpiringBlock` (r:1 w:0) + // Proof: `BbBNC::NextExpiringBlock` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) // Storage: `BbBNC::IncentiveConfigs` (r:1 w:1) // Proof: `BbBNC::IncentiveConfigs` (`max_values`: None, `max_size`: None, mode: `Measured`) // Storage: `BbBNC::Epoch` (r:1 w:1) @@ -492,24 +544,24 @@ impl bb_bnc::WeightInfo for BifrostWeight { // Proof: `BbBNC::Rewards` (`max_values`: None, `max_size`: None, mode: `Measured`) // Storage: `BbBNC::UserRewardPerTokenPaid` (r:1 w:1) // Proof: `BbBNC::UserRewardPerTokenPaid` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `BbBNC::BoostedSupply` (r:1 w:1) + // Proof: `BbBNC::BoostedSupply` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) // Storage: `BbBNC::SlopeChanges` (r:1 w:1) // Proof: `BbBNC::SlopeChanges` (`max_values`: None, `max_size`: None, mode: `Measured`) - // Storage: `BbBNC::Supply` (r:1 w:0) - // Proof: `BbBNC::Supply` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn refresh() -> Weight { // Proof Size summary in bytes: - // Measured: `1959` - // Estimated: `7899` - // Minimum execution time: 277_605 nanoseconds. - Weight::from_parts(313_866_000, 7899) - .saturating_add(T::DbWeight::get().reads(18)) - .saturating_add(T::DbWeight::get().writes(10)) + // Measured: `1872` + // Estimated: `7812` + // Minimum execution time: 256_141 nanoseconds. + Weight::from_parts(287_882_000, 7812) + .saturating_add(T::DbWeight::get().reads(19)) + .saturating_add(T::DbWeight::get().writes(11)) } // Storage: `BbBNC::UserPositions` (r:1 w:0) // Proof: `BbBNC::UserPositions` (`max_values`: None, `max_size`: None, mode: `Measured`) // Storage: `BbBNC::Locked` (r:1 w:1) // Proof: `BbBNC::Locked` (`max_values`: None, `max_size`: None, mode: `Measured`) - // Storage: `BbBNC::ExpiringPositions` (r:1 w:2) + // Storage: `BbBNC::ExpiringPositions` (r:3 w:2) // Proof: `BbBNC::ExpiringPositions` (`max_values`: None, `max_size`: None, mode: `Measured`) // Storage: `BbBNC::NextExpiringBlock` (r:1 w:1) // Proof: `BbBNC::NextExpiringBlock` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) @@ -533,20 +585,24 @@ impl bb_bnc::WeightInfo for BifrostWeight { // Proof: `BbBNC::Rewards` (`max_values`: None, `max_size`: None, mode: `Measured`) // Storage: `BbBNC::UserRewardPerTokenPaid` (r:1 w:1) // Proof: `BbBNC::UserRewardPerTokenPaid` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `BbBNC::BoostedSupply` (r:1 w:1) + // Proof: `BbBNC::BoostedSupply` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) // Storage: `BbBNC::SlopeChanges` (r:2 w:2) // Proof: `BbBNC::SlopeChanges` (`max_values`: None, `max_size`: None, mode: `Measured`) // Storage: `Farming::UserFarmingPool` (r:1 w:1) // Proof: `Farming::UserFarmingPool` (`max_values`: None, `max_size`: None, mode: `Measured`) // Storage: `BbBNC::PermanentLock` (r:0 w:1) // Proof: `BbBNC::PermanentLock` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `BbBNC::ExpiryRewardPerToken` (r:0 w:1) + // Proof: `BbBNC::ExpiryRewardPerToken` (`max_values`: None, `max_size`: None, mode: `Measured`) fn set_permanent_lock() -> Weight { // Proof Size summary in bytes: - // Measured: `1670` - // Estimated: `7610` - // Minimum execution time: 264_560 nanoseconds. - Weight::from_parts(296_844_000, 7610) - .saturating_add(T::DbWeight::get().reads(17)) - .saturating_add(T::DbWeight::get().writes(16)) + // Measured: `1752` + // Estimated: `10167` + // Minimum execution time: 289_212 nanoseconds. + Weight::from_parts(310_433_000, 10167) + .saturating_add(T::DbWeight::get().reads(20)) + .saturating_add(T::DbWeight::get().writes(18)) } // Storage: `BbBNC::PermanentLock` (r:100 w:0) // Proof: `BbBNC::PermanentLock` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -554,7 +610,7 @@ impl bb_bnc::WeightInfo for BifrostWeight { // Proof: `BbBNC::PositionOwner` (`max_values`: None, `max_size`: None, mode: `Measured`) // Storage: `BbBNC::Locked` (r:100 w:100) // Proof: `BbBNC::Locked` (`max_values`: None, `max_size`: None, mode: `Measured`) - // Storage: `BbBNC::ExpiringPositions` (r:100 w:200) + // Storage: `BbBNC::ExpiringPositions` (r:201 w:200) // Proof: `BbBNC::ExpiringPositions` (`max_values`: None, `max_size`: None, mode: `Measured`) // Storage: `BbBNC::NextExpiringBlock` (r:1 w:1) // Proof: `BbBNC::NextExpiringBlock` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) @@ -582,21 +638,25 @@ impl bb_bnc::WeightInfo for BifrostWeight { // Proof: `BbBNC::Rewards` (`max_values`: None, `max_size`: None, mode: `Measured`) // Storage: `BbBNC::UserRewardPerTokenPaid` (r:100 w:100) // Proof: `BbBNC::UserRewardPerTokenPaid` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `BbBNC::BoostedSupply` (r:1 w:1) + // Proof: `BbBNC::BoostedSupply` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) // Storage: `Farming::UserFarmingPool` (r:100 w:100) // Proof: `Farming::UserFarmingPool` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `BbBNC::ExpiryRewardPerToken` (r:0 w:1) + // Proof: `BbBNC::ExpiryRewardPerToken` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `n` is `[1, 100]`. fn refresh_permanent_locks(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1848 + n * (836 ±0)` - // Estimated: `12645 + n * (3313 ±0)` - // Minimum execution time: 307_278 nanoseconds. - Weight::from_parts(339_918_000, 12645) - // Standard Error: 504_993 - .saturating_add(Weight::from_parts(254_296_774, 0).saturating_mul(n.into())) - .saturating_add(T::DbWeight::get().reads(9)) - .saturating_add(T::DbWeight::get().reads((12_u64).saturating_mul(n.into()))) - .saturating_add(T::DbWeight::get().writes(7)) + // Measured: `1898 + n * (763 ±0)` + // Estimated: `12700 + n * (5714 ±0)` + // Minimum execution time: 324_239 nanoseconds. + Weight::from_parts(339_973_000, 12700) + // Standard Error: 1_008_452 + .saturating_add(Weight::from_parts(258_766_703, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(11)) + .saturating_add(T::DbWeight::get().reads((13_u64).saturating_mul(n.into()))) + .saturating_add(T::DbWeight::get().writes(9)) .saturating_add(T::DbWeight::get().writes((9_u64).saturating_mul(n.into()))) - .saturating_add(Weight::from_parts(0, 3313).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(0, 5714).saturating_mul(n.into())) } } diff --git a/runtime/bifrost-polkadot/src/weights/bifrost_buy_back.rs b/runtime/bifrost-polkadot/src/weights/bifrost_buy_back.rs index cc8f705d1..bee3beae5 100644 --- a/runtime/bifrost-polkadot/src/weights/bifrost_buy_back.rs +++ b/runtime/bifrost-polkadot/src/weights/bifrost_buy_back.rs @@ -25,7 +25,7 @@ //! Autogenerated weights for bifrost_buy_back //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 53.0.0 -//! DATE: 2026-06-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2026-07-03, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! HOSTNAME: `vps-b02dace3`, CPU: `Intel Core Processor (Haswell, no TSX)` //! WASM-EXECUTION: Compiled, CHAIN: Some("bifrost-polkadot-local"), DB CACHE: 1024 @@ -60,10 +60,10 @@ impl bifrost_buy_back::WeightInfo for BifrostWeight // Proof: `BuyBack::Infos` (`max_values`: None, `max_size`: None, mode: `Measured`) fn set_vtoken() -> Weight { // Proof Size summary in bytes: - // Measured: `642` - // Estimated: `4107` - // Minimum execution time: 45_829 nanoseconds. - Weight::from_parts(47_968_000, 4107) + // Measured: `676` + // Estimated: `4141` + // Minimum execution time: 46_094 nanoseconds. + Weight::from_parts(52_047_000, 4141) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -75,10 +75,10 @@ impl bifrost_buy_back::WeightInfo for BifrostWeight // Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn charge() -> Weight { // Proof Size summary in bytes: - // Measured: `1449` + // Measured: `1450` // Estimated: `6196` - // Minimum execution time: 110_015 nanoseconds. - Weight::from_parts(115_780_000, 6196) + // Minimum execution time: 112_166 nanoseconds. + Weight::from_parts(116_335_000, 6196) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -92,8 +92,8 @@ impl bifrost_buy_back::WeightInfo for BifrostWeight // Proof Size summary in bytes: // Measured: `70` // Estimated: `3535` - // Minimum execution time: 34_691 nanoseconds. - Weight::from_parts(36_575_000, 3535) + // Minimum execution time: 33_720 nanoseconds. + Weight::from_parts(38_753_000, 3535) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -105,10 +105,10 @@ impl bifrost_buy_back::WeightInfo for BifrostWeight // Proof: `BuyBack::UsdtSwapInfos` (`max_values`: None, `max_size`: None, mode: `Measured`) fn set_usdt_vtoken() -> Weight { // Proof Size summary in bytes: - // Measured: `778` - // Estimated: `4243` - // Minimum execution time: 53_991 nanoseconds. - Weight::from_parts(56_594_000, 4243) + // Measured: `812` + // Estimated: `4277` + // Minimum execution time: 54_619 nanoseconds. + Weight::from_parts(59_228_000, 4277) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -120,8 +120,8 @@ impl bifrost_buy_back::WeightInfo for BifrostWeight // Proof Size summary in bytes: // Measured: `70` // Estimated: `3535` - // Minimum execution time: 31_902 nanoseconds. - Weight::from_parts(34_066_000, 3535) + // Minimum execution time: 31_410 nanoseconds. + Weight::from_parts(48_455_000, 3535) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -133,8 +133,8 @@ impl bifrost_buy_back::WeightInfo for BifrostWeight // Proof Size summary in bytes: // Measured: `96` // Estimated: `6036` - // Minimum execution time: 32_257 nanoseconds. - Weight::from_parts(34_362_000, 6036) + // Minimum execution time: 31_260 nanoseconds. + Weight::from_parts(33_104_000, 6036) .saturating_add(T::DbWeight::get().reads(3)) } } diff --git a/runtime/bifrost-polkadot/src/weights/bifrost_clouds_convert.rs b/runtime/bifrost-polkadot/src/weights/bifrost_clouds_convert.rs index 3af0a02d1..9d379f512 100644 --- a/runtime/bifrost-polkadot/src/weights/bifrost_clouds_convert.rs +++ b/runtime/bifrost-polkadot/src/weights/bifrost_clouds_convert.rs @@ -25,7 +25,7 @@ //! Autogenerated weights for bifrost_clouds_convert //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 53.0.0 -//! DATE: 2026-06-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2026-07-03, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! HOSTNAME: `vps-b02dace3`, CPU: `Intel Core Processor (Haswell, no TSX)` //! WASM-EXECUTION: Compiled, CHAIN: Some("bifrost-polkadot-local"), DB CACHE: 1024 @@ -90,14 +90,16 @@ impl bifrost_clouds_convert::WeightInfo for BifrostWeig // Proof: `BbBNC::UserPointEpoch` (`max_values`: None, `max_size`: None, mode: `Measured`) // Storage: `BbBNC::Rewards` (r:1 w:0) // Proof: `BbBNC::Rewards` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `BbBNC::UserRewardPerTokenPaid` (r:1 w:1) + // Proof: `BbBNC::UserRewardPerTokenPaid` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `BbBNC::BoostedSupply` (r:1 w:1) + // Proof: `BbBNC::BoostedSupply` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) // Storage: `BbBNC::SlopeChanges` (r:2 w:1) // Proof: `BbBNC::SlopeChanges` (`max_values`: None, `max_size`: None, mode: `Measured`) // Storage: `Farming::UserFarmingPool` (r:1 w:1) // Proof: `Farming::UserFarmingPool` (`max_values`: None, `max_size`: None, mode: `Measured`) // Storage: `BbBNC::UserPointHistory` (r:0 w:1) // Proof: `BbBNC::UserPointHistory` (`max_values`: None, `max_size`: None, mode: `Measured`) - // Storage: `BbBNC::UserRewardPerTokenPaid` (r:0 w:1) - // Proof: `BbBNC::UserRewardPerTokenPaid` (`max_values`: None, `max_size`: None, mode: `Measured`) // Storage: `BbBNC::Locked` (r:0 w:1) // Proof: `BbBNC::Locked` (`max_values`: None, `max_size`: None, mode: `Measured`) // Storage: `BbBNC::PositionOwner` (r:0 w:1) @@ -106,10 +108,10 @@ impl bifrost_clouds_convert::WeightInfo for BifrostWeig // Proof Size summary in bytes: // Measured: `1703` // Estimated: `8769` - // Minimum execution time: 372_780 nanoseconds. - Weight::from_parts(444_998_000, 8769) - .saturating_add(T::DbWeight::get().reads(25)) - .saturating_add(T::DbWeight::get().writes(22)) + // Minimum execution time: 384_414 nanoseconds. + Weight::from_parts(402_633_000, 8769) + .saturating_add(T::DbWeight::get().reads(27)) + .saturating_add(T::DbWeight::get().writes(23)) } // Storage: `Tokens::Accounts` (r:2 w:2) // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(118), added: 2593, mode: `MaxEncodedLen`) @@ -119,10 +121,10 @@ impl bifrost_clouds_convert::WeightInfo for BifrostWeig // Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn charge_vbnc() -> Weight { // Proof Size summary in bytes: - // Measured: `1299` + // Measured: `1300` // Estimated: `6196` - // Minimum execution time: 109_370 nanoseconds. - Weight::from_parts(116_099_000, 6196) + // Minimum execution time: 107_660 nanoseconds. + Weight::from_parts(111_123_000, 6196) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(3)) } diff --git a/runtime/bifrost-polkadot/src/weights/bifrost_cross_chain_risk_control.rs b/runtime/bifrost-polkadot/src/weights/bifrost_cross_chain_risk_control.rs index 9e5b67dff..19a38b027 100644 --- a/runtime/bifrost-polkadot/src/weights/bifrost_cross_chain_risk_control.rs +++ b/runtime/bifrost-polkadot/src/weights/bifrost_cross_chain_risk_control.rs @@ -25,7 +25,7 @@ //! Autogenerated weights for bifrost_cross_chain_risk_control //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 53.0.0 -//! DATE: 2026-06-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2026-07-03, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! HOSTNAME: `vps-b02dace3`, CPU: `Intel Core Processor (Haswell, no TSX)` //! WASM-EXECUTION: Compiled, CHAIN: Some("bifrost-polkadot-local"), DB CACHE: 1024 @@ -60,8 +60,8 @@ impl bifrost_cross_chain_risk_control::WeightInfo for B // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 22_716 nanoseconds. - Weight::from_parts(24_106_000, 0) + // Minimum execution time: 24_630 nanoseconds. + Weight::from_parts(28_250_000, 0) .saturating_add(T::DbWeight::get().writes(1)) } // Storage: `RiskControl::GlobalRiskConfigs` (r:0 w:1) @@ -70,8 +70,8 @@ impl bifrost_cross_chain_risk_control::WeightInfo for B // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 19_543 nanoseconds. - Weight::from_parts(22_171_000, 0) + // Minimum execution time: 20_641 nanoseconds. + Weight::from_parts(22_419_000, 0) .saturating_add(T::DbWeight::get().writes(1)) } // Storage: `RiskControl::CooldownPeriod` (r:0 w:1) @@ -80,8 +80,8 @@ impl bifrost_cross_chain_risk_control::WeightInfo for B // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 15_801 nanoseconds. - Weight::from_parts(17_884_000, 0) + // Minimum execution time: 16_017 nanoseconds. + Weight::from_parts(17_864_000, 0) .saturating_add(T::DbWeight::get().writes(1)) } // Storage: `RiskControl::ExemptAccounts` (r:0 w:1) @@ -91,10 +91,10 @@ impl bifrost_cross_chain_risk_control::WeightInfo for B // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 16_764 nanoseconds. - Weight::from_parts(24_201_817, 0) - // Standard Error: 7_661 - .saturating_add(Weight::from_parts(18_920, 0).saturating_mul(x.into())) + // Minimum execution time: 17_486 nanoseconds. + Weight::from_parts(23_017_712, 0) + // Standard Error: 8_206 + .saturating_add(Weight::from_parts(70_672, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().writes(1)) } // Storage: `RiskControl::ReservedRecords` (r:1 w:1) @@ -105,8 +105,8 @@ impl bifrost_cross_chain_risk_control::WeightInfo for B // Proof Size summary in bytes: // Measured: `412` // Estimated: `3877` - // Minimum execution time: 53_128 nanoseconds. - Weight::from_parts(56_979_000, 3877) + // Minimum execution time: 63_484 nanoseconds. + Weight::from_parts(66_230_000, 3877) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -120,10 +120,10 @@ impl bifrost_cross_chain_risk_control::WeightInfo for B // Proof: `AssetRegistry::CurrencyMetadatas` (`max_values`: None, `max_size`: None, mode: `Measured`) fn force_unfreeze() -> Weight { // Proof Size summary in bytes: - // Measured: `1567` - // Estimated: `5032` - // Minimum execution time: 90_356 nanoseconds. - Weight::from_parts(96_628_000, 5032) + // Measured: `1568` + // Estimated: `5033` + // Minimum execution time: 89_885 nanoseconds. + Weight::from_parts(94_835_000, 5033) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -139,8 +139,8 @@ impl bifrost_cross_chain_risk_control::WeightInfo for B // Proof Size summary in bytes: // Measured: `302` // Estimated: `3767` - // Minimum execution time: 37_568 nanoseconds. - Weight::from_parts(41_047_000, 3767) + // Minimum execution time: 40_162 nanoseconds. + Weight::from_parts(42_318_000, 3767) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -158,8 +158,8 @@ impl bifrost_cross_chain_risk_control::WeightInfo for B // Proof Size summary in bytes: // Measured: `380` // Estimated: `3845` - // Minimum execution time: 50_596 nanoseconds. - Weight::from_parts(51_799_000, 3845) + // Minimum execution time: 59_739 nanoseconds. + Weight::from_parts(60_881_000, 3845) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -177,10 +177,10 @@ impl bifrost_cross_chain_risk_control::WeightInfo for B // Proof: `RiskControl::ReservedRecords` (`max_values`: None, `max_size`: None, mode: `Measured`) fn reserve_inbound() -> Weight { // Proof Size summary in bytes: - // Measured: `1378` - // Estimated: `4843` - // Minimum execution time: 102_321 nanoseconds. - Weight::from_parts(117_841_000, 4843) + // Measured: `1379` + // Estimated: `4844` + // Minimum execution time: 119_039 nanoseconds. + Weight::from_parts(123_156_000, 4844) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -195,12 +195,12 @@ impl bifrost_cross_chain_risk_control::WeightInfo for B /// The range of component `x` is `[0, 50]`. fn on_initialize(x: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1467 + x * (103 ±0)` - // Estimated: `4933 + x * (2579 ±0)` - // Minimum execution time: 11_707 nanoseconds. - Weight::from_parts(85_925_008, 4933) - // Standard Error: 153_184 - .saturating_add(Weight::from_parts(29_721_277, 0).saturating_mul(x.into())) + // Measured: `1468 + x * (103 ±0)` + // Estimated: `4934 + x * (2579 ±0)` + // Minimum execution time: 13_929 nanoseconds. + Weight::from_parts(106_422_922, 4934) + // Standard Error: 281_493 + .saturating_add(Weight::from_parts(27_965_949, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(x.into()))) .saturating_add(T::DbWeight::get().writes(2)) diff --git a/runtime/bifrost-polkadot/src/weights/bifrost_farming.rs b/runtime/bifrost-polkadot/src/weights/bifrost_farming.rs index 78ca85d81..b304cd35a 100644 --- a/runtime/bifrost-polkadot/src/weights/bifrost_farming.rs +++ b/runtime/bifrost-polkadot/src/weights/bifrost_farming.rs @@ -25,7 +25,7 @@ //! Autogenerated weights for bifrost_farming //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 53.0.0 -//! DATE: 2026-06-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2026-07-03, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! HOSTNAME: `vps-b02dace3`, CPU: `Intel Core Processor (Haswell, no TSX)` //! WASM-EXECUTION: Compiled, CHAIN: Some("bifrost-polkadot-local"), DB CACHE: 1024 @@ -60,10 +60,10 @@ impl bifrost_farming::WeightInfo for BifrostWeight { // Proof: `Farming::BoostPoolInfos` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn on_initialize() -> Weight { // Proof Size summary in bytes: - // Measured: `146` - // Estimated: `3611` - // Minimum execution time: 15_513 nanoseconds. - Weight::from_parts(16_593_000, 3611) + // Measured: `113` + // Estimated: `3578` + // Minimum execution time: 15_884 nanoseconds. + Weight::from_parts(16_797_000, 3578) .saturating_add(T::DbWeight::get().reads(2)) } // Storage: `Farming::PoolNextId` (r:1 w:1) @@ -72,10 +72,10 @@ impl bifrost_farming::WeightInfo for BifrostWeight { // Proof: `Farming::PoolInfos` (`max_values`: None, `max_size`: None, mode: `Measured`) fn create_farming_pool() -> Weight { // Proof Size summary in bytes: - // Measured: `142` - // Estimated: `3607` - // Minimum execution time: 39_856 nanoseconds. - Weight::from_parts(42_453_000, 3607) + // Measured: `109` + // Estimated: `3574` + // Minimum execution time: 40_047 nanoseconds. + Weight::from_parts(42_047_000, 3574) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -87,10 +87,10 @@ impl bifrost_farming::WeightInfo for BifrostWeight { // Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn charge() -> Weight { // Proof Size summary in bytes: - // Measured: `907` + // Measured: `874` // Estimated: `6176` - // Minimum execution time: 113_059 nanoseconds. - Weight::from_parts(114_858_000, 6176) + // Minimum execution time: 110_497 nanoseconds. + Weight::from_parts(113_380_000, 6176) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -104,10 +104,10 @@ impl bifrost_farming::WeightInfo for BifrostWeight { // Proof: `Farming::UserFarmingPool` (`max_values`: None, `max_size`: None, mode: `Measured`) fn deposit() -> Weight { // Proof Size summary in bytes: - // Measured: `526` - // Estimated: `6466` - // Minimum execution time: 63_825 nanoseconds. - Weight::from_parts(68_389_000, 6466) + // Measured: `493` + // Estimated: `6433` + // Minimum execution time: 65_444 nanoseconds. + Weight::from_parts(67_119_000, 6433) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -119,10 +119,10 @@ impl bifrost_farming::WeightInfo for BifrostWeight { // Proof: `BbBNC::UserPositions` (`max_values`: None, `max_size`: None, mode: `Measured`) fn withdraw() -> Weight { // Proof Size summary in bytes: - // Measured: `667` - // Estimated: `6607` - // Minimum execution time: 89_836 nanoseconds. - Weight::from_parts(109_562_000, 6607) + // Measured: `634` + // Estimated: `6574` + // Minimum execution time: 89_723 nanoseconds. + Weight::from_parts(103_063_000, 6574) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -134,10 +134,10 @@ impl bifrost_farming::WeightInfo for BifrostWeight { // Proof: `BbBNC::UserPositions` (`max_values`: None, `max_size`: None, mode: `Measured`) fn claim() -> Weight { // Proof Size summary in bytes: - // Measured: `705` - // Estimated: `6645` - // Minimum execution time: 96_544 nanoseconds. - Weight::from_parts(99_056_000, 6645) + // Measured: `672` + // Estimated: `6612` + // Minimum execution time: 93_307 nanoseconds. + Weight::from_parts(95_353_000, 6612) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -149,10 +149,10 @@ impl bifrost_farming::WeightInfo for BifrostWeight { // Proof: `BbBNC::UserPositions` (`max_values`: None, `max_size`: None, mode: `Measured`) fn withdraw_claim() -> Weight { // Proof Size summary in bytes: - // Measured: `667` - // Estimated: `6607` - // Minimum execution time: 72_577 nanoseconds. - Weight::from_parts(76_426_000, 6607) + // Measured: `634` + // Estimated: `6574` + // Minimum execution time: 72_783 nanoseconds. + Weight::from_parts(73_688_000, 6574) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -160,10 +160,10 @@ impl bifrost_farming::WeightInfo for BifrostWeight { // Proof: `Farming::PoolInfos` (`max_values`: None, `max_size`: None, mode: `Measured`) fn reset_pool() -> Weight { // Proof Size summary in bytes: - // Measured: `415` - // Estimated: `3880` - // Minimum execution time: 52_518 nanoseconds. - Weight::from_parts(53_244_000, 3880) + // Measured: `382` + // Estimated: `3847` + // Minimum execution time: 51_353 nanoseconds. + Weight::from_parts(53_071_000, 3847) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -175,10 +175,10 @@ impl bifrost_farming::WeightInfo for BifrostWeight { // Proof: `Farming::SharesAndWithdrawnRewards` (`max_values`: None, `max_size`: None, mode: `Measured`) fn force_retire_pool() -> Weight { // Proof Size summary in bytes: - // Measured: `423` - // Estimated: `3888` - // Minimum execution time: 56_015 nanoseconds. - Weight::from_parts(61_172_000, 3888) + // Measured: `390` + // Estimated: `3855` + // Minimum execution time: 56_854 nanoseconds. + Weight::from_parts(58_711_000, 3855) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -186,10 +186,10 @@ impl bifrost_farming::WeightInfo for BifrostWeight { // Proof: `Farming::PoolInfos` (`max_values`: None, `max_size`: None, mode: `Measured`) fn kill_pool() -> Weight { // Proof Size summary in bytes: - // Measured: `391` - // Estimated: `3856` - // Minimum execution time: 48_634 nanoseconds. - Weight::from_parts(52_424_000, 3856) + // Measured: `358` + // Estimated: `3823` + // Minimum execution time: 50_163 nanoseconds. + Weight::from_parts(51_796_000, 3823) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -199,10 +199,10 @@ impl bifrost_farming::WeightInfo for BifrostWeight { // Proof: `Farming::GaugePoolInfos` (`max_values`: None, `max_size`: None, mode: `Measured`) fn edit_pool() -> Weight { // Proof Size summary in bytes: - // Measured: `522` - // Estimated: `6462` - // Minimum execution time: 54_078 nanoseconds. - Weight::from_parts(60_415_000, 6462) + // Measured: `489` + // Estimated: `6429` + // Minimum execution time: 56_272 nanoseconds. + Weight::from_parts(57_656_000, 6429) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -210,10 +210,10 @@ impl bifrost_farming::WeightInfo for BifrostWeight { // Proof: `Farming::PoolInfos` (`max_values`: None, `max_size`: None, mode: `Measured`) fn close_pool() -> Weight { // Proof Size summary in bytes: - // Measured: `395` - // Estimated: `3860` - // Minimum execution time: 43_685 nanoseconds. - Weight::from_parts(46_490_000, 3860) + // Measured: `362` + // Estimated: `3827` + // Minimum execution time: 43_270 nanoseconds. + Weight::from_parts(44_954_000, 3827) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -223,20 +223,20 @@ impl bifrost_farming::WeightInfo for BifrostWeight { // Proof: `Farming::GaugeInfos` (`max_values`: None, `max_size`: None, mode: `Measured`) fn force_gauge_claim() -> Weight { // Proof Size summary in bytes: - // Measured: `337` - // Estimated: `3802` - // Minimum execution time: 39_542 nanoseconds. - Weight::from_parts(44_576_000, 3802) + // Measured: `304` + // Estimated: `3769` + // Minimum execution time: 41_430 nanoseconds. + Weight::from_parts(42_587_000, 3769) .saturating_add(T::DbWeight::get().reads(2)) } // Storage: `Farming::RetireLimit` (r:1 w:1) // Proof: `Farming::RetireLimit` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn set_retire_limit() -> Weight { // Proof Size summary in bytes: - // Measured: `142` - // Estimated: `1627` - // Minimum execution time: 22_538 nanoseconds. - Weight::from_parts(24_589_000, 1627) + // Measured: `109` + // Estimated: `1594` + // Minimum execution time: 22_591 nanoseconds. + Weight::from_parts(23_966_000, 1594) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -246,10 +246,10 @@ impl bifrost_farming::WeightInfo for BifrostWeight { // Proof: `Farming::BoostWhitelist` (`max_values`: None, `max_size`: None, mode: `Measured`) fn add_boost_pool_whitelist() -> Weight { // Proof Size summary in bytes: - // Measured: `142` - // Estimated: `3607` - // Minimum execution time: 21_814 nanoseconds. - Weight::from_parts(23_808_000, 3607) + // Measured: `109` + // Estimated: `3574` + // Minimum execution time: 22_515 nanoseconds. + Weight::from_parts(23_688_000, 3574) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -257,10 +257,10 @@ impl bifrost_farming::WeightInfo for BifrostWeight { // Proof: `Farming::BoostNextRoundWhitelist` (`max_values`: None, `max_size`: None, mode: `Measured`) fn set_next_round_whitelist() -> Weight { // Proof Size summary in bytes: - // Measured: `211` - // Estimated: `211` - // Minimum execution time: 19_556 nanoseconds. - Weight::from_parts(21_146_000, 211) + // Measured: `178` + // Estimated: `178` + // Minimum execution time: 20_402 nanoseconds. + Weight::from_parts(21_239_000, 178) .saturating_add(T::DbWeight::get().writes(1)) } // Storage: `Farming::BoostPoolInfos` (r:1 w:1) @@ -275,10 +275,10 @@ impl bifrost_farming::WeightInfo for BifrostWeight { // Proof: `Farming::BoostVotingPools` (`max_values`: None, `max_size`: None, mode: `Measured`) fn vote() -> Weight { // Proof Size summary in bytes: - // Measured: `230` - // Estimated: `3695` - // Minimum execution time: 53_122 nanoseconds. - Weight::from_parts(61_413_000, 3695) + // Measured: `197` + // Estimated: `3662` + // Minimum execution time: 56_640 nanoseconds. + Weight::from_parts(58_442_000, 3662) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -294,10 +294,10 @@ impl bifrost_farming::WeightInfo for BifrostWeight { // Proof: `Farming::PoolInfos` (`max_values`: None, `max_size`: None, mode: `Measured`) fn start_boost_round() -> Weight { // Proof Size summary in bytes: - // Measured: `230` - // Estimated: `6170` - // Minimum execution time: 70_248 nanoseconds. - Weight::from_parts(80_069_000, 6170) + // Measured: `197` + // Estimated: `6137` + // Minimum execution time: 69_587 nanoseconds. + Weight::from_parts(72_995_000, 6137) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -305,10 +305,10 @@ impl bifrost_farming::WeightInfo for BifrostWeight { // Proof: `Farming::BoostPoolInfos` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn end_boost_round() -> Weight { // Proof Size summary in bytes: - // Measured: `228` - // Estimated: `1713` - // Minimum execution time: 40_768 nanoseconds. - Weight::from_parts(42_592_000, 1713) + // Measured: `195` + // Estimated: `1680` + // Minimum execution time: 40_326 nanoseconds. + Weight::from_parts(41_116_000, 1680) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -318,10 +318,10 @@ impl bifrost_farming::WeightInfo for BifrostWeight { // Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn charge_boost() -> Weight { // Proof Size summary in bytes: - // Measured: `556` + // Measured: `523` // Estimated: `6176` - // Minimum execution time: 84_917 nanoseconds. - Weight::from_parts(87_969_000, 6176) + // Minimum execution time: 80_965 nanoseconds. + Weight::from_parts(84_361_000, 6176) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -335,10 +335,10 @@ impl bifrost_farming::WeightInfo for BifrostWeight { // Proof: `BbBNC::UserPositions` (`max_values`: None, `max_size`: None, mode: `Measured`) fn refresh() -> Weight { // Proof Size summary in bytes: - // Measured: `637` - // Estimated: `6577` - // Minimum execution time: 67_148 nanoseconds. - Weight::from_parts(98_607_000, 6577) + // Measured: `604` + // Estimated: `6544` + // Minimum execution time: 65_997 nanoseconds. + Weight::from_parts(67_436_000, 6544) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/runtime/bifrost-polkadot/src/weights/bifrost_slp_v2.rs b/runtime/bifrost-polkadot/src/weights/bifrost_slp_v2.rs index c60a1d075..fac6ea3fb 100644 --- a/runtime/bifrost-polkadot/src/weights/bifrost_slp_v2.rs +++ b/runtime/bifrost-polkadot/src/weights/bifrost_slp_v2.rs @@ -25,7 +25,7 @@ //! Autogenerated weights for bifrost_slp_v2 //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 53.0.0 -//! DATE: 2026-06-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2026-07-03, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! HOSTNAME: `vps-b02dace3`, CPU: `Intel Core Processor (Haswell, no TSX)` //! WASM-EXECUTION: Compiled, CHAIN: Some("bifrost-polkadot-local"), DB CACHE: 1024 @@ -66,10 +66,10 @@ impl bifrost_slp_v2::WeightInfo for BifrostWeight { // Proof: `SlpV2::LedgerByStakingProtocolAndDelegator` (`max_values`: None, `max_size`: Some(101), added: 2576, mode: `MaxEncodedLen`) fn add_delegator() -> Weight { // Proof Size summary in bytes: - // Measured: `382` + // Measured: `349` // Estimated: `3551` - // Minimum execution time: 66_000 nanoseconds. - Weight::from_parts(71_407_000, 3551) + // Minimum execution time: 66_439 nanoseconds. + Weight::from_parts(68_327_000, 3551) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -83,10 +83,10 @@ impl bifrost_slp_v2::WeightInfo for BifrostWeight { // Proof: `SlpV2::ValidatorsByStakingProtocolAndDelegator` (`max_values`: None, `max_size`: Some(154454), added: 156929, mode: `MaxEncodedLen`) fn remove_delegator() -> Weight { // Proof Size summary in bytes: - // Measured: `446` + // Measured: `413` // Estimated: `3551` - // Minimum execution time: 53_007 nanoseconds. - Weight::from_parts(57_333_000, 3551) + // Minimum execution time: 50_670 nanoseconds. + Weight::from_parts(53_007_000, 3551) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -98,10 +98,10 @@ impl bifrost_slp_v2::WeightInfo for BifrostWeight { // Proof: `SlpV2::ValidatorsByStakingProtocolAndDelegator` (`max_values`: None, `max_size`: Some(154454), added: 156929, mode: `MaxEncodedLen`) fn add_validator() -> Weight { // Proof Size summary in bytes: - // Measured: `507` + // Measured: `474` // Estimated: `157919` - // Minimum execution time: 56_303 nanoseconds. - Weight::from_parts(60_735_000, 157919) + // Minimum execution time: 54_803 nanoseconds. + Weight::from_parts(58_147_000, 157919) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -113,10 +113,10 @@ impl bifrost_slp_v2::WeightInfo for BifrostWeight { // Proof: `SlpV2::ValidatorsByStakingProtocolAndDelegator` (`max_values`: None, `max_size`: Some(154454), added: 156929, mode: `MaxEncodedLen`) fn remove_validator() -> Weight { // Proof Size summary in bytes: - // Measured: `627` + // Measured: `594` // Estimated: `157919` - // Minimum execution time: 61_297 nanoseconds. - Weight::from_parts(64_682_000, 157919) + // Minimum execution time: 59_522 nanoseconds. + Weight::from_parts(61_281_000, 157919) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -124,10 +124,10 @@ impl bifrost_slp_v2::WeightInfo for BifrostWeight { // Proof: `SlpV2::ConfigurationByStakingProtocol` (`max_values`: None, `max_size`: Some(711), added: 3186, mode: `MaxEncodedLen`) fn set_protocol_configuration() -> Weight { // Proof Size summary in bytes: - // Measured: `246` + // Measured: `213` // Estimated: `4176` - // Minimum execution time: 35_004 nanoseconds. - Weight::from_parts(38_780_000, 4176) + // Minimum execution time: 35_600 nanoseconds. + Weight::from_parts(37_313_000, 4176) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -139,10 +139,10 @@ impl bifrost_slp_v2::WeightInfo for BifrostWeight { // Proof: `SlpV2::LedgerByStakingProtocolAndDelegator` (`max_values`: None, `max_size`: Some(101), added: 2576, mode: `MaxEncodedLen`) fn set_ledger() -> Weight { // Proof Size summary in bytes: - // Measured: `570` + // Measured: `537` // Estimated: `3566` - // Minimum execution time: 58_128 nanoseconds. - Weight::from_parts(61_136_000, 3566) + // Minimum execution time: 56_986 nanoseconds. + Weight::from_parts(59_061_000, 3566) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -154,10 +154,10 @@ impl bifrost_slp_v2::WeightInfo for BifrostWeight { // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(118), added: 2593, mode: `MaxEncodedLen`) fn transfer_to() -> Weight { // Proof Size summary in bytes: - // Measured: `995` + // Measured: `929` // Estimated: `3583` - // Minimum execution time: 62_956 nanoseconds. - Weight::from_parts(66_115_000, 3583) + // Minimum execution time: 59_912 nanoseconds. + Weight::from_parts(64_556_000, 3583) .saturating_add(T::DbWeight::get().reads(3)) } // Storage: `VtokenMinting::OngoingTimeUnit` (r:1 w:1) @@ -166,8 +166,8 @@ impl bifrost_slp_v2::WeightInfo for BifrostWeight { // Proof Size summary in bytes: // Measured: `4` // Estimated: `3469` - // Minimum execution time: 26_587 nanoseconds. - Weight::from_parts(29_079_000, 3469) + // Minimum execution time: 27_025 nanoseconds. + Weight::from_parts(29_240_000, 3469) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -189,10 +189,10 @@ impl bifrost_slp_v2::WeightInfo for BifrostWeight { // Proof: `SlpV2::LedgerByStakingProtocolAndDelegator` (`max_values`: None, `max_size`: Some(101), added: 2576, mode: `MaxEncodedLen`) fn update_token_exchange_rate() -> Weight { // Proof Size summary in bytes: - // Measured: `531` + // Measured: `498` // Estimated: `4176` - // Minimum execution time: 91_312 nanoseconds. - Weight::from_parts(95_150_000, 4176) + // Minimum execution time: 91_228 nanoseconds. + Weight::from_parts(94_400_000, 4176) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -202,10 +202,10 @@ impl bifrost_slp_v2::WeightInfo for BifrostWeight { // Proof: `SlpV2::XCMExecutorWhitelist` (`max_values`: None, `max_size`: Some(32948), added: 35423, mode: `MaxEncodedLen`) fn update_xcm_executor_whitelist() -> Weight { // Proof Size summary in bytes: - // Measured: `447` + // Measured: `414` // Estimated: `36413` - // Minimum execution time: 171_368 nanoseconds. - Weight::from_parts(176_441_000, 36413) + // Minimum execution time: 173_763 nanoseconds. + Weight::from_parts(177_799_000, 36413) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -221,10 +221,10 @@ impl bifrost_slp_v2::WeightInfo for BifrostWeight { // Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(38), added: 2513, mode: `MaxEncodedLen`) fn general_xcm_executor() -> Weight { // Proof Size summary in bytes: - // Measured: `1060` + // Measured: `994` // Estimated: `36413` - // Minimum execution time: 99_346 nanoseconds. - Weight::from_parts(102_454_000, 36413) + // Minimum execution time: 99_045 nanoseconds. + Weight::from_parts(101_613_000, 36413) .saturating_add(T::DbWeight::get().reads(6)) } // Storage: `ParachainSystem::ValidationData` (r:1 w:0) @@ -237,10 +237,10 @@ impl bifrost_slp_v2::WeightInfo for BifrostWeight { // Proof: `SlpV2::ValidatorBoostList` (`max_values`: None, `max_size`: Some(155429), added: 157904, mode: `MaxEncodedLen`) fn set_validator_boost_list() -> Weight { // Proof Size summary in bytes: - // Measured: `355` + // Measured: `322` // Estimated: `157919` - // Minimum execution time: 64_655 nanoseconds. - Weight::from_parts(69_213_000, 157919) + // Minimum execution time: 63_707 nanoseconds. + Weight::from_parts(66_256_000, 157919) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -254,10 +254,10 @@ impl bifrost_slp_v2::WeightInfo for BifrostWeight { // Proof: `SlpV2::ValidatorsByStakingProtocolAndDelegator` (`max_values`: None, `max_size`: Some(154454), added: 156929, mode: `MaxEncodedLen`) fn add_to_validator_boost_list() -> Weight { // Proof Size summary in bytes: - // Measured: `355` + // Measured: `322` // Estimated: `158894` - // Minimum execution time: 63_937 nanoseconds. - Weight::from_parts(67_605_000, 158894) + // Minimum execution time: 63_992 nanoseconds. + Weight::from_parts(66_981_000, 158894) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -265,10 +265,10 @@ impl bifrost_slp_v2::WeightInfo for BifrostWeight { // Proof: `SlpV2::ValidatorBoostList` (`max_values`: None, `max_size`: Some(155429), added: 157904, mode: `MaxEncodedLen`) fn remove_from_validator_boost_list() -> Weight { // Proof Size summary in bytes: - // Measured: `375` + // Measured: `342` // Estimated: `158894` - // Minimum execution time: 41_266 nanoseconds. - Weight::from_parts(43_164_000, 158894) + // Minimum execution time: 40_072 nanoseconds. + Weight::from_parts(42_202_000, 158894) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -278,10 +278,10 @@ impl bifrost_slp_v2::WeightInfo for BifrostWeight { // Proof: `ParachainSystem::ValidationData` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn clean_outdated_validator_boost_list() -> Weight { // Proof Size summary in bytes: - // Measured: `551` + // Measured: `518` // Estimated: `158894` - // Minimum execution time: 55_333 nanoseconds. - Weight::from_parts(59_172_000, 158894) + // Minimum execution time: 53_815 nanoseconds. + Weight::from_parts(56_189_000, 158894) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/runtime/bifrost-polkadot/src/weights/bifrost_xcm_interface.rs b/runtime/bifrost-polkadot/src/weights/bifrost_xcm_interface.rs index 96410a5c5..1e09d205f 100644 --- a/runtime/bifrost-polkadot/src/weights/bifrost_xcm_interface.rs +++ b/runtime/bifrost-polkadot/src/weights/bifrost_xcm_interface.rs @@ -25,7 +25,7 @@ //! Autogenerated weights for bifrost_xcm_interface //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 53.0.0 -//! DATE: 2026-06-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2026-07-03, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! HOSTNAME: `vps-b02dace3`, CPU: `Intel Core Processor (Haswell, no TSX)` //! WASM-EXECUTION: Compiled, CHAIN: Some("bifrost-polkadot-local"), DB CACHE: 1024 @@ -60,8 +60,8 @@ impl bifrost_xcm_interface::WeightInfo for BifrostWeigh // Proof Size summary in bytes: // Measured: `109` // Estimated: `3574` - // Minimum execution time: 57_564 nanoseconds. - Weight::from_parts(63_265_000, 3574) + // Minimum execution time: 64_309 nanoseconds. + Weight::from_parts(66_904_000, 3574) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/runtime/bifrost-polkadot/src/weights/pallet_evm_accounts.rs b/runtime/bifrost-polkadot/src/weights/pallet_evm_accounts.rs index b1162230b..25c2faf71 100644 --- a/runtime/bifrost-polkadot/src/weights/pallet_evm_accounts.rs +++ b/runtime/bifrost-polkadot/src/weights/pallet_evm_accounts.rs @@ -25,7 +25,7 @@ //! Autogenerated weights for pallet_evm_accounts //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 53.0.0 -//! DATE: 2026-06-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2026-07-03, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! HOSTNAME: `vps-b02dace3`, CPU: `Intel Core Processor (Haswell, no TSX)` //! WASM-EXECUTION: Compiled, CHAIN: Some("bifrost-polkadot-local"), DB CACHE: 1024 @@ -62,10 +62,10 @@ impl pallet_evm_accounts::WeightInfo for BifrostWeight< // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(118), added: 2593, mode: `MaxEncodedLen`) fn bind_evm_address() -> Weight { // Proof Size summary in bytes: - // Measured: `443` + // Measured: `410` // Estimated: `3593` - // Minimum execution time: 59_234 nanoseconds. - Weight::from_parts(65_926_000, 3593) + // Minimum execution time: 58_517 nanoseconds. + Weight::from_parts(59_818_000, 3593) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -75,8 +75,8 @@ impl pallet_evm_accounts::WeightInfo for BifrostWeight< // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 21_397 nanoseconds. - Weight::from_parts(23_502_000, 0) + // Minimum execution time: 20_986 nanoseconds. + Weight::from_parts(22_212_000, 0) .saturating_add(T::DbWeight::get().writes(1)) } // Storage: `EVMAccounts::ContractDeployer` (r:0 w:1) @@ -85,8 +85,8 @@ impl pallet_evm_accounts::WeightInfo for BifrostWeight< // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 20_663 nanoseconds. - Weight::from_parts(22_326_000, 0) + // Minimum execution time: 20_560 nanoseconds. + Weight::from_parts(22_065_000, 0) .saturating_add(T::DbWeight::get().writes(1)) } // Storage: `EVMAccounts::ContractDeployer` (r:0 w:1) @@ -95,8 +95,8 @@ impl pallet_evm_accounts::WeightInfo for BifrostWeight< // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 20_951 nanoseconds. - Weight::from_parts(22_048_000, 0) + // Minimum execution time: 20_302 nanoseconds. + Weight::from_parts(21_258_000, 0) .saturating_add(T::DbWeight::get().writes(1)) } } diff --git a/runtime/bifrost-polkadot/src/weights/pallet_xcm.rs b/runtime/bifrost-polkadot/src/weights/pallet_xcm.rs index 7579c213b..bb6b71eb3 100644 --- a/runtime/bifrost-polkadot/src/weights/pallet_xcm.rs +++ b/runtime/bifrost-polkadot/src/weights/pallet_xcm.rs @@ -25,7 +25,7 @@ //! Autogenerated weights for pallet_xcm //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 53.0.0 -//! DATE: 2026-06-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2026-07-03, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! HOSTNAME: `vps-b02dace3`, CPU: `Intel Core Processor (Haswell, no TSX)` //! WASM-EXECUTION: Compiled, CHAIN: Some("bifrost-polkadot-local"), DB CACHE: 1024 @@ -64,8 +64,8 @@ impl pallet_xcm::WeightInfo for BifrostWeight { // Proof Size summary in bytes: // Measured: `179` // Estimated: `3644` - // Minimum execution time: 78_377 nanoseconds. - Weight::from_parts(83_841_000, 3644) + // Minimum execution time: 81_791 nanoseconds. + Weight::from_parts(92_324_000, 3644) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -90,10 +90,10 @@ impl pallet_xcm::WeightInfo for BifrostWeight { // Proof: `XcmpQueue::OutboundXcmpMessages` (`max_values`: None, `max_size`: Some(105506), added: 107981, mode: `MaxEncodedLen`) fn reserve_transfer_assets() -> Weight { // Proof Size summary in bytes: - // Measured: `552` - // Estimated: `4017` - // Minimum execution time: 227_276 nanoseconds. - Weight::from_parts(236_813_000, 4017) + // Measured: `519` + // Estimated: `3984` + // Minimum execution time: 226_013 nanoseconds. + Weight::from_parts(253_564_000, 3984) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -109,10 +109,10 @@ impl pallet_xcm::WeightInfo for BifrostWeight { // Proof: `XcmpQueue::OutboundXcmpMessages` (`max_values`: None, `max_size`: Some(105506), added: 107981, mode: `MaxEncodedLen`) fn transfer_assets() -> Weight { // Proof Size summary in bytes: - // Measured: `449` - // Estimated: `3914` - // Minimum execution time: 232_293 nanoseconds. - Weight::from_parts(253_538_000, 3914) + // Measured: `416` + // Estimated: `3881` + // Minimum execution time: 240_873 nanoseconds. + Weight::from_parts(262_457_000, 3881) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -131,16 +131,16 @@ impl pallet_xcm::WeightInfo for BifrostWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 23_346 nanoseconds. - Weight::from_parts(24_603_000, 0) + // Minimum execution time: 23_400 nanoseconds. + Weight::from_parts(24_727_000, 0) .saturating_add(T::DbWeight::get().writes(1)) } fn force_default_xcm_version() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 9_026 nanoseconds. - Weight::from_parts(9_731_000, 0) + // Minimum execution time: 9_711 nanoseconds. + Weight::from_parts(10_198_000, 0) } // Storage: `PolkadotXcm::VersionNotifiers` (r:1 w:1) // Proof: `PolkadotXcm::VersionNotifiers` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -158,8 +158,8 @@ impl pallet_xcm::WeightInfo for BifrostWeight { // Proof Size summary in bytes: // Measured: `179` // Estimated: `3644` - // Minimum execution time: 91_922 nanoseconds. - Weight::from_parts(94_253_000, 3644) + // Minimum execution time: 89_395 nanoseconds. + Weight::from_parts(96_482_000, 3644) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -177,8 +177,8 @@ impl pallet_xcm::WeightInfo for BifrostWeight { // Proof Size summary in bytes: // Measured: `269` // Estimated: `3734` - // Minimum execution time: 91_309 nanoseconds. - Weight::from_parts(128_788_000, 3734) + // Minimum execution time: 89_600 nanoseconds. + Weight::from_parts(94_567_000, 3734) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -188,8 +188,8 @@ impl pallet_xcm::WeightInfo for BifrostWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 9_975 nanoseconds. - Weight::from_parts(10_412_000, 0) + // Minimum execution time: 9_403 nanoseconds. + Weight::from_parts(9_929_000, 0) .saturating_add(T::DbWeight::get().writes(1)) } // Storage: `PolkadotXcm::SupportedVersion` (r:6 w:2) @@ -198,8 +198,8 @@ impl pallet_xcm::WeightInfo for BifrostWeight { // Proof Size summary in bytes: // Measured: `22` // Estimated: `15862` - // Minimum execution time: 50_085 nanoseconds. - Weight::from_parts(51_353_000, 15862) + // Minimum execution time: 50_295 nanoseconds. + Weight::from_parts(51_655_000, 15862) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -209,8 +209,8 @@ impl pallet_xcm::WeightInfo for BifrostWeight { // Proof Size summary in bytes: // Measured: `26` // Estimated: `15866` - // Minimum execution time: 49_602 nanoseconds. - Weight::from_parts(51_780_000, 15866) + // Minimum execution time: 50_283 nanoseconds. + Weight::from_parts(51_622_000, 15866) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -220,8 +220,8 @@ impl pallet_xcm::WeightInfo for BifrostWeight { // Proof Size summary in bytes: // Measured: `37` // Estimated: `18352` - // Minimum execution time: 53_212 nanoseconds. - Weight::from_parts(55_926_000, 18352) + // Minimum execution time: 51_662 nanoseconds. + Weight::from_parts(55_356_000, 18352) .saturating_add(T::DbWeight::get().reads(7)) } // Storage: `PolkadotXcm::VersionNotifyTargets` (r:2 w:1) @@ -234,8 +234,8 @@ impl pallet_xcm::WeightInfo for BifrostWeight { // Proof Size summary in bytes: // Measured: `142` // Estimated: `6082` - // Minimum execution time: 69_753 nanoseconds. - Weight::from_parts(71_856_000, 6082) + // Minimum execution time: 70_947 nanoseconds. + Weight::from_parts(73_517_000, 6082) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -245,8 +245,8 @@ impl pallet_xcm::WeightInfo for BifrostWeight { // Proof Size summary in bytes: // Measured: `40` // Estimated: `13405` - // Minimum execution time: 40_019 nanoseconds. - Weight::from_parts(41_002_000, 13405) + // Minimum execution time: 38_836 nanoseconds. + Weight::from_parts(39_819_000, 13405) .saturating_add(T::DbWeight::get().reads(5)) } // Storage: `PolkadotXcm::VersionNotifyTargets` (r:6 w:2) @@ -255,8 +255,8 @@ impl pallet_xcm::WeightInfo for BifrostWeight { // Proof Size summary in bytes: // Measured: `33` // Estimated: `15873` - // Minimum execution time: 52_909 nanoseconds. - Weight::from_parts(54_351_000, 15873) + // Minimum execution time: 52_477 nanoseconds. + Weight::from_parts(53_489_000, 15873) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -270,8 +270,8 @@ impl pallet_xcm::WeightInfo for BifrostWeight { // Proof Size summary in bytes: // Measured: `142` // Estimated: `15982` - // Minimum execution time: 92_115 nanoseconds. - Weight::from_parts(94_660_000, 15982) + // Minimum execution time: 92_849 nanoseconds. + Weight::from_parts(98_066_000, 15982) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -283,8 +283,8 @@ impl pallet_xcm::WeightInfo for BifrostWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `1485` - // Minimum execution time: 8_989 nanoseconds. - Weight::from_parts(9_299_000, 1485) + // Minimum execution time: 9_237 nanoseconds. + Weight::from_parts(9_726_000, 1485) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -294,8 +294,8 @@ impl pallet_xcm::WeightInfo for BifrostWeight { // Proof Size summary in bytes: // Measured: `7576` // Estimated: `11041` - // Minimum execution time: 63_492 nanoseconds. - Weight::from_parts(65_328_000, 11041) + // Minimum execution time: 61_851 nanoseconds. + Weight::from_parts(63_315_000, 11041) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -311,8 +311,8 @@ impl pallet_xcm::WeightInfo for BifrostWeight { // Proof Size summary in bytes: // Measured: `222` // Estimated: `3687` - // Minimum execution time: 108_299 nanoseconds. - Weight::from_parts(115_947_000, 3687) + // Minimum execution time: 102_712 nanoseconds. + Weight::from_parts(121_601_000, 3687) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -338,7 +338,7 @@ impl pallet_xcm::WeightInfo for BifrostWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 25_055 nanoseconds. - Weight::from_parts(26_506_000, 0) + // Minimum execution time: 24_383 nanoseconds. + Weight::from_parts(26_318_000, 0) } }