From cc70a86de431ab4dba992d8fa51eb04ea7ad79ad Mon Sep 17 00:00:00 2001 From: open-junius Date: Mon, 4 May 2026 11:05:18 +0800 Subject: [PATCH 01/11] remove subnet owner check --- .../subtensor/src/staking/recycle_alpha.rs | 54 +++++++++++++------ pallets/subtensor/src/tests/recycle_alpha.rs | 35 ++++++++---- 2 files changed, 61 insertions(+), 28 deletions(-) diff --git a/pallets/subtensor/src/staking/recycle_alpha.rs b/pallets/subtensor/src/staking/recycle_alpha.rs index b1ded8659f..b750c60f26 100644 --- a/pallets/subtensor/src/staking/recycle_alpha.rs +++ b/pallets/subtensor/src/staking/recycle_alpha.rs @@ -132,7 +132,7 @@ impl Pallet { amount: TaoBalance, limit: Option, ) -> DispatchResult { - Self::ensure_subnet_owner(origin.clone(), netuid)?; + ensure_signed(origin.clone())?; let current_block = Self::get_current_block_as_u64(); let last_block = Self::get_rate_limited_last_block(&RateLimitKey::AddStakeBurn(netuid)); @@ -143,24 +143,44 @@ impl Pallet { Error::::AddStakeBurnRateLimitExceeded ); - let alpha = if let Some(limit) = limit { - Self::do_add_stake_limit(origin.clone(), hotkey.clone(), netuid, amount, limit, false)? - } else { - Self::do_add_stake(origin.clone(), hotkey.clone(), netuid, amount)? - }; - - Self::do_burn_alpha(origin, hotkey.clone(), alpha, netuid)?; - - Self::set_rate_limited_last_block(&RateLimitKey::AddStakeBurn(netuid), current_block); + transactional::with_transaction(|| { + let add_stake_result = if let Some(limit) = limit { + Self::do_add_stake_limit( + origin.clone(), + hotkey.clone(), + netuid, + amount, + limit, + false, + ) + } else { + Self::do_add_stake(origin.clone(), hotkey.clone(), netuid, amount) + }; - Self::deposit_event(Event::AddStakeBurn { - netuid, - hotkey, - amount, - alpha, - }); + let alpha = match add_stake_result { + Ok(alpha) => alpha, + Err(e) => return TransactionOutcome::Rollback(Err(e)), + }; - Ok(()) + match Self::do_burn_alpha(origin, hotkey.clone(), alpha, netuid) { + Ok(_) => { + Self::set_rate_limited_last_block( + &RateLimitKey::AddStakeBurn(netuid), + current_block, + ); + + Self::deposit_event(Event::AddStakeBurn { + netuid, + hotkey, + amount, + alpha, + }); + + TransactionOutcome::Commit(Ok(())) + } + Err(e) => TransactionOutcome::Rollback(Err(e)), + } + }) } /// Atomically stakes TAO and recycles the resulting alpha. diff --git a/pallets/subtensor/src/tests/recycle_alpha.rs b/pallets/subtensor/src/tests/recycle_alpha.rs index 3bd14306bf..7d05ab37a2 100644 --- a/pallets/subtensor/src/tests/recycle_alpha.rs +++ b/pallets/subtensor/src/tests/recycle_alpha.rs @@ -774,7 +774,7 @@ fn test_add_stake_burn_with_limit_success() { } #[test] -fn test_add_stake_burn_non_owner_fails() { +fn test_add_stake_burn_non_owner_success() { new_test_ext(1).execute_with(|| { let hotkey_account_id = U256::from(1); let coldkey_account_id = U256::from(2); @@ -793,17 +793,30 @@ fn test_add_stake_burn_non_owner_fails() { // Give non-owner some balance add_balance_to_coldkey_account(&non_owner_coldkey, amount.into()); - // Non-owner trying to call add_stake_burn should fail with BadOrigin - assert_noop!( - SubtensorModule::add_stake_burn( - RuntimeOrigin::signed(non_owner_coldkey), - hotkey_account_id, - netuid, - amount.into(), - None, + // Any signed origin can atomically stake and burn. + assert_ok!(SubtensorModule::add_stake_burn( + RuntimeOrigin::signed(non_owner_coldkey), + hotkey_account_id, + netuid, + amount.into(), + None, + )); + + assert_eq!( + SubtensorModule::get_stake_for_hotkey_and_coldkey_on_subnet( + &hotkey_account_id, + &non_owner_coldkey, + netuid ), - DispatchError::BadOrigin + AlphaBalance::ZERO ); + + assert!(System::events().iter().any(|e| { + matches!( + &e.event, + RuntimeEvent::SubtensorModule(Event::AddStakeBurn { .. }) + ) + })); }); } @@ -827,7 +840,7 @@ fn test_add_stake_burn_nonexistent_subnet_fails() { amount.into(), None, ), - DispatchError::BadOrigin + Error::::SubnetNotExists ); }); } From 4db1fb744c6112ea9040ceb805e2ca82ebfa5f1c Mon Sep 17 00:00:00 2001 From: open-junius Date: Mon, 4 May 2026 14:08:23 +0800 Subject: [PATCH 02/11] rename the function --- pallets/subtensor/src/macros/dispatches.rs | 2 +- pallets/subtensor/src/staking/recycle_alpha.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pallets/subtensor/src/macros/dispatches.rs b/pallets/subtensor/src/macros/dispatches.rs index a98578d813..861fe6c96d 100644 --- a/pallets/subtensor/src/macros/dispatches.rs +++ b/pallets/subtensor/src/macros/dispatches.rs @@ -2456,7 +2456,7 @@ mod dispatches { amount: TaoBalance, limit: Option, ) -> DispatchResult { - Self::do_add_stake_burn(origin, hotkey, netuid, amount, limit) + Self::do_add_stake_burn_rate_limit(origin, hotkey, netuid, amount, limit) } /// Clears a coldkey swap announcement after the reannouncement delay if diff --git a/pallets/subtensor/src/staking/recycle_alpha.rs b/pallets/subtensor/src/staking/recycle_alpha.rs index b750c60f26..2a24d78d29 100644 --- a/pallets/subtensor/src/staking/recycle_alpha.rs +++ b/pallets/subtensor/src/staking/recycle_alpha.rs @@ -125,7 +125,7 @@ impl Pallet { Ok(amount) } - pub(crate) fn do_add_stake_burn( + pub(crate) fn do_add_stake_burn_rate_limit( origin: OriginFor, hotkey: T::AccountId, netuid: NetUid, @@ -206,7 +206,7 @@ impl Pallet { } /// Atomically stakes TAO and burns the resulting alpha. Permissionless - /// counterpart to `do_add_stake_burn`: no subnet-owner guard and no rate + /// counterpart to `do_add_stake_burn_rate_limit`: no rate limit. /// limit. Used by the chain extension. pub fn do_add_stake_burn_permissionless( origin: OriginFor, From 1ac64958b31cb06331198a24fa7e4d94cdc61e82 Mon Sep 17 00:00:00 2001 From: open-junius Date: Mon, 4 May 2026 20:49:31 +0800 Subject: [PATCH 03/11] commit Cargo.lock --- pallets/subtensor/src/lib.rs | 2 +- pallets/subtensor/src/macros/dispatches.rs | 2 +- .../subtensor/src/staking/recycle_alpha.rs | 65 +++++++------------ pallets/subtensor/src/tests/recycle_alpha.rs | 10 ++- 4 files changed, 35 insertions(+), 44 deletions(-) diff --git a/pallets/subtensor/src/lib.rs b/pallets/subtensor/src/lib.rs index d720aed56a..701d0f9e9d 100644 --- a/pallets/subtensor/src/lib.rs +++ b/pallets/subtensor/src/lib.rs @@ -2805,7 +2805,7 @@ pub enum RateLimitKey { LastTxBlockDelegateTake(AccountId), // "Add stake and burn" rate limit #[codec(index = 6)] - AddStakeBurn(NetUid), + AddStakeBurn(NetUid, AccountId), } pub trait ProxyInterface { diff --git a/pallets/subtensor/src/macros/dispatches.rs b/pallets/subtensor/src/macros/dispatches.rs index 861fe6c96d..a98578d813 100644 --- a/pallets/subtensor/src/macros/dispatches.rs +++ b/pallets/subtensor/src/macros/dispatches.rs @@ -2456,7 +2456,7 @@ mod dispatches { amount: TaoBalance, limit: Option, ) -> DispatchResult { - Self::do_add_stake_burn_rate_limit(origin, hotkey, netuid, amount, limit) + Self::do_add_stake_burn(origin, hotkey, netuid, amount, limit) } /// Clears a coldkey swap announcement after the reannouncement delay if diff --git a/pallets/subtensor/src/staking/recycle_alpha.rs b/pallets/subtensor/src/staking/recycle_alpha.rs index 2a24d78d29..3e1a43436c 100644 --- a/pallets/subtensor/src/staking/recycle_alpha.rs +++ b/pallets/subtensor/src/staking/recycle_alpha.rs @@ -125,17 +125,19 @@ impl Pallet { Ok(amount) } - pub(crate) fn do_add_stake_burn_rate_limit( + + pub(crate) fn do_add_stake_burn( origin: OriginFor, hotkey: T::AccountId, netuid: NetUid, amount: TaoBalance, limit: Option, ) -> DispatchResult { - ensure_signed(origin.clone())?; + let coldkey = ensure_signed(origin.clone())?; let current_block = Self::get_current_block_as_u64(); - let last_block = Self::get_rate_limited_last_block(&RateLimitKey::AddStakeBurn(netuid)); + let last_block = + Self::get_rate_limited_last_block(&RateLimitKey::AddStakeBurn(netuid, coldkey.clone())); let rate_limit = TransactionType::AddStakeBurn.rate_limit_on_subnet::(netuid); ensure!( @@ -143,44 +145,27 @@ impl Pallet { Error::::AddStakeBurnRateLimitExceeded ); - transactional::with_transaction(|| { - let add_stake_result = if let Some(limit) = limit { - Self::do_add_stake_limit( - origin.clone(), - hotkey.clone(), - netuid, - amount, - limit, - false, - ) - } else { - Self::do_add_stake(origin.clone(), hotkey.clone(), netuid, amount) - }; + let alpha = if let Some(limit) = limit { + Self::do_add_stake_limit(origin.clone(), hotkey.clone(), netuid, amount, limit, false)? + } else { + Self::do_add_stake(origin.clone(), hotkey.clone(), netuid, amount)? + }; - let alpha = match add_stake_result { - Ok(alpha) => alpha, - Err(e) => return TransactionOutcome::Rollback(Err(e)), - }; + Self::do_burn_alpha(origin, hotkey.clone(), alpha, netuid)?; - match Self::do_burn_alpha(origin, hotkey.clone(), alpha, netuid) { - Ok(_) => { - Self::set_rate_limited_last_block( - &RateLimitKey::AddStakeBurn(netuid), - current_block, - ); - - Self::deposit_event(Event::AddStakeBurn { - netuid, - hotkey, - amount, - alpha, - }); - - TransactionOutcome::Commit(Ok(())) - } - Err(e) => TransactionOutcome::Rollback(Err(e)), - } - }) + Self::set_rate_limited_last_block( + &RateLimitKey::AddStakeBurn(netuid, coldkey), + current_block, + ); + + Self::deposit_event(Event::AddStakeBurn { + netuid, + hotkey, + amount, + alpha, + }); + + Ok(()) } /// Atomically stakes TAO and recycles the resulting alpha. @@ -206,7 +191,7 @@ impl Pallet { } /// Atomically stakes TAO and burns the resulting alpha. Permissionless - /// counterpart to `do_add_stake_burn_rate_limit`: no rate limit. + /// counterpart to `do_add_stake_burn`: no rate limit. /// limit. Used by the chain extension. pub fn do_add_stake_burn_permissionless( origin: OriginFor, diff --git a/pallets/subtensor/src/tests/recycle_alpha.rs b/pallets/subtensor/src/tests/recycle_alpha.rs index 7d05ab37a2..5fd09cbd99 100644 --- a/pallets/subtensor/src/tests/recycle_alpha.rs +++ b/pallets/subtensor/src/tests/recycle_alpha.rs @@ -894,7 +894,10 @@ fn test_add_stake_burn_rate_limit_exceeded() { add_balance_to_coldkey_account(&coldkey_account_id, (amount * 10).into()); assert_eq!( - SubtensorModule::get_rate_limited_last_block(&RateLimitKey::AddStakeBurn(netuid)), + SubtensorModule::get_rate_limited_last_block(&RateLimitKey::AddStakeBurn( + netuid, + coldkey_account_id + )), 0 ); @@ -908,7 +911,10 @@ fn test_add_stake_burn_rate_limit_exceeded() { )); assert_eq!( - SubtensorModule::get_rate_limited_last_block(&RateLimitKey::AddStakeBurn(netuid)), + SubtensorModule::get_rate_limited_last_block(&RateLimitKey::AddStakeBurn( + netuid, + coldkey_account_id + )), SubtensorModule::get_current_block_as_u64() ); From 5f2132c9dbce98c046a86392e46249277af8b7f0 Mon Sep 17 00:00:00 2001 From: open-junius Date: Mon, 4 May 2026 21:08:47 +0800 Subject: [PATCH 04/11] update extension check --- pallets/subtensor/src/extensions/subtensor.rs | 6 ++--- .../subtensor/src/staking/recycle_alpha.rs | 27 ++++++++++++------- 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/pallets/subtensor/src/extensions/subtensor.rs b/pallets/subtensor/src/extensions/subtensor.rs index 7455dbb78a..9197aa4990 100644 --- a/pallets/subtensor/src/extensions/subtensor.rs +++ b/pallets/subtensor/src/extensions/subtensor.rs @@ -7,7 +7,6 @@ use sp_runtime::traits::{ AsSystemOriginSigner, DispatchInfoOf, Dispatchable, Implication, TransactionExtension, ValidateResult, }; -use sp_runtime::transaction_validity::{InvalidTransaction, TransactionValidityError}; use sp_runtime::{ impl_tx_ext_default, transaction_validity::{TransactionSource, TransactionValidity, ValidTransaction}, @@ -263,9 +262,8 @@ where Ok((Default::default(), (), origin)) } Some(Call::add_stake_burn { netuid, .. }) => { - Pallet::::ensure_subnet_owner(origin.clone(), *netuid).map_err(|_| { - TransactionValidityError::Invalid(InvalidTransaction::BadSigner) - })?; + Pallet::::ensure_add_stake_burn_rate_limit(who.clone(), *netuid) + .map_err(|_| CustomTransactionError::RateLimitExceeded)?; Ok((Self::validity_ok(ADD_STAKE_BURN_PRIORITY_BOOST), (), origin)) } diff --git a/pallets/subtensor/src/staking/recycle_alpha.rs b/pallets/subtensor/src/staking/recycle_alpha.rs index 3e1a43436c..18030a4c4b 100644 --- a/pallets/subtensor/src/staking/recycle_alpha.rs +++ b/pallets/subtensor/src/staking/recycle_alpha.rs @@ -135,15 +135,7 @@ impl Pallet { ) -> DispatchResult { let coldkey = ensure_signed(origin.clone())?; - let current_block = Self::get_current_block_as_u64(); - let last_block = - Self::get_rate_limited_last_block(&RateLimitKey::AddStakeBurn(netuid, coldkey.clone())); - let rate_limit = TransactionType::AddStakeBurn.rate_limit_on_subnet::(netuid); - - ensure!( - last_block.is_zero() || current_block.saturating_sub(last_block) >= rate_limit, - Error::::AddStakeBurnRateLimitExceeded - ); + Self::ensure_add_stake_burn_rate_limit(coldkey.clone(), netuid)?; let alpha = if let Some(limit) = limit { Self::do_add_stake_limit(origin.clone(), hotkey.clone(), netuid, amount, limit, false)? @@ -155,7 +147,7 @@ impl Pallet { Self::set_rate_limited_last_block( &RateLimitKey::AddStakeBurn(netuid, coldkey), - current_block, + Self::get_current_block_as_u64(), ); Self::deposit_event(Event::AddStakeBurn { @@ -210,4 +202,19 @@ impl Pallet { } }) } + + pub fn ensure_add_stake_burn_rate_limit( + coldkey: T::AccountId, + netuid: NetUid, + ) -> DispatchResult { + let current_block = Self::get_current_block_as_u64(); + let last_block = + Self::get_rate_limited_last_block(&RateLimitKey::AddStakeBurn(netuid, coldkey.clone())); + let rate_limit = TransactionType::AddStakeBurn.rate_limit_on_subnet::(netuid); + ensure!( + last_block.is_zero() || current_block.saturating_sub(last_block) >= rate_limit, + Error::::AddStakeBurnRateLimitExceeded + ); + Ok(()) + } } From d0702db5a9ba68e0c4da608c6c1949fdfc9ed921 Mon Sep 17 00:00:00 2001 From: open-junius Date: Mon, 4 May 2026 22:38:38 +0800 Subject: [PATCH 05/11] add migration part --- pallets/subtensor/src/macros/hooks.rs | 2 + .../migrate_add_stake_burn_rate_limit_key.rs | 126 ++++++++++++++++++ pallets/subtensor/src/migrations/mod.rs | 1 + .../subtensor/src/staking/recycle_alpha.rs | 25 +--- pallets/subtensor/src/tests/migration.rs | 66 +++++++++ 5 files changed, 199 insertions(+), 21 deletions(-) create mode 100644 pallets/subtensor/src/migrations/migrate_add_stake_burn_rate_limit_key.rs diff --git a/pallets/subtensor/src/macros/hooks.rs b/pallets/subtensor/src/macros/hooks.rs index 6aa949ae45..971e0dbb58 100644 --- a/pallets/subtensor/src/macros/hooks.rs +++ b/pallets/subtensor/src/macros/hooks.rs @@ -131,6 +131,8 @@ mod hooks { .saturating_add(migrations::migrate_rate_limiting_last_blocks::migrate_obsolete_rate_limiting_last_blocks_storage::()) // Re-encode rate limit keys after introducing OwnerHyperparamUpdate variant .saturating_add(migrations::migrate_rate_limit_keys::migrate_rate_limit_keys::()) + // Re-key AddStakeBurn rate limits by subnet and signer. + .saturating_add(migrations::migrate_add_stake_burn_rate_limit_key::migrate_add_stake_burn_rate_limit_key::()) // Migrate remove network modality .saturating_add(migrations::migrate_remove_network_modality::migrate_remove_network_modality::()) // Migrate Immunity Period diff --git a/pallets/subtensor/src/migrations/migrate_add_stake_burn_rate_limit_key.rs b/pallets/subtensor/src/migrations/migrate_add_stake_burn_rate_limit_key.rs new file mode 100644 index 0000000000..2332bcf2a9 --- /dev/null +++ b/pallets/subtensor/src/migrations/migrate_add_stake_burn_rate_limit_key.rs @@ -0,0 +1,126 @@ +use alloc::string::String; +use codec::{Decode, Encode, EncodeLike, Error as CodecError, Input, Output}; +use frame_support::{ + pallet_prelude::{Identity, OptionQuery}, + storage_alias, + traits::Get, + weights::Weight, +}; +use scale_info::TypeInfo; +use sp_std::vec::Vec; +use subtensor_runtime_common::NetUid; + +use crate::{ + AccountIdOf, Config, HasMigrationRun, LastRateLimitedBlock, Pallet, RateLimitKey, SubnetOwner, +}; + +const MIGRATION_NAME: &[u8] = b"migrate_add_stake_burn_rate_limit_key"; + +#[allow(dead_code)] +#[derive(Decode, Encode, TypeInfo)] +enum RateLimitKeyV0 { + SetSNOwnerHotkey(NetUid), + OwnerHyperparamUpdate(NetUid, crate::Hyperparameter), + NetworkLastRegistered, + LastTxBlock(AccountId), + LastTxBlockChildKeyTake(AccountId), + LastTxBlockDelegateTake(AccountId), + AddStakeBurn(NetUid), +} + +#[allow(dead_code)] +#[derive(TypeInfo)] +enum LegacyRateLimitKey { + Legacy(RateLimitKeyV0), + Other, +} + +impl Encode for LegacyRateLimitKey { + fn size_hint(&self) -> usize { + match self { + Self::Legacy(key) => key.size_hint(), + Self::Other => 0, + } + } + + fn encode_to(&self, dest: &mut T) { + if let Self::Legacy(key) = self { + key.encode_to(dest); + } + } +} + +impl EncodeLike for LegacyRateLimitKey {} + +impl Decode for LegacyRateLimitKey { + fn decode(input: &mut I) -> Result { + let key = RateLimitKeyV0::::decode(input)?; + if input.remaining_len()?.unwrap_or(0) == 0 { + Ok(Self::Legacy(key)) + } else { + Ok(Self::Other) + } + } +} + +pub mod deprecated { + use super::*; + + #[storage_alias] + pub(super) type LastRateLimitedBlock = + StorageMap, Identity, LegacyRateLimitKey>, u64, OptionQuery>; +} + +pub fn migrate_add_stake_burn_rate_limit_key() -> Weight { + let mut weight = T::DbWeight::get().reads(1); + + if HasMigrationRun::::get(MIGRATION_NAME) { + log::info!( + "Migration '{}' already executed - skipping", + String::from_utf8_lossy(MIGRATION_NAME) + ); + return weight; + } + + log::info!( + "Running migration '{}'", + String::from_utf8_lossy(MIGRATION_NAME) + ); + + let mut migrated_entries = Vec::new(); + let mut translated = 0u64; + + deprecated::LastRateLimitedBlock::::translate::(|key, block| { + translated = translated.saturating_add(1); + if let LegacyRateLimitKey::Legacy(RateLimitKeyV0::AddStakeBurn(netuid)) = key { + migrated_entries.push((netuid, block)); + None + } else { + Some(block) + } + }); + weight = weight.saturating_add(T::DbWeight::get().reads_writes(translated, translated)); + + for (netuid, legacy_value) in &migrated_entries { + let owner = SubnetOwner::::get(*netuid); + weight = weight.saturating_add(T::DbWeight::get().reads(1)); + + let new_key = RateLimitKey::AddStakeBurn(*netuid, owner); + let merged_value = core::cmp::max(LastRateLimitedBlock::::get(&new_key), *legacy_value); + weight = weight.saturating_add(T::DbWeight::get().reads(1)); + + LastRateLimitedBlock::::insert(&new_key, merged_value); + weight = weight.saturating_add(T::DbWeight::get().writes(1)); + } + + HasMigrationRun::::insert(MIGRATION_NAME, true); + weight = weight.saturating_add(T::DbWeight::get().writes(1)); + + log::info!( + "Migration '{}' completed. migrated={}", + String::from_utf8_lossy(MIGRATION_NAME), + migrated_entries.len() + ); + + weight +} diff --git a/pallets/subtensor/src/migrations/mod.rs b/pallets/subtensor/src/migrations/mod.rs index 9974fd0175..59c25a5a00 100644 --- a/pallets/subtensor/src/migrations/mod.rs +++ b/pallets/subtensor/src/migrations/mod.rs @@ -4,6 +4,7 @@ use frame_support::pallet_prelude::Weight; use sp_io::KillStorageResult; use sp_io::hashing::twox_128; use sp_io::storage::clear_prefix; +pub mod migrate_add_stake_burn_rate_limit_key; pub mod migrate_auto_stake_destination; pub mod migrate_clear_deprecated_registration_maps; pub mod migrate_coldkey_swap_scheduled; diff --git a/pallets/subtensor/src/staking/recycle_alpha.rs b/pallets/subtensor/src/staking/recycle_alpha.rs index 18030a4c4b..97ee08fcdb 100644 --- a/pallets/subtensor/src/staking/recycle_alpha.rs +++ b/pallets/subtensor/src/staking/recycle_alpha.rs @@ -1,6 +1,5 @@ use super::*; use crate::{Error, system::ensure_signed}; -use frame_support::storage::{TransactionOutcome, transactional}; use subtensor_runtime_common::{AlphaBalance, NetUid}; impl Pallet { @@ -170,16 +169,8 @@ impl Pallet { netuid: NetUid, amount: TaoBalance, ) -> Result { - transactional::with_transaction(|| { - let alpha = match Self::do_add_stake(origin.clone(), hotkey.clone(), netuid, amount) { - Ok(a) => a, - Err(e) => return TransactionOutcome::Rollback(Err(e)), - }; - match Self::do_recycle_alpha(origin, hotkey, alpha, netuid) { - Ok(real_alpha) => TransactionOutcome::Commit(Ok(real_alpha)), - Err(e) => TransactionOutcome::Rollback(Err(e)), - } - }) + let alpha = Self::do_add_stake(origin.clone(), hotkey.clone(), netuid, amount)?; + Self::do_recycle_alpha(origin, hotkey, alpha, netuid) } /// Atomically stakes TAO and burns the resulting alpha. Permissionless @@ -191,16 +182,8 @@ impl Pallet { netuid: NetUid, amount: TaoBalance, ) -> Result { - transactional::with_transaction(|| { - let alpha = match Self::do_add_stake(origin.clone(), hotkey.clone(), netuid, amount) { - Ok(a) => a, - Err(e) => return TransactionOutcome::Rollback(Err(e)), - }; - match Self::do_burn_alpha(origin, hotkey, alpha, netuid) { - Ok(real_alpha) => TransactionOutcome::Commit(Ok(real_alpha)), - Err(e) => TransactionOutcome::Rollback(Err(e)), - } - }) + let alpha = Self::do_add_stake(origin.clone(), hotkey.clone(), netuid, amount)?; + Self::do_burn_alpha(origin, hotkey, alpha, netuid) } pub fn ensure_add_stake_burn_rate_limit( diff --git a/pallets/subtensor/src/tests/migration.rs b/pallets/subtensor/src/tests/migration.rs index 4bbfce09c7..2a9ade3007 100644 --- a/pallets/subtensor/src/tests/migration.rs +++ b/pallets/subtensor/src/tests/migration.rs @@ -1123,6 +1123,72 @@ fn test_migrate_rate_limit_keys() { }); } +#[test] +fn test_migrate_add_stake_burn_rate_limit_key() { + new_test_ext(1).execute_with(|| { + const MIGRATION_NAME: &[u8] = b"migrate_add_stake_burn_rate_limit_key"; + + let netuid = NetUid::from(42); + let netuid_with_newer_value = NetUid::from(43); + let owner = U256::from(4242); + let migrated_block = 1234u64; + let newer_block = 4321u64; + + SubnetOwner::::insert(netuid, owner); + SubnetOwner::::insert(netuid_with_newer_value, owner); + SubtensorModule::set_rate_limited_last_block( + &RateLimitKey::AddStakeBurn(netuid_with_newer_value, owner), + newer_block, + ); + + let mut legacy_key = { + let pallet_prefix = twox_128("SubtensorModule".as_bytes()); + let storage_prefix = twox_128("LastRateLimitedBlock".as_bytes()); + [pallet_prefix, storage_prefix].concat() + }; + legacy_key.push(6u8); + legacy_key.extend_from_slice(&netuid.encode()); + sp_io::storage::set(&legacy_key, &migrated_block.encode()); + + let mut legacy_key_with_newer_value = { + let pallet_prefix = twox_128("SubtensorModule".as_bytes()); + let storage_prefix = twox_128("LastRateLimitedBlock".as_bytes()); + [pallet_prefix, storage_prefix].concat() + }; + legacy_key_with_newer_value.push(6u8); + legacy_key_with_newer_value.extend_from_slice(&netuid_with_newer_value.encode()); + sp_io::storage::set(&legacy_key_with_newer_value, &migrated_block.encode()); + + let weight = + crate::migrations::migrate_add_stake_burn_rate_limit_key::migrate_add_stake_burn_rate_limit_key::(); + + assert!( + HasMigrationRun::::get(MIGRATION_NAME.to_vec()), + "Migration should be marked as executed" + ); + assert!(!weight.is_zero(), "Migration weight should be non-zero"); + assert!( + sp_io::storage::get(&legacy_key).is_none(), + "Legacy AddStakeBurn entry should be cleared" + ); + assert_eq!( + SubtensorModule::get_rate_limited_last_block(&RateLimitKey::AddStakeBurn(netuid, owner)), + migrated_block + ); + assert!( + sp_io::storage::get(&legacy_key_with_newer_value).is_none(), + "Legacy AddStakeBurn entry with existing modern value should be cleared" + ); + assert_eq!( + SubtensorModule::get_rate_limited_last_block(&RateLimitKey::AddStakeBurn( + netuid_with_newer_value, + owner + )), + newer_block + ); + }); +} + #[test] fn test_migrate_fix_staking_hot_keys() { new_test_ext(1).execute_with(|| { From fe524b19faf02e4811499cb8d0e4a3f3cdbe4207 Mon Sep 17 00:00:00 2001 From: open-junius Date: Mon, 4 May 2026 23:32:05 +0800 Subject: [PATCH 06/11] remove rate limit --- pallets/subtensor/src/extensions/subtensor.rs | 8 -- pallets/subtensor/src/lib.rs | 2 +- pallets/subtensor/src/macros/hooks.rs | 2 - .../migrate_add_stake_burn_rate_limit_key.rs | 126 ------------------ pallets/subtensor/src/migrations/mod.rs | 1 - .../subtensor/src/staking/recycle_alpha.rs | 24 ---- pallets/subtensor/src/tests/migration.rs | 66 --------- 7 files changed, 1 insertion(+), 228 deletions(-) delete mode 100644 pallets/subtensor/src/migrations/migrate_add_stake_burn_rate_limit_key.rs diff --git a/pallets/subtensor/src/extensions/subtensor.rs b/pallets/subtensor/src/extensions/subtensor.rs index 9197aa4990..64571843e7 100644 --- a/pallets/subtensor/src/extensions/subtensor.rs +++ b/pallets/subtensor/src/extensions/subtensor.rs @@ -16,8 +16,6 @@ use sp_std::vec::Vec; use subtensor_macros::freeze_struct; use subtensor_runtime_common::{CustomTransactionError, NetUid, NetUidStorageIndex}; -const ADD_STAKE_BURN_PRIORITY_BOOST: u64 = 100; - type CallOf = ::RuntimeCall; type OriginOf = ::RuntimeOrigin; @@ -261,12 +259,6 @@ where .map_err(|_| CustomTransactionError::EvmKeyAssociateRateLimitExceeded)?; Ok((Default::default(), (), origin)) } - Some(Call::add_stake_burn { netuid, .. }) => { - Pallet::::ensure_add_stake_burn_rate_limit(who.clone(), *netuid) - .map_err(|_| CustomTransactionError::RateLimitExceeded)?; - - Ok((Self::validity_ok(ADD_STAKE_BURN_PRIORITY_BOOST), (), origin)) - } _ => Ok((Default::default(), (), origin)), } } diff --git a/pallets/subtensor/src/lib.rs b/pallets/subtensor/src/lib.rs index 701d0f9e9d..d720aed56a 100644 --- a/pallets/subtensor/src/lib.rs +++ b/pallets/subtensor/src/lib.rs @@ -2805,7 +2805,7 @@ pub enum RateLimitKey { LastTxBlockDelegateTake(AccountId), // "Add stake and burn" rate limit #[codec(index = 6)] - AddStakeBurn(NetUid, AccountId), + AddStakeBurn(NetUid), } pub trait ProxyInterface { diff --git a/pallets/subtensor/src/macros/hooks.rs b/pallets/subtensor/src/macros/hooks.rs index 971e0dbb58..6aa949ae45 100644 --- a/pallets/subtensor/src/macros/hooks.rs +++ b/pallets/subtensor/src/macros/hooks.rs @@ -131,8 +131,6 @@ mod hooks { .saturating_add(migrations::migrate_rate_limiting_last_blocks::migrate_obsolete_rate_limiting_last_blocks_storage::()) // Re-encode rate limit keys after introducing OwnerHyperparamUpdate variant .saturating_add(migrations::migrate_rate_limit_keys::migrate_rate_limit_keys::()) - // Re-key AddStakeBurn rate limits by subnet and signer. - .saturating_add(migrations::migrate_add_stake_burn_rate_limit_key::migrate_add_stake_burn_rate_limit_key::()) // Migrate remove network modality .saturating_add(migrations::migrate_remove_network_modality::migrate_remove_network_modality::()) // Migrate Immunity Period diff --git a/pallets/subtensor/src/migrations/migrate_add_stake_burn_rate_limit_key.rs b/pallets/subtensor/src/migrations/migrate_add_stake_burn_rate_limit_key.rs deleted file mode 100644 index 2332bcf2a9..0000000000 --- a/pallets/subtensor/src/migrations/migrate_add_stake_burn_rate_limit_key.rs +++ /dev/null @@ -1,126 +0,0 @@ -use alloc::string::String; -use codec::{Decode, Encode, EncodeLike, Error as CodecError, Input, Output}; -use frame_support::{ - pallet_prelude::{Identity, OptionQuery}, - storage_alias, - traits::Get, - weights::Weight, -}; -use scale_info::TypeInfo; -use sp_std::vec::Vec; -use subtensor_runtime_common::NetUid; - -use crate::{ - AccountIdOf, Config, HasMigrationRun, LastRateLimitedBlock, Pallet, RateLimitKey, SubnetOwner, -}; - -const MIGRATION_NAME: &[u8] = b"migrate_add_stake_burn_rate_limit_key"; - -#[allow(dead_code)] -#[derive(Decode, Encode, TypeInfo)] -enum RateLimitKeyV0 { - SetSNOwnerHotkey(NetUid), - OwnerHyperparamUpdate(NetUid, crate::Hyperparameter), - NetworkLastRegistered, - LastTxBlock(AccountId), - LastTxBlockChildKeyTake(AccountId), - LastTxBlockDelegateTake(AccountId), - AddStakeBurn(NetUid), -} - -#[allow(dead_code)] -#[derive(TypeInfo)] -enum LegacyRateLimitKey { - Legacy(RateLimitKeyV0), - Other, -} - -impl Encode for LegacyRateLimitKey { - fn size_hint(&self) -> usize { - match self { - Self::Legacy(key) => key.size_hint(), - Self::Other => 0, - } - } - - fn encode_to(&self, dest: &mut T) { - if let Self::Legacy(key) = self { - key.encode_to(dest); - } - } -} - -impl EncodeLike for LegacyRateLimitKey {} - -impl Decode for LegacyRateLimitKey { - fn decode(input: &mut I) -> Result { - let key = RateLimitKeyV0::::decode(input)?; - if input.remaining_len()?.unwrap_or(0) == 0 { - Ok(Self::Legacy(key)) - } else { - Ok(Self::Other) - } - } -} - -pub mod deprecated { - use super::*; - - #[storage_alias] - pub(super) type LastRateLimitedBlock = - StorageMap, Identity, LegacyRateLimitKey>, u64, OptionQuery>; -} - -pub fn migrate_add_stake_burn_rate_limit_key() -> Weight { - let mut weight = T::DbWeight::get().reads(1); - - if HasMigrationRun::::get(MIGRATION_NAME) { - log::info!( - "Migration '{}' already executed - skipping", - String::from_utf8_lossy(MIGRATION_NAME) - ); - return weight; - } - - log::info!( - "Running migration '{}'", - String::from_utf8_lossy(MIGRATION_NAME) - ); - - let mut migrated_entries = Vec::new(); - let mut translated = 0u64; - - deprecated::LastRateLimitedBlock::::translate::(|key, block| { - translated = translated.saturating_add(1); - if let LegacyRateLimitKey::Legacy(RateLimitKeyV0::AddStakeBurn(netuid)) = key { - migrated_entries.push((netuid, block)); - None - } else { - Some(block) - } - }); - weight = weight.saturating_add(T::DbWeight::get().reads_writes(translated, translated)); - - for (netuid, legacy_value) in &migrated_entries { - let owner = SubnetOwner::::get(*netuid); - weight = weight.saturating_add(T::DbWeight::get().reads(1)); - - let new_key = RateLimitKey::AddStakeBurn(*netuid, owner); - let merged_value = core::cmp::max(LastRateLimitedBlock::::get(&new_key), *legacy_value); - weight = weight.saturating_add(T::DbWeight::get().reads(1)); - - LastRateLimitedBlock::::insert(&new_key, merged_value); - weight = weight.saturating_add(T::DbWeight::get().writes(1)); - } - - HasMigrationRun::::insert(MIGRATION_NAME, true); - weight = weight.saturating_add(T::DbWeight::get().writes(1)); - - log::info!( - "Migration '{}' completed. migrated={}", - String::from_utf8_lossy(MIGRATION_NAME), - migrated_entries.len() - ); - - weight -} diff --git a/pallets/subtensor/src/migrations/mod.rs b/pallets/subtensor/src/migrations/mod.rs index 59c25a5a00..9974fd0175 100644 --- a/pallets/subtensor/src/migrations/mod.rs +++ b/pallets/subtensor/src/migrations/mod.rs @@ -4,7 +4,6 @@ use frame_support::pallet_prelude::Weight; use sp_io::KillStorageResult; use sp_io::hashing::twox_128; use sp_io::storage::clear_prefix; -pub mod migrate_add_stake_burn_rate_limit_key; pub mod migrate_auto_stake_destination; pub mod migrate_clear_deprecated_registration_maps; pub mod migrate_coldkey_swap_scheduled; diff --git a/pallets/subtensor/src/staking/recycle_alpha.rs b/pallets/subtensor/src/staking/recycle_alpha.rs index 97ee08fcdb..07af01ff36 100644 --- a/pallets/subtensor/src/staking/recycle_alpha.rs +++ b/pallets/subtensor/src/staking/recycle_alpha.rs @@ -132,10 +132,6 @@ impl Pallet { amount: TaoBalance, limit: Option, ) -> DispatchResult { - let coldkey = ensure_signed(origin.clone())?; - - Self::ensure_add_stake_burn_rate_limit(coldkey.clone(), netuid)?; - let alpha = if let Some(limit) = limit { Self::do_add_stake_limit(origin.clone(), hotkey.clone(), netuid, amount, limit, false)? } else { @@ -144,11 +140,6 @@ impl Pallet { Self::do_burn_alpha(origin, hotkey.clone(), alpha, netuid)?; - Self::set_rate_limited_last_block( - &RateLimitKey::AddStakeBurn(netuid, coldkey), - Self::get_current_block_as_u64(), - ); - Self::deposit_event(Event::AddStakeBurn { netuid, hotkey, @@ -185,19 +176,4 @@ impl Pallet { let alpha = Self::do_add_stake(origin.clone(), hotkey.clone(), netuid, amount)?; Self::do_burn_alpha(origin, hotkey, alpha, netuid) } - - pub fn ensure_add_stake_burn_rate_limit( - coldkey: T::AccountId, - netuid: NetUid, - ) -> DispatchResult { - let current_block = Self::get_current_block_as_u64(); - let last_block = - Self::get_rate_limited_last_block(&RateLimitKey::AddStakeBurn(netuid, coldkey.clone())); - let rate_limit = TransactionType::AddStakeBurn.rate_limit_on_subnet::(netuid); - ensure!( - last_block.is_zero() || current_block.saturating_sub(last_block) >= rate_limit, - Error::::AddStakeBurnRateLimitExceeded - ); - Ok(()) - } } diff --git a/pallets/subtensor/src/tests/migration.rs b/pallets/subtensor/src/tests/migration.rs index 2a9ade3007..4bbfce09c7 100644 --- a/pallets/subtensor/src/tests/migration.rs +++ b/pallets/subtensor/src/tests/migration.rs @@ -1123,72 +1123,6 @@ fn test_migrate_rate_limit_keys() { }); } -#[test] -fn test_migrate_add_stake_burn_rate_limit_key() { - new_test_ext(1).execute_with(|| { - const MIGRATION_NAME: &[u8] = b"migrate_add_stake_burn_rate_limit_key"; - - let netuid = NetUid::from(42); - let netuid_with_newer_value = NetUid::from(43); - let owner = U256::from(4242); - let migrated_block = 1234u64; - let newer_block = 4321u64; - - SubnetOwner::::insert(netuid, owner); - SubnetOwner::::insert(netuid_with_newer_value, owner); - SubtensorModule::set_rate_limited_last_block( - &RateLimitKey::AddStakeBurn(netuid_with_newer_value, owner), - newer_block, - ); - - let mut legacy_key = { - let pallet_prefix = twox_128("SubtensorModule".as_bytes()); - let storage_prefix = twox_128("LastRateLimitedBlock".as_bytes()); - [pallet_prefix, storage_prefix].concat() - }; - legacy_key.push(6u8); - legacy_key.extend_from_slice(&netuid.encode()); - sp_io::storage::set(&legacy_key, &migrated_block.encode()); - - let mut legacy_key_with_newer_value = { - let pallet_prefix = twox_128("SubtensorModule".as_bytes()); - let storage_prefix = twox_128("LastRateLimitedBlock".as_bytes()); - [pallet_prefix, storage_prefix].concat() - }; - legacy_key_with_newer_value.push(6u8); - legacy_key_with_newer_value.extend_from_slice(&netuid_with_newer_value.encode()); - sp_io::storage::set(&legacy_key_with_newer_value, &migrated_block.encode()); - - let weight = - crate::migrations::migrate_add_stake_burn_rate_limit_key::migrate_add_stake_burn_rate_limit_key::(); - - assert!( - HasMigrationRun::::get(MIGRATION_NAME.to_vec()), - "Migration should be marked as executed" - ); - assert!(!weight.is_zero(), "Migration weight should be non-zero"); - assert!( - sp_io::storage::get(&legacy_key).is_none(), - "Legacy AddStakeBurn entry should be cleared" - ); - assert_eq!( - SubtensorModule::get_rate_limited_last_block(&RateLimitKey::AddStakeBurn(netuid, owner)), - migrated_block - ); - assert!( - sp_io::storage::get(&legacy_key_with_newer_value).is_none(), - "Legacy AddStakeBurn entry with existing modern value should be cleared" - ); - assert_eq!( - SubtensorModule::get_rate_limited_last_block(&RateLimitKey::AddStakeBurn( - netuid_with_newer_value, - owner - )), - newer_block - ); - }); -} - #[test] fn test_migrate_fix_staking_hot_keys() { new_test_ext(1).execute_with(|| { From 37d62eb14e3b670a1c0a518bb53fc09c1477420e Mon Sep 17 00:00:00 2001 From: open-junius Date: Mon, 4 May 2026 23:34:42 +0800 Subject: [PATCH 07/11] commit Cargo.lock --- pallets/subtensor/src/tests/recycle_alpha.rs | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/pallets/subtensor/src/tests/recycle_alpha.rs b/pallets/subtensor/src/tests/recycle_alpha.rs index 5fd09cbd99..69f46eacd2 100644 --- a/pallets/subtensor/src/tests/recycle_alpha.rs +++ b/pallets/subtensor/src/tests/recycle_alpha.rs @@ -894,10 +894,7 @@ fn test_add_stake_burn_rate_limit_exceeded() { add_balance_to_coldkey_account(&coldkey_account_id, (amount * 10).into()); assert_eq!( - SubtensorModule::get_rate_limited_last_block(&RateLimitKey::AddStakeBurn( - netuid, - coldkey_account_id - )), + SubtensorModule::get_rate_limited_last_block(&RateLimitKey::AddStakeBurn(netuid,)), 0 ); @@ -911,10 +908,7 @@ fn test_add_stake_burn_rate_limit_exceeded() { )); assert_eq!( - SubtensorModule::get_rate_limited_last_block(&RateLimitKey::AddStakeBurn( - netuid, - coldkey_account_id - )), + SubtensorModule::get_rate_limited_last_block(&RateLimitKey::AddStakeBurn(netuid,)), SubtensorModule::get_current_block_as_u64() ); From 7d910d84978efc83486c10e1810966d93ceab779 Mon Sep 17 00:00:00 2001 From: open-junius Date: Tue, 5 May 2026 11:26:49 +0800 Subject: [PATCH 08/11] remove unuseful test --- .../subtensor/src/staking/recycle_alpha.rs | 2 +- pallets/subtensor/src/tests/recycle_alpha.rs | 63 ------------------- 2 files changed, 1 insertion(+), 64 deletions(-) diff --git a/pallets/subtensor/src/staking/recycle_alpha.rs b/pallets/subtensor/src/staking/recycle_alpha.rs index 07af01ff36..cacde73d74 100644 --- a/pallets/subtensor/src/staking/recycle_alpha.rs +++ b/pallets/subtensor/src/staking/recycle_alpha.rs @@ -165,7 +165,7 @@ impl Pallet { } /// Atomically stakes TAO and burns the resulting alpha. Permissionless - /// counterpart to `do_add_stake_burn`: no rate limit. + /// counterpart to `do_add_stake_burn`: return the amount of alpha burned. /// limit. Used by the chain extension. pub fn do_add_stake_burn_permissionless( origin: OriginFor, diff --git a/pallets/subtensor/src/tests/recycle_alpha.rs b/pallets/subtensor/src/tests/recycle_alpha.rs index 69f46eacd2..a78c4ab5ee 100644 --- a/pallets/subtensor/src/tests/recycle_alpha.rs +++ b/pallets/subtensor/src/tests/recycle_alpha.rs @@ -874,66 +874,3 @@ fn test_add_stake_burn_insufficient_balance_fails() { ); }); } - -#[test] -fn test_add_stake_burn_rate_limit_exceeded() { - new_test_ext(1).execute_with(|| { - let hotkey_account_id = U256::from(533453); - let coldkey_account_id = U256::from(55453); - let amount: u64 = 10_000_000_000; // 10 TAO - - // Add network - let netuid = add_dynamic_network(&hotkey_account_id, &coldkey_account_id); - - // Setup reserves with large liquidity - let tao_reserve = TaoBalance::from(1_000_000_000_000_u64); - let alpha_in = AlphaBalance::from(1_000_000_000_000_u64); - mock::setup_reserves(netuid, tao_reserve, alpha_in); - - // Give coldkey sufficient balance for multiple "add stake and burn" operations. - add_balance_to_coldkey_account(&coldkey_account_id, (amount * 10).into()); - - assert_eq!( - SubtensorModule::get_rate_limited_last_block(&RateLimitKey::AddStakeBurn(netuid,)), - 0 - ); - - // First "add stake and burn" should succeed - assert_ok!(SubtensorModule::add_stake_burn( - RuntimeOrigin::signed(coldkey_account_id), - hotkey_account_id, - netuid, - amount.into(), - None, - )); - - assert_eq!( - SubtensorModule::get_rate_limited_last_block(&RateLimitKey::AddStakeBurn(netuid,)), - SubtensorModule::get_current_block_as_u64() - ); - - // Second "add stake and burn" immediately after should fail due to rate limit - assert_noop!( - SubtensorModule::add_stake_burn( - RuntimeOrigin::signed(coldkey_account_id), - hotkey_account_id, - netuid, - amount.into(), - None, - ), - Error::::AddStakeBurnRateLimitExceeded - ); - - // After stepping past the rate limit, "add stake and burn" should succeed again - let rate_limit = TransactionType::AddStakeBurn.rate_limit_on_subnet::(netuid); - step_block(rate_limit as u16); - - assert_ok!(SubtensorModule::add_stake_burn( - RuntimeOrigin::signed(coldkey_account_id), - hotkey_account_id, - netuid, - amount.into(), - None, - )); - }); -} From be96ff060e5f37df620e4823707fc14648dca264 Mon Sep 17 00:00:00 2001 From: open-junius Date: Tue, 5 May 2026 12:24:50 +0800 Subject: [PATCH 09/11] add migration to remove unuseful data --- pallets/subtensor/src/macros/hooks.rs | 2 + ...igrate_remove_add_stake_burn_rate_limit.rs | 53 +++++++++++++++++++ pallets/subtensor/src/migrations/mod.rs | 1 + pallets/subtensor/src/tests/migration.rs | 39 ++++++++++++++ 4 files changed, 95 insertions(+) create mode 100644 pallets/subtensor/src/migrations/migrate_remove_add_stake_burn_rate_limit.rs diff --git a/pallets/subtensor/src/macros/hooks.rs b/pallets/subtensor/src/macros/hooks.rs index 6aa949ae45..ecd8d4212a 100644 --- a/pallets/subtensor/src/macros/hooks.rs +++ b/pallets/subtensor/src/macros/hooks.rs @@ -131,6 +131,8 @@ mod hooks { .saturating_add(migrations::migrate_rate_limiting_last_blocks::migrate_obsolete_rate_limiting_last_blocks_storage::()) // Re-encode rate limit keys after introducing OwnerHyperparamUpdate variant .saturating_add(migrations::migrate_rate_limit_keys::migrate_rate_limit_keys::()) + // Remove AddStakeBurn entries from LastRateLimitedBlock + .saturating_add(migrations::migrate_remove_add_stake_burn_rate_limit::migrate_remove_add_stake_burn_rate_limit::()) // Migrate remove network modality .saturating_add(migrations::migrate_remove_network_modality::migrate_remove_network_modality::()) // Migrate Immunity Period diff --git a/pallets/subtensor/src/migrations/migrate_remove_add_stake_burn_rate_limit.rs b/pallets/subtensor/src/migrations/migrate_remove_add_stake_burn_rate_limit.rs new file mode 100644 index 0000000000..dcbf307855 --- /dev/null +++ b/pallets/subtensor/src/migrations/migrate_remove_add_stake_burn_rate_limit.rs @@ -0,0 +1,53 @@ +use alloc::string::String; +use alloc::vec::Vec; +use frame_support::{traits::Get, weights::Weight}; + +use crate::{Config, HasMigrationRun, LastRateLimitedBlock, RateLimitKey}; + +const MIGRATION_NAME: &[u8] = b"migrate_remove_add_stake_burn_rate_limit"; + +pub fn migrate_remove_add_stake_burn_rate_limit() -> Weight { + let mut weight = T::DbWeight::get().reads(1); + + if HasMigrationRun::::get(MIGRATION_NAME) { + log::info!( + "Migration '{}' already executed - skipping", + String::from_utf8_lossy(MIGRATION_NAME) + ); + return weight; + } + + log::info!( + "Running migration '{}'", + String::from_utf8_lossy(MIGRATION_NAME) + ); + + let mut scanned_count = 0u64; + let keys_to_remove = LastRateLimitedBlock::::iter_keys() + .filter_map(|key| { + scanned_count = scanned_count.saturating_add(1); + matches!(key, RateLimitKey::AddStakeBurn(_)).then_some(key) + }) + .collect::>(); + let removed_count = keys_to_remove.len() as u64; + + weight = weight.saturating_add(T::DbWeight::get().reads(scanned_count)); + + for key in &keys_to_remove { + LastRateLimitedBlock::::remove(key); + } + + weight = weight.saturating_add(T::DbWeight::get().writes(removed_count)); + + HasMigrationRun::::insert(MIGRATION_NAME, true); + weight = weight.saturating_add(T::DbWeight::get().writes(1)); + + log::info!( + "Migration '{}' completed. scanned_entries={}, removed_add_stake_burn_entries={}", + String::from_utf8_lossy(MIGRATION_NAME), + scanned_count, + removed_count + ); + + weight +} diff --git a/pallets/subtensor/src/migrations/mod.rs b/pallets/subtensor/src/migrations/mod.rs index 9974fd0175..d8177a8ccf 100644 --- a/pallets/subtensor/src/migrations/mod.rs +++ b/pallets/subtensor/src/migrations/mod.rs @@ -35,6 +35,7 @@ pub mod migrate_populate_owned_hotkeys; pub mod migrate_rao; pub mod migrate_rate_limit_keys; pub mod migrate_rate_limiting_last_blocks; +pub mod migrate_remove_add_stake_burn_rate_limit; pub mod migrate_remove_commitments_rate_limit; pub mod migrate_remove_network_modality; pub mod migrate_remove_old_identity_maps; diff --git a/pallets/subtensor/src/tests/migration.rs b/pallets/subtensor/src/tests/migration.rs index 4bbfce09c7..bf280556e0 100644 --- a/pallets/subtensor/src/tests/migration.rs +++ b/pallets/subtensor/src/tests/migration.rs @@ -1123,6 +1123,45 @@ fn test_migrate_rate_limit_keys() { }); } +#[test] +fn test_migrate_remove_add_stake_burn_rate_limit() { + new_test_ext(1).execute_with(|| { + const MIGRATION_NAME: &[u8] = b"migrate_remove_add_stake_burn_rate_limit"; + let netuid = NetUid::from(1); + let other_netuid = NetUid::from(2); + let preserved_netuid = NetUid::from(3); + let add_stake_burn_key = RateLimitKey::AddStakeBurn(netuid); + let other_add_stake_burn_key = RateLimitKey::AddStakeBurn(other_netuid); + let preserved_key = RateLimitKey::SetSNOwnerHotkey(preserved_netuid); + + SubtensorModule::set_rate_limited_last_block(&add_stake_burn_key, 100); + SubtensorModule::set_rate_limited_last_block(&other_add_stake_burn_key, 200); + SubtensorModule::set_rate_limited_last_block(&preserved_key, 300); + + let weight = + crate::migrations::migrate_remove_add_stake_burn_rate_limit::migrate_remove_add_stake_burn_rate_limit::(); + + assert!( + HasMigrationRun::::get(MIGRATION_NAME.to_vec()), + "Migration should be marked as executed" + ); + assert!(!weight.is_zero(), "Migration weight should be non-zero"); + + assert_eq!( + SubtensorModule::get_rate_limited_last_block(&add_stake_burn_key), + 0 + ); + assert_eq!( + SubtensorModule::get_rate_limited_last_block(&other_add_stake_burn_key), + 0 + ); + assert_eq!( + SubtensorModule::get_rate_limited_last_block(&preserved_key), + 300 + ); + }); +} + #[test] fn test_migrate_fix_staking_hot_keys() { new_test_ext(1).execute_with(|| { From 80012c20e4394cc4bdd75104ae37afae1710aa5d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 5 May 2026 08:19:19 +0000 Subject: [PATCH 10/11] auto-update benchmark weights --- pallets/admin-utils/src/weights.rs | 466 ++++++------ pallets/proxy/src/weights.rs | 220 +++--- pallets/subtensor/src/weights.rs | 1084 ++++++++++++++++------------ pallets/utility/src/weights.rs | 84 +-- 4 files changed, 1017 insertions(+), 837 deletions(-) diff --git a/pallets/admin-utils/src/weights.rs b/pallets/admin-utils/src/weights.rs index fe25023e6a..05506c6c6a 100644 --- a/pallets/admin-utils/src/weights.rs +++ b/pallets/admin-utils/src/weights.rs @@ -2,7 +2,7 @@ //! Autogenerated weights for `pallet_admin_utils` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 49.1.0 -//! DATE: 2026-04-22, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2026-05-05, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runnervmeorf1`, CPU: `AMD EPYC 7763 64-Core Processor` //! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: `1024` @@ -22,7 +22,7 @@ // --no-storage-info // --no-min-squares // --no-median-slopes -// --output=/tmp/tmp.7rTcxn9z8w +// --output=/tmp/tmp.8WV7DRXpuJ // --template=/home/runner/work/subtensor/subtensor/.maintain/frame-weight-template.hbs #![cfg_attr(rustfmt, rustfmt_skip)] @@ -103,10 +103,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_938_000 picoseconds. - Weight::from_parts(4_750_164, 0) - // Standard Error: 832 - .saturating_add(Weight::from_parts(25_112, 0).saturating_mul(a.into())) + // Minimum execution time: 3_847_000 picoseconds. + Weight::from_parts(4_473_034, 0) + // Standard Error: 602 + .saturating_add(Weight::from_parts(25_766, 0).saturating_mul(a.into())) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `Grandpa::PendingChange` (r:1 w:1) @@ -116,10 +116,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `174` // Estimated: `2779` - // Minimum execution time: 7_043_000 picoseconds. - Weight::from_parts(7_618_299, 2779) - // Standard Error: 1_813 - .saturating_add(Weight::from_parts(44_821, 0).saturating_mul(a.into())) + // Minimum execution time: 7_163_000 picoseconds. + Weight::from_parts(7_770_283, 2779) + // Standard Error: 735 + .saturating_add(Weight::from_parts(15_528, 0).saturating_mul(a.into())) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -129,8 +129,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_340_000 picoseconds. - Weight::from_parts(5_710_000, 0) + // Minimum execution time: 5_079_000 picoseconds. + Weight::from_parts(5_360_000, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::Tempo` (r:1 w:0) @@ -143,8 +143,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `627` // Estimated: `4092` - // Minimum execution time: 21_159_000 picoseconds. - Weight::from_parts(21_711_000, 4092) + // Minimum execution time: 20_669_000 picoseconds. + Weight::from_parts(21_080_000, 4092) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -160,8 +160,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `760` // Estimated: `4225` - // Minimum execution time: 26_819_000 picoseconds. - Weight::from_parts(27_381_000, 4225) + // Minimum execution time: 26_138_000 picoseconds. + Weight::from_parts(26_860_000, 4225) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -177,8 +177,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `760` // Estimated: `4225` - // Minimum execution time: 26_519_000 picoseconds. - Weight::from_parts(27_401_000, 4225) + // Minimum execution time: 26_229_000 picoseconds. + Weight::from_parts(27_030_000, 4225) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -190,8 +190,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `609` // Estimated: `4074` - // Minimum execution time: 16_441_000 picoseconds. - Weight::from_parts(17_213_000, 4074) + // Minimum execution time: 16_230_000 picoseconds. + Weight::from_parts(16_651_000, 4074) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -207,8 +207,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `760` // Estimated: `4225` - // Minimum execution time: 26_560_000 picoseconds. - Weight::from_parts(27_391_000, 4225) + // Minimum execution time: 26_099_000 picoseconds. + Weight::from_parts(26_880_000, 4225) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -224,8 +224,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `760` // Estimated: `4225` - // Minimum execution time: 26_689_000 picoseconds. - Weight::from_parts(27_392_000, 4225) + // Minimum execution time: 25_938_000 picoseconds. + Weight::from_parts(27_080_000, 4225) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -241,8 +241,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `760` // Estimated: `4225` - // Minimum execution time: 26_770_000 picoseconds. - Weight::from_parts(27_561_000, 4225) + // Minimum execution time: 26_138_000 picoseconds. + Weight::from_parts(26_810_000, 4225) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -260,8 +260,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `760` // Estimated: `4225` - // Minimum execution time: 28_162_000 picoseconds. - Weight::from_parts(29_204_000, 4225) + // Minimum execution time: 27_681_000 picoseconds. + Weight::from_parts(28_473_000, 4225) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -277,8 +277,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `760` // Estimated: `4225` - // Minimum execution time: 25_948_000 picoseconds. - Weight::from_parts(27_382_000, 4225) + // Minimum execution time: 26_128_000 picoseconds. + Weight::from_parts(26_950_000, 4225) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -290,8 +290,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `609` // Estimated: `4074` - // Minimum execution time: 15_449_000 picoseconds. - Weight::from_parts(17_012_000, 4074) + // Minimum execution time: 16_290_000 picoseconds. + Weight::from_parts(16_731_000, 4074) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -307,8 +307,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `760` // Estimated: `4225` - // Minimum execution time: 26_359_000 picoseconds. - Weight::from_parts(27_441_000, 4225) + // Minimum execution time: 25_968_000 picoseconds. + Weight::from_parts(27_081_000, 4225) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -326,8 +326,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `822` // Estimated: `4287` - // Minimum execution time: 28_634_000 picoseconds. - Weight::from_parts(29_545_000, 4287) + // Minimum execution time: 28_343_000 picoseconds. + Weight::from_parts(28_884_000, 4287) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -343,8 +343,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `760` // Estimated: `4225` - // Minimum execution time: 22_021_000 picoseconds. - Weight::from_parts(24_115_000, 4225) + // Minimum execution time: 23_384_000 picoseconds. + Weight::from_parts(24_065_000, 4225) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -356,8 +356,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `609` // Estimated: `4074` - // Minimum execution time: 15_288_000 picoseconds. - Weight::from_parts(17_032_000, 4074) + // Minimum execution time: 16_260_000 picoseconds. + Weight::from_parts(16_720_000, 4074) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -377,8 +377,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `760` // Estimated: `4225` - // Minimum execution time: 27_912_000 picoseconds. - Weight::from_parts(30_777_000, 4225) + // Minimum execution time: 29_034_000 picoseconds. + Weight::from_parts(29_765_000, 4225) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -400,8 +400,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `795` // Estimated: `4260` - // Minimum execution time: 30_908_000 picoseconds. - Weight::from_parts(33_974_000, 4260) + // Minimum execution time: 32_701_000 picoseconds. + Weight::from_parts(33_111_000, 4260) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -417,8 +417,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `760` // Estimated: `4225` - // Minimum execution time: 24_856_000 picoseconds. - Weight::from_parts(27_331_000, 4225) + // Minimum execution time: 26_199_000 picoseconds. + Weight::from_parts(27_721_000, 4225) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -434,8 +434,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `760` // Estimated: `4225` - // Minimum execution time: 26_810_000 picoseconds. - Weight::from_parts(27_291_000, 4225) + // Minimum execution time: 26_039_000 picoseconds. + Weight::from_parts(26_770_000, 4225) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -451,8 +451,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `760` // Estimated: `4225` - // Minimum execution time: 24_686_000 picoseconds. - Weight::from_parts(26_189_000, 4225) + // Minimum execution time: 26_189_000 picoseconds. + Weight::from_parts(26_800_000, 4225) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -470,8 +470,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `787` // Estimated: `4252` - // Minimum execution time: 27_231_000 picoseconds. - Weight::from_parts(30_688_000, 4252) + // Minimum execution time: 28_603_000 picoseconds. + Weight::from_parts(29_856_000, 4252) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -489,8 +489,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `762` // Estimated: `4227` - // Minimum execution time: 29_936_000 picoseconds. - Weight::from_parts(30_777_000, 4227) + // Minimum execution time: 29_164_000 picoseconds. + Weight::from_parts(29_996_000, 4227) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -500,8 +500,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_823_000 picoseconds. - Weight::from_parts(7_163_000, 0) + // Minimum execution time: 6_232_000 picoseconds. + Weight::from_parts(6_623_000, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::Tempo` (r:1 w:1) @@ -514,8 +514,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `760` // Estimated: `4225` - // Minimum execution time: 26_500_000 picoseconds. - Weight::from_parts(27_261_000, 4225) + // Minimum execution time: 25_677_000 picoseconds. + Weight::from_parts(26_550_000, 4225) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -531,8 +531,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `760` // Estimated: `4225` - // Minimum execution time: 27_140_000 picoseconds. - Weight::from_parts(27_842_000, 4225) + // Minimum execution time: 26_539_000 picoseconds. + Weight::from_parts(27_251_000, 4225) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -548,8 +548,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `760` // Estimated: `4225` - // Minimum execution time: 26_379_000 picoseconds. - Weight::from_parts(27_342_000, 4225) + // Minimum execution time: 26_239_000 picoseconds. + Weight::from_parts(27_051_000, 4225) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -559,8 +559,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_671_000 picoseconds. - Weight::from_parts(6_031_000, 0) + // Minimum execution time: 5_561_000 picoseconds. + Weight::from_parts(5_841_000, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::TxRateLimit` (r:0 w:1) @@ -569,19 +569,16 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_230_000 picoseconds. - Weight::from_parts(5_590_000, 0) + // Minimum execution time: 5_079_000 picoseconds. + Weight::from_parts(5_400_000, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } - /// Storage: `SubtensorModule::TotalIssuance` (r:0 w:1) - /// Proof: `SubtensorModule::TotalIssuance` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn sudo_set_total_issuance() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_318_000 picoseconds. - Weight::from_parts(5_318_000, 0) - .saturating_add(T::DbWeight::get().writes(0_u64)) + // Minimum execution time: 5_490_000 picoseconds. + Weight::from_parts(5_821_000, 0) } /// Storage: `SubtensorModule::NetworksAdded` (r:1 w:0) /// Proof: `SubtensorModule::NetworksAdded` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -591,8 +588,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `609` // Estimated: `4074` - // Minimum execution time: 16_431_000 picoseconds. - Weight::from_parts(17_062_000, 4074) + // Minimum execution time: 16_221_000 picoseconds. + Weight::from_parts(16_682_000, 4074) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -602,8 +599,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_500_000 picoseconds. - Weight::from_parts(5_761_000, 0) + // Minimum execution time: 5_100_000 picoseconds. + Weight::from_parts(5_390_000, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::NominatorMinRequiredStake` (r:1 w:1) @@ -618,8 +615,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `912` // Estimated: `6852` - // Minimum execution time: 28_793_000 picoseconds. - Weight::from_parts(29_446_000, 6852) + // Minimum execution time: 27_832_000 picoseconds. + Weight::from_parts(28_914_000, 6852) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -629,8 +626,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_430_000 picoseconds. - Weight::from_parts(5_690_000, 0) + // Minimum execution time: 5_209_000 picoseconds. + Weight::from_parts(5_380_000, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::MinDelegateTake` (r:0 w:1) @@ -639,8 +636,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_430_000 picoseconds. - Weight::from_parts(5_631_000, 0) + // Minimum execution time: 5_050_000 picoseconds. + Weight::from_parts(5_250_000, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::Tempo` (r:1 w:0) @@ -653,8 +650,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `657` // Estimated: `4122` - // Minimum execution time: 18_134_000 picoseconds. - Weight::from_parts(18_766_000, 4122) + // Minimum execution time: 17_803_000 picoseconds. + Weight::from_parts(18_214_000, 4122) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -670,8 +667,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `804` // Estimated: `4269` - // Minimum execution time: 26_770_000 picoseconds. - Weight::from_parts(27_562_000, 4269) + // Minimum execution time: 25_728_000 picoseconds. + Weight::from_parts(26_329_000, 4269) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -681,8 +678,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_350_000 picoseconds. - Weight::from_parts(5_761_000, 0) + // Minimum execution time: 5_179_000 picoseconds. + Weight::from_parts(5_450_000, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::ColdkeySwapReannouncementDelay` (r:0 w:1) @@ -691,8 +688,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_330_000 picoseconds. - Weight::from_parts(5_750_000, 0) + // Minimum execution time: 5_089_000 picoseconds. + Weight::from_parts(5_380_000, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::DissolveNetworkScheduleDuration` (r:0 w:1) @@ -701,8 +698,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_421_000 picoseconds. - Weight::from_parts(5_791_000, 0) + // Minimum execution time: 5_150_000 picoseconds. + Weight::from_parts(5_390_000, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::Tempo` (r:1 w:0) @@ -715,8 +712,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `657` // Estimated: `4122` - // Minimum execution time: 20_879_000 picoseconds. - Weight::from_parts(21_460_000, 4122) + // Minimum execution time: 20_188_000 picoseconds. + Weight::from_parts(20_749_000, 4122) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -726,8 +723,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `42` // Estimated: `3507` - // Minimum execution time: 6_201_000 picoseconds. - Weight::from_parts(6_542_000, 3507) + // Minimum execution time: 5_861_000 picoseconds. + Weight::from_parts(6_101_000, 3507) .saturating_add(T::DbWeight::get().reads(1_u64)) } /// Storage: `SubtensorModule::SubnetMovingAlpha` (r:0 w:1) @@ -736,8 +733,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_795_000 picoseconds. - Weight::from_parts(3_036_000, 0) + // Minimum execution time: 2_715_000 picoseconds. + Weight::from_parts(2_986_000, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::EMAPriceHalvingBlocks` (r:0 w:1) @@ -746,8 +743,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_857_000 picoseconds. - Weight::from_parts(4_238_000, 0) + // Minimum execution time: 3_778_000 picoseconds. + Weight::from_parts(3_957_000, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::Tempo` (r:1 w:0) @@ -762,8 +759,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `760` // Estimated: `4225` - // Minimum execution time: 23_674_000 picoseconds. - Weight::from_parts(24_256_000, 4225) + // Minimum execution time: 23_174_000 picoseconds. + Weight::from_parts(23_573_000, 4225) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -777,8 +774,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `657` // Estimated: `4122` - // Minimum execution time: 21_120_000 picoseconds. - Weight::from_parts(21_711_000, 4122) + // Minimum execution time: 20_408_000 picoseconds. + Weight::from_parts(21_109_000, 4122) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -792,8 +789,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `657` // Estimated: `4122` - // Minimum execution time: 22_642_000 picoseconds. - Weight::from_parts(23_324_000, 4122) + // Minimum execution time: 22_151_000 picoseconds. + Weight::from_parts(22_832_000, 4122) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -807,8 +804,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `702` // Estimated: `4167` - // Minimum execution time: 22_252_000 picoseconds. - Weight::from_parts(22_733_000, 4167) + // Minimum execution time: 24_275_000 picoseconds. + Weight::from_parts(25_357_000, 4167) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -822,8 +819,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `657` // Estimated: `4122` - // Minimum execution time: 17_633_000 picoseconds. - Weight::from_parts(18_094_000, 4122) + // Minimum execution time: 17_232_000 picoseconds. + Weight::from_parts(17_733_000, 4122) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -833,8 +830,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_300_000 picoseconds. - Weight::from_parts(5_690_000, 0) + // Minimum execution time: 5_100_000 picoseconds. + Weight::from_parts(5_359_000, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::OwnerHyperparamRateLimit` (r:0 w:1) @@ -843,8 +840,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_070_000 picoseconds. - Weight::from_parts(5_570_000, 0) + // Minimum execution time: 5_039_000 picoseconds. + Weight::from_parts(5_329_000, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::Tempo` (r:1 w:0) @@ -857,8 +854,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `657` // Estimated: `4122` - // Minimum execution time: 16_751_000 picoseconds. - Weight::from_parts(18_124_000, 4122) + // Minimum execution time: 17_223_000 picoseconds. + Weight::from_parts(17_563_000, 4122) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -878,8 +875,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `760` // Estimated: `4225` - // Minimum execution time: 26_660_000 picoseconds. - Weight::from_parts(28_844_000, 4225) + // Minimum execution time: 27_562_000 picoseconds. + Weight::from_parts(28_143_000, 4225) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -889,8 +886,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_132_000 picoseconds. - Weight::from_parts(7_053_000, 0) + // Minimum execution time: 6_442_000 picoseconds. + Weight::from_parts(6_743_000, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } } @@ -904,10 +901,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_938_000 picoseconds. - Weight::from_parts(4_750_164, 0) - // Standard Error: 832 - .saturating_add(Weight::from_parts(25_112, 0).saturating_mul(a.into())) + // Minimum execution time: 3_847_000 picoseconds. + Weight::from_parts(4_473_034, 0) + // Standard Error: 602 + .saturating_add(Weight::from_parts(25_766, 0).saturating_mul(a.into())) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `Grandpa::PendingChange` (r:1 w:1) @@ -917,10 +914,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `174` // Estimated: `2779` - // Minimum execution time: 7_043_000 picoseconds. - Weight::from_parts(7_618_299, 2779) - // Standard Error: 1_813 - .saturating_add(Weight::from_parts(44_821, 0).saturating_mul(a.into())) + // Minimum execution time: 7_163_000 picoseconds. + Weight::from_parts(7_770_283, 2779) + // Standard Error: 735 + .saturating_add(Weight::from_parts(15_528, 0).saturating_mul(a.into())) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -930,8 +927,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_340_000 picoseconds. - Weight::from_parts(5_710_000, 0) + // Minimum execution time: 5_079_000 picoseconds. + Weight::from_parts(5_360_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::Tempo` (r:1 w:0) @@ -944,8 +941,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `627` // Estimated: `4092` - // Minimum execution time: 21_159_000 picoseconds. - Weight::from_parts(21_711_000, 4092) + // Minimum execution time: 20_669_000 picoseconds. + Weight::from_parts(21_080_000, 4092) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -961,8 +958,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `760` // Estimated: `4225` - // Minimum execution time: 26_819_000 picoseconds. - Weight::from_parts(27_381_000, 4225) + // Minimum execution time: 26_138_000 picoseconds. + Weight::from_parts(26_860_000, 4225) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -978,8 +975,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `760` // Estimated: `4225` - // Minimum execution time: 26_519_000 picoseconds. - Weight::from_parts(27_401_000, 4225) + // Minimum execution time: 26_229_000 picoseconds. + Weight::from_parts(27_030_000, 4225) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -991,8 +988,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `609` // Estimated: `4074` - // Minimum execution time: 16_441_000 picoseconds. - Weight::from_parts(17_213_000, 4074) + // Minimum execution time: 16_230_000 picoseconds. + Weight::from_parts(16_651_000, 4074) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -1008,8 +1005,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `760` // Estimated: `4225` - // Minimum execution time: 26_560_000 picoseconds. - Weight::from_parts(27_391_000, 4225) + // Minimum execution time: 26_099_000 picoseconds. + Weight::from_parts(26_880_000, 4225) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -1025,8 +1022,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `760` // Estimated: `4225` - // Minimum execution time: 26_689_000 picoseconds. - Weight::from_parts(27_392_000, 4225) + // Minimum execution time: 25_938_000 picoseconds. + Weight::from_parts(27_080_000, 4225) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -1042,8 +1039,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `760` // Estimated: `4225` - // Minimum execution time: 26_770_000 picoseconds. - Weight::from_parts(27_561_000, 4225) + // Minimum execution time: 26_138_000 picoseconds. + Weight::from_parts(26_810_000, 4225) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -1061,8 +1058,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `760` // Estimated: `4225` - // Minimum execution time: 28_162_000 picoseconds. - Weight::from_parts(29_204_000, 4225) + // Minimum execution time: 27_681_000 picoseconds. + Weight::from_parts(28_473_000, 4225) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -1078,8 +1075,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `760` // Estimated: `4225` - // Minimum execution time: 25_948_000 picoseconds. - Weight::from_parts(27_382_000, 4225) + // Minimum execution time: 26_128_000 picoseconds. + Weight::from_parts(26_950_000, 4225) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -1091,8 +1088,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `609` // Estimated: `4074` - // Minimum execution time: 15_449_000 picoseconds. - Weight::from_parts(17_012_000, 4074) + // Minimum execution time: 16_290_000 picoseconds. + Weight::from_parts(16_731_000, 4074) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -1108,8 +1105,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `760` // Estimated: `4225` - // Minimum execution time: 26_359_000 picoseconds. - Weight::from_parts(27_441_000, 4225) + // Minimum execution time: 25_968_000 picoseconds. + Weight::from_parts(27_081_000, 4225) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -1127,8 +1124,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `822` // Estimated: `4287` - // Minimum execution time: 28_634_000 picoseconds. - Weight::from_parts(29_545_000, 4287) + // Minimum execution time: 28_343_000 picoseconds. + Weight::from_parts(28_884_000, 4287) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -1144,8 +1141,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `760` // Estimated: `4225` - // Minimum execution time: 22_021_000 picoseconds. - Weight::from_parts(24_115_000, 4225) + // Minimum execution time: 23_384_000 picoseconds. + Weight::from_parts(24_065_000, 4225) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -1157,8 +1154,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `609` // Estimated: `4074` - // Minimum execution time: 15_288_000 picoseconds. - Weight::from_parts(17_032_000, 4074) + // Minimum execution time: 16_260_000 picoseconds. + Weight::from_parts(16_720_000, 4074) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -1178,8 +1175,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `760` // Estimated: `4225` - // Minimum execution time: 27_912_000 picoseconds. - Weight::from_parts(30_777_000, 4225) + // Minimum execution time: 29_034_000 picoseconds. + Weight::from_parts(29_765_000, 4225) .saturating_add(RocksDbWeight::get().reads(5_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -1201,8 +1198,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `795` // Estimated: `4260` - // Minimum execution time: 30_908_000 picoseconds. - Weight::from_parts(33_974_000, 4260) + // Minimum execution time: 32_701_000 picoseconds. + Weight::from_parts(33_111_000, 4260) .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -1218,8 +1215,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `760` // Estimated: `4225` - // Minimum execution time: 24_856_000 picoseconds. - Weight::from_parts(27_331_000, 4225) + // Minimum execution time: 26_199_000 picoseconds. + Weight::from_parts(27_721_000, 4225) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -1235,8 +1232,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `760` // Estimated: `4225` - // Minimum execution time: 26_810_000 picoseconds. - Weight::from_parts(27_291_000, 4225) + // Minimum execution time: 26_039_000 picoseconds. + Weight::from_parts(26_770_000, 4225) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -1252,8 +1249,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `760` // Estimated: `4225` - // Minimum execution time: 24_686_000 picoseconds. - Weight::from_parts(26_189_000, 4225) + // Minimum execution time: 26_189_000 picoseconds. + Weight::from_parts(26_800_000, 4225) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -1271,8 +1268,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `787` // Estimated: `4252` - // Minimum execution time: 27_231_000 picoseconds. - Weight::from_parts(30_688_000, 4252) + // Minimum execution time: 28_603_000 picoseconds. + Weight::from_parts(29_856_000, 4252) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -1290,8 +1287,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `762` // Estimated: `4227` - // Minimum execution time: 29_936_000 picoseconds. - Weight::from_parts(30_777_000, 4227) + // Minimum execution time: 29_164_000 picoseconds. + Weight::from_parts(29_996_000, 4227) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -1301,8 +1298,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_823_000 picoseconds. - Weight::from_parts(7_163_000, 0) + // Minimum execution time: 6_232_000 picoseconds. + Weight::from_parts(6_623_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::Tempo` (r:1 w:1) @@ -1315,8 +1312,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `760` // Estimated: `4225` - // Minimum execution time: 26_500_000 picoseconds. - Weight::from_parts(27_261_000, 4225) + // Minimum execution time: 25_677_000 picoseconds. + Weight::from_parts(26_550_000, 4225) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -1332,8 +1329,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `760` // Estimated: `4225` - // Minimum execution time: 27_140_000 picoseconds. - Weight::from_parts(27_842_000, 4225) + // Minimum execution time: 26_539_000 picoseconds. + Weight::from_parts(27_251_000, 4225) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -1349,8 +1346,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `760` // Estimated: `4225` - // Minimum execution time: 26_379_000 picoseconds. - Weight::from_parts(27_342_000, 4225) + // Minimum execution time: 26_239_000 picoseconds. + Weight::from_parts(27_051_000, 4225) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -1360,8 +1357,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_671_000 picoseconds. - Weight::from_parts(6_031_000, 0) + // Minimum execution time: 5_561_000 picoseconds. + Weight::from_parts(5_841_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::TxRateLimit` (r:0 w:1) @@ -1370,19 +1367,16 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_230_000 picoseconds. - Weight::from_parts(5_590_000, 0) + // Minimum execution time: 5_079_000 picoseconds. + Weight::from_parts(5_400_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } - /// Storage: `SubtensorModule::TotalIssuance` (r:0 w:1) - /// Proof: `SubtensorModule::TotalIssuance` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn sudo_set_total_issuance() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_318_000 picoseconds. - Weight::from_parts(5_318_000, 0) - .saturating_add(RocksDbWeight::get().writes(0_u64)) + // Minimum execution time: 5_490_000 picoseconds. + Weight::from_parts(5_821_000, 0) } /// Storage: `SubtensorModule::NetworksAdded` (r:1 w:0) /// Proof: `SubtensorModule::NetworksAdded` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -1392,8 +1386,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `609` // Estimated: `4074` - // Minimum execution time: 16_431_000 picoseconds. - Weight::from_parts(17_062_000, 4074) + // Minimum execution time: 16_221_000 picoseconds. + Weight::from_parts(16_682_000, 4074) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -1403,8 +1397,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_500_000 picoseconds. - Weight::from_parts(5_761_000, 0) + // Minimum execution time: 5_100_000 picoseconds. + Weight::from_parts(5_390_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::NominatorMinRequiredStake` (r:1 w:1) @@ -1419,8 +1413,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `912` // Estimated: `6852` - // Minimum execution time: 28_793_000 picoseconds. - Weight::from_parts(29_446_000, 6852) + // Minimum execution time: 27_832_000 picoseconds. + Weight::from_parts(28_914_000, 6852) .saturating_add(RocksDbWeight::get().reads(5_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -1430,8 +1424,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_430_000 picoseconds. - Weight::from_parts(5_690_000, 0) + // Minimum execution time: 5_209_000 picoseconds. + Weight::from_parts(5_380_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::MinDelegateTake` (r:0 w:1) @@ -1440,8 +1434,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_430_000 picoseconds. - Weight::from_parts(5_631_000, 0) + // Minimum execution time: 5_050_000 picoseconds. + Weight::from_parts(5_250_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::Tempo` (r:1 w:0) @@ -1454,8 +1448,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `657` // Estimated: `4122` - // Minimum execution time: 18_134_000 picoseconds. - Weight::from_parts(18_766_000, 4122) + // Minimum execution time: 17_803_000 picoseconds. + Weight::from_parts(18_214_000, 4122) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -1471,8 +1465,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `804` // Estimated: `4269` - // Minimum execution time: 26_770_000 picoseconds. - Weight::from_parts(27_562_000, 4269) + // Minimum execution time: 25_728_000 picoseconds. + Weight::from_parts(26_329_000, 4269) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -1482,8 +1476,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_350_000 picoseconds. - Weight::from_parts(5_761_000, 0) + // Minimum execution time: 5_179_000 picoseconds. + Weight::from_parts(5_450_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::ColdkeySwapReannouncementDelay` (r:0 w:1) @@ -1492,8 +1486,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_330_000 picoseconds. - Weight::from_parts(5_750_000, 0) + // Minimum execution time: 5_089_000 picoseconds. + Weight::from_parts(5_380_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::DissolveNetworkScheduleDuration` (r:0 w:1) @@ -1502,8 +1496,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_421_000 picoseconds. - Weight::from_parts(5_791_000, 0) + // Minimum execution time: 5_150_000 picoseconds. + Weight::from_parts(5_390_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::Tempo` (r:1 w:0) @@ -1516,8 +1510,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `657` // Estimated: `4122` - // Minimum execution time: 20_879_000 picoseconds. - Weight::from_parts(21_460_000, 4122) + // Minimum execution time: 20_188_000 picoseconds. + Weight::from_parts(20_749_000, 4122) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -1527,8 +1521,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `42` // Estimated: `3507` - // Minimum execution time: 6_201_000 picoseconds. - Weight::from_parts(6_542_000, 3507) + // Minimum execution time: 5_861_000 picoseconds. + Weight::from_parts(6_101_000, 3507) .saturating_add(RocksDbWeight::get().reads(1_u64)) } /// Storage: `SubtensorModule::SubnetMovingAlpha` (r:0 w:1) @@ -1537,8 +1531,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_795_000 picoseconds. - Weight::from_parts(3_036_000, 0) + // Minimum execution time: 2_715_000 picoseconds. + Weight::from_parts(2_986_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::EMAPriceHalvingBlocks` (r:0 w:1) @@ -1547,8 +1541,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_857_000 picoseconds. - Weight::from_parts(4_238_000, 0) + // Minimum execution time: 3_778_000 picoseconds. + Weight::from_parts(3_957_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::Tempo` (r:1 w:0) @@ -1563,8 +1557,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `760` // Estimated: `4225` - // Minimum execution time: 23_674_000 picoseconds. - Weight::from_parts(24_256_000, 4225) + // Minimum execution time: 23_174_000 picoseconds. + Weight::from_parts(23_573_000, 4225) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -1578,8 +1572,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `657` // Estimated: `4122` - // Minimum execution time: 21_120_000 picoseconds. - Weight::from_parts(21_711_000, 4122) + // Minimum execution time: 20_408_000 picoseconds. + Weight::from_parts(21_109_000, 4122) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -1593,8 +1587,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `657` // Estimated: `4122` - // Minimum execution time: 22_642_000 picoseconds. - Weight::from_parts(23_324_000, 4122) + // Minimum execution time: 22_151_000 picoseconds. + Weight::from_parts(22_832_000, 4122) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -1608,8 +1602,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `702` // Estimated: `4167` - // Minimum execution time: 22_252_000 picoseconds. - Weight::from_parts(22_733_000, 4167) + // Minimum execution time: 24_275_000 picoseconds. + Weight::from_parts(25_357_000, 4167) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -1623,8 +1617,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `657` // Estimated: `4122` - // Minimum execution time: 17_633_000 picoseconds. - Weight::from_parts(18_094_000, 4122) + // Minimum execution time: 17_232_000 picoseconds. + Weight::from_parts(17_733_000, 4122) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -1634,8 +1628,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_300_000 picoseconds. - Weight::from_parts(5_690_000, 0) + // Minimum execution time: 5_100_000 picoseconds. + Weight::from_parts(5_359_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::OwnerHyperparamRateLimit` (r:0 w:1) @@ -1644,8 +1638,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_070_000 picoseconds. - Weight::from_parts(5_570_000, 0) + // Minimum execution time: 5_039_000 picoseconds. + Weight::from_parts(5_329_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::Tempo` (r:1 w:0) @@ -1658,8 +1652,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `657` // Estimated: `4122` - // Minimum execution time: 16_751_000 picoseconds. - Weight::from_parts(18_124_000, 4122) + // Minimum execution time: 17_223_000 picoseconds. + Weight::from_parts(17_563_000, 4122) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -1679,8 +1673,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `760` // Estimated: `4225` - // Minimum execution time: 26_660_000 picoseconds. - Weight::from_parts(28_844_000, 4225) + // Minimum execution time: 27_562_000 picoseconds. + Weight::from_parts(28_143_000, 4225) .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -1690,8 +1684,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_132_000 picoseconds. - Weight::from_parts(7_053_000, 0) + // Minimum execution time: 6_442_000 picoseconds. + Weight::from_parts(6_743_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } } diff --git a/pallets/proxy/src/weights.rs b/pallets/proxy/src/weights.rs index 47a25c45f5..9a77f295d5 100644 --- a/pallets/proxy/src/weights.rs +++ b/pallets/proxy/src/weights.rs @@ -2,7 +2,7 @@ //! Autogenerated weights for `pallet_subtensor_proxy` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 49.1.0 -//! DATE: 2026-04-23, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2026-05-05, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runnervmeorf1`, CPU: `AMD EPYC 7763 64-Core Processor` //! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: `1024` @@ -22,7 +22,7 @@ // --no-storage-info // --no-min-squares // --no-median-slopes -// --output=/tmp/tmp.08ToYZtPAe +// --output=/tmp/tmp.82vZH0CZp4 // --template=/home/runner/work/subtensor/subtensor/.maintain/frame-weight-template.hbs #![cfg_attr(rustfmt, rustfmt_skip)] @@ -66,10 +66,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `637 + p * (37 ±0)` // Estimated: `4254 + p * (37 ±0)` - // Minimum execution time: 26_560_000 picoseconds. - Weight::from_parts(27_869_569, 4254) - // Standard Error: 3_626 - .saturating_add(Weight::from_parts(70_793, 0).saturating_mul(p.into())) + // Minimum execution time: 25_617_000 picoseconds. + Weight::from_parts(27_199_405, 4254) + // Standard Error: 3_009 + .saturating_add(Weight::from_parts(77_762, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) .saturating_add(Weight::from_parts(0, 37).saturating_mul(p.into())) @@ -92,12 +92,12 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `894 + a * (68 ±0) + p * (37 ±0)` // Estimated: `8615 + a * (68 ±0) + p * (37 ±0)` - // Minimum execution time: 51_907_000 picoseconds. - Weight::from_parts(52_690_790, 8615) - // Standard Error: 2_165 - .saturating_add(Weight::from_parts(218_079, 0).saturating_mul(a.into())) - // Standard Error: 8_673 - .saturating_add(Weight::from_parts(46_409, 0).saturating_mul(p.into())) + // Minimum execution time: 51_155_000 picoseconds. + Weight::from_parts(52_408_814, 8615) + // Standard Error: 2_970 + .saturating_add(Weight::from_parts(215_269, 0).saturating_mul(a.into())) + // Standard Error: 11_899 + .saturating_add(Weight::from_parts(21_441, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 68).saturating_mul(a.into())) @@ -109,16 +109,14 @@ impl WeightInfo for SubstrateWeight { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(104), added: 2579, mode: `MaxEncodedLen`) /// The range of component `a` is `[0, 74]`. /// The range of component `p` is `[1, 19]`. - fn remove_announcement(a: u32, p: u32, ) -> Weight { + fn remove_announcement(a: u32, _p: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `299 + a * (68 ±0)` // Estimated: `8615` - // Minimum execution time: 25_337_000 picoseconds. - Weight::from_parts(25_516_899, 8615) - // Standard Error: 1_227 - .saturating_add(Weight::from_parts(192_126, 0).saturating_mul(a.into())) - // Standard Error: 4_914 - .saturating_add(Weight::from_parts(27_993, 0).saturating_mul(p.into())) + // Minimum execution time: 24_867_000 picoseconds. + Weight::from_parts(25_600_641, 8615) + // Standard Error: 1_459 + .saturating_add(Weight::from_parts(196_508, 0).saturating_mul(a.into())) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -132,12 +130,12 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `299 + a * (68 ±0)` // Estimated: `8615` - // Minimum execution time: 25_608_000 picoseconds. - Weight::from_parts(25_592_264, 8615) - // Standard Error: 1_278 - .saturating_add(Weight::from_parts(194_773, 0).saturating_mul(a.into())) - // Standard Error: 5_118 - .saturating_add(Weight::from_parts(27_733, 0).saturating_mul(p.into())) + // Minimum execution time: 24_356_000 picoseconds. + Weight::from_parts(25_191_655, 8615) + // Standard Error: 1_211 + .saturating_add(Weight::from_parts(193_770, 0).saturating_mul(a.into())) + // Standard Error: 4_853 + .saturating_add(Weight::from_parts(16_300, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -153,12 +151,12 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `308 + a * (68 ±0) + p * (37 ±0)` // Estimated: `8615` - // Minimum execution time: 32_841_000 picoseconds. - Weight::from_parts(33_193_276, 8615) - // Standard Error: 1_207 - .saturating_add(Weight::from_parts(192_805, 0).saturating_mul(a.into())) - // Standard Error: 4_837 - .saturating_add(Weight::from_parts(51_762, 0).saturating_mul(p.into())) + // Minimum execution time: 32_240_000 picoseconds. + Weight::from_parts(32_458_721, 8615) + // Standard Error: 1_179 + .saturating_add(Weight::from_parts(187_272, 0).saturating_mul(a.into())) + // Standard Error: 4_726 + .saturating_add(Weight::from_parts(72_740, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -169,10 +167,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `119 + p * (37 ±0)` // Estimated: `4254` - // Minimum execution time: 24_095_000 picoseconds. - Weight::from_parts(25_053_001, 4254) - // Standard Error: 2_305 - .saturating_add(Weight::from_parts(75_973, 0).saturating_mul(p.into())) + // Minimum execution time: 23_664_000 picoseconds. + Weight::from_parts(24_638_329, 4254) + // Standard Error: 2_504 + .saturating_add(Weight::from_parts(73_295, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -185,10 +183,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `119 + p * (37 ±0)` // Estimated: `4254` - // Minimum execution time: 25_798_000 picoseconds. - Weight::from_parts(27_240_177, 4254) - // Standard Error: 2_932 - .saturating_add(Weight::from_parts(72_608, 0).saturating_mul(p.into())) + // Minimum execution time: 24_927_000 picoseconds. + Weight::from_parts(26_544_716, 4254) + // Standard Error: 3_274 + .saturating_add(Weight::from_parts(63_032, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -199,10 +197,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `119 + p * (37 ±0)` // Estimated: `4254` - // Minimum execution time: 26_068_000 picoseconds. - Weight::from_parts(27_127_469, 4254) - // Standard Error: 2_928 - .saturating_add(Weight::from_parts(48_389, 0).saturating_mul(p.into())) + // Minimum execution time: 23_684_000 picoseconds. + Weight::from_parts(26_246_479, 4254) + // Standard Error: 2_886 + .saturating_add(Weight::from_parts(54_076, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -213,10 +211,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `139` // Estimated: `4254` - // Minimum execution time: 26_259_000 picoseconds. - Weight::from_parts(27_221_067, 4254) - // Standard Error: 3_076 - .saturating_add(Weight::from_parts(39_552, 0).saturating_mul(p.into())) + // Minimum execution time: 23_774_000 picoseconds. + Weight::from_parts(26_377_420, 4254) + // Standard Error: 2_548 + .saturating_add(Weight::from_parts(25_111, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -227,10 +225,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `156 + p * (37 ±0)` // Estimated: `4254` - // Minimum execution time: 25_227_000 picoseconds. - Weight::from_parts(26_491_429, 4254) - // Standard Error: 2_471 - .saturating_add(Weight::from_parts(38_289, 0).saturating_mul(p.into())) + // Minimum execution time: 22_622_000 picoseconds. + Weight::from_parts(25_101_322, 4254) + // Standard Error: 6_825 + .saturating_add(Weight::from_parts(32_496, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -244,8 +242,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `412` // Estimated: `8615` - // Minimum execution time: 45_114_000 picoseconds. - Weight::from_parts(45_896_000, 8615) + // Minimum execution time: 40_085_000 picoseconds. + Weight::from_parts(43_971_000, 8615) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -254,14 +252,12 @@ impl WeightInfo for SubstrateWeight { /// Storage: `Proxy::RealPaysFee` (r:0 w:1) /// Proof: `Proxy::RealPaysFee` (`max_values`: None, `max_size`: Some(80), added: 2555, mode: `MaxEncodedLen`) /// The range of component `p` is `[1, 19]`. - fn set_real_pays_fee(p: u32, ) -> Weight { + fn set_real_pays_fee(_p: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `119 + p * (37 ±0)` // Estimated: `4254` - // Minimum execution time: 13_736_000 picoseconds. - Weight::from_parts(14_464_226, 4254) - // Standard Error: 1_660 - .saturating_add(Weight::from_parts(40_246, 0).saturating_mul(p.into())) + // Minimum execution time: 12_493_000 picoseconds. + Weight::from_parts(14_370_196, 4254) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -282,10 +278,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `637 + p * (37 ±0)` // Estimated: `4254 + p * (37 ±0)` - // Minimum execution time: 26_560_000 picoseconds. - Weight::from_parts(27_869_569, 4254) - // Standard Error: 3_626 - .saturating_add(Weight::from_parts(70_793, 0).saturating_mul(p.into())) + // Minimum execution time: 25_617_000 picoseconds. + Weight::from_parts(27_199_405, 4254) + // Standard Error: 3_009 + .saturating_add(Weight::from_parts(77_762, 0).saturating_mul(p.into())) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) .saturating_add(Weight::from_parts(0, 37).saturating_mul(p.into())) @@ -308,12 +304,12 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `894 + a * (68 ±0) + p * (37 ±0)` // Estimated: `8615 + a * (68 ±0) + p * (37 ±0)` - // Minimum execution time: 51_907_000 picoseconds. - Weight::from_parts(52_690_790, 8615) - // Standard Error: 2_165 - .saturating_add(Weight::from_parts(218_079, 0).saturating_mul(a.into())) - // Standard Error: 8_673 - .saturating_add(Weight::from_parts(46_409, 0).saturating_mul(p.into())) + // Minimum execution time: 51_155_000 picoseconds. + Weight::from_parts(52_408_814, 8615) + // Standard Error: 2_970 + .saturating_add(Weight::from_parts(215_269, 0).saturating_mul(a.into())) + // Standard Error: 11_899 + .saturating_add(Weight::from_parts(21_441, 0).saturating_mul(p.into())) .saturating_add(RocksDbWeight::get().reads(5_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 68).saturating_mul(a.into())) @@ -325,16 +321,14 @@ impl WeightInfo for () { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(104), added: 2579, mode: `MaxEncodedLen`) /// The range of component `a` is `[0, 74]`. /// The range of component `p` is `[1, 19]`. - fn remove_announcement(a: u32, p: u32, ) -> Weight { + fn remove_announcement(a: u32, _p: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `299 + a * (68 ±0)` // Estimated: `8615` - // Minimum execution time: 25_337_000 picoseconds. - Weight::from_parts(25_516_899, 8615) - // Standard Error: 1_227 - .saturating_add(Weight::from_parts(192_126, 0).saturating_mul(a.into())) - // Standard Error: 4_914 - .saturating_add(Weight::from_parts(27_993, 0).saturating_mul(p.into())) + // Minimum execution time: 24_867_000 picoseconds. + Weight::from_parts(25_600_641, 8615) + // Standard Error: 1_459 + .saturating_add(Weight::from_parts(196_508, 0).saturating_mul(a.into())) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -348,12 +342,12 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `299 + a * (68 ±0)` // Estimated: `8615` - // Minimum execution time: 25_608_000 picoseconds. - Weight::from_parts(25_592_264, 8615) - // Standard Error: 1_278 - .saturating_add(Weight::from_parts(194_773, 0).saturating_mul(a.into())) - // Standard Error: 5_118 - .saturating_add(Weight::from_parts(27_733, 0).saturating_mul(p.into())) + // Minimum execution time: 24_356_000 picoseconds. + Weight::from_parts(25_191_655, 8615) + // Standard Error: 1_211 + .saturating_add(Weight::from_parts(193_770, 0).saturating_mul(a.into())) + // Standard Error: 4_853 + .saturating_add(Weight::from_parts(16_300, 0).saturating_mul(p.into())) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -369,12 +363,12 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `308 + a * (68 ±0) + p * (37 ±0)` // Estimated: `8615` - // Minimum execution time: 32_841_000 picoseconds. - Weight::from_parts(33_193_276, 8615) - // Standard Error: 1_207 - .saturating_add(Weight::from_parts(192_805, 0).saturating_mul(a.into())) - // Standard Error: 4_837 - .saturating_add(Weight::from_parts(51_762, 0).saturating_mul(p.into())) + // Minimum execution time: 32_240_000 picoseconds. + Weight::from_parts(32_458_721, 8615) + // Standard Error: 1_179 + .saturating_add(Weight::from_parts(187_272, 0).saturating_mul(a.into())) + // Standard Error: 4_726 + .saturating_add(Weight::from_parts(72_740, 0).saturating_mul(p.into())) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -385,10 +379,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `119 + p * (37 ±0)` // Estimated: `4254` - // Minimum execution time: 24_095_000 picoseconds. - Weight::from_parts(25_053_001, 4254) - // Standard Error: 2_305 - .saturating_add(Weight::from_parts(75_973, 0).saturating_mul(p.into())) + // Minimum execution time: 23_664_000 picoseconds. + Weight::from_parts(24_638_329, 4254) + // Standard Error: 2_504 + .saturating_add(Weight::from_parts(73_295, 0).saturating_mul(p.into())) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -401,10 +395,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `119 + p * (37 ±0)` // Estimated: `4254` - // Minimum execution time: 25_798_000 picoseconds. - Weight::from_parts(27_240_177, 4254) - // Standard Error: 2_932 - .saturating_add(Weight::from_parts(72_608, 0).saturating_mul(p.into())) + // Minimum execution time: 24_927_000 picoseconds. + Weight::from_parts(26_544_716, 4254) + // Standard Error: 3_274 + .saturating_add(Weight::from_parts(63_032, 0).saturating_mul(p.into())) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -415,10 +409,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `119 + p * (37 ±0)` // Estimated: `4254` - // Minimum execution time: 26_068_000 picoseconds. - Weight::from_parts(27_127_469, 4254) - // Standard Error: 2_928 - .saturating_add(Weight::from_parts(48_389, 0).saturating_mul(p.into())) + // Minimum execution time: 23_684_000 picoseconds. + Weight::from_parts(26_246_479, 4254) + // Standard Error: 2_886 + .saturating_add(Weight::from_parts(54_076, 0).saturating_mul(p.into())) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -429,10 +423,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `139` // Estimated: `4254` - // Minimum execution time: 26_259_000 picoseconds. - Weight::from_parts(27_221_067, 4254) - // Standard Error: 3_076 - .saturating_add(Weight::from_parts(39_552, 0).saturating_mul(p.into())) + // Minimum execution time: 23_774_000 picoseconds. + Weight::from_parts(26_377_420, 4254) + // Standard Error: 2_548 + .saturating_add(Weight::from_parts(25_111, 0).saturating_mul(p.into())) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -443,10 +437,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `156 + p * (37 ±0)` // Estimated: `4254` - // Minimum execution time: 25_227_000 picoseconds. - Weight::from_parts(26_491_429, 4254) - // Standard Error: 2_471 - .saturating_add(Weight::from_parts(38_289, 0).saturating_mul(p.into())) + // Minimum execution time: 22_622_000 picoseconds. + Weight::from_parts(25_101_322, 4254) + // Standard Error: 6_825 + .saturating_add(Weight::from_parts(32_496, 0).saturating_mul(p.into())) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -460,8 +454,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `412` // Estimated: `8615` - // Minimum execution time: 45_114_000 picoseconds. - Weight::from_parts(45_896_000, 8615) + // Minimum execution time: 40_085_000 picoseconds. + Weight::from_parts(43_971_000, 8615) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -470,14 +464,12 @@ impl WeightInfo for () { /// Storage: `Proxy::RealPaysFee` (r:0 w:1) /// Proof: `Proxy::RealPaysFee` (`max_values`: None, `max_size`: Some(80), added: 2555, mode: `MaxEncodedLen`) /// The range of component `p` is `[1, 19]`. - fn set_real_pays_fee(p: u32, ) -> Weight { + fn set_real_pays_fee(_p: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `119 + p * (37 ±0)` // Estimated: `4254` - // Minimum execution time: 13_736_000 picoseconds. - Weight::from_parts(14_464_226, 4254) - // Standard Error: 1_660 - .saturating_add(Weight::from_parts(40_246, 0).saturating_mul(p.into())) + // Minimum execution time: 12_493_000 picoseconds. + Weight::from_parts(14_370_196, 4254) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } diff --git a/pallets/subtensor/src/weights.rs b/pallets/subtensor/src/weights.rs index f06c9fc825..a32119e4e3 100644 --- a/pallets/subtensor/src/weights.rs +++ b/pallets/subtensor/src/weights.rs @@ -2,7 +2,7 @@ //! Autogenerated weights for `pallet_subtensor` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 49.1.0 -//! DATE: 2026-04-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2026-05-05, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runnervmeorf1`, CPU: `AMD EPYC 7763 64-Core Processor` //! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: `1024` @@ -22,7 +22,7 @@ // --no-storage-info // --no-min-squares // --no-median-slopes -// --output=/tmp/tmp.VTK2WpuoML +// --output=/tmp/tmp.d0xEndgICP // --template=/home/runner/work/subtensor/subtensor/.maintain/frame-weight-template.hbs #![cfg_attr(rustfmt, rustfmt_skip)] @@ -106,7 +106,7 @@ impl WeightInfo for SubstrateWeight { /// Proof: `SubtensorModule::Uids` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::Burn` (r:1 w:1) /// Proof: `SubtensorModule::Burn` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `System::Account` (r:1 w:1) + /// Storage: `System::Account` (r:2 w:2) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(104), added: 2579, mode: `MaxEncodedLen`) /// Storage: `SubtensorModule::Owner` (r:1 w:1) /// Proof: `SubtensorModule::Owner` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -192,10 +192,10 @@ impl WeightInfo for SubstrateWeight { /// Proof: `Swap::CurrentTick` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`) fn register() -> Weight { // Proof Size summary in bytes: - // Measured: `1629` + // Measured: `1706` // Estimated: `13600` - // Minimum execution time: 348_900_000 picoseconds. - Weight::from_parts(371_883_000, 13600) + // Minimum execution time: 358_568_000 picoseconds. + Weight::from_parts(378_786_000, 13600) .saturating_add(T::DbWeight::get().reads(47_u64)) .saturating_add(T::DbWeight::get().writes(39_u64)) } @@ -237,15 +237,15 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `188782` // Estimated: `10327372` - // Minimum execution time: 15_197_206_000 picoseconds. - Weight::from_parts(15_388_724_000, 10327372) + // Minimum execution time: 14_891_250_000 picoseconds. + Weight::from_parts(15_158_539_000, 10327372) .saturating_add(T::DbWeight::get().reads(4112_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } - /// Storage: `SubtensorModule::SubtokenEnabled` (r:1 w:0) - /// Proof: `SubtensorModule::SubtokenEnabled` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::NetworksAdded` (r:1 w:0) /// Proof: `SubtensorModule::NetworksAdded` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::SubtokenEnabled` (r:1 w:0) + /// Proof: `SubtensorModule::SubtokenEnabled` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::SubnetMechanism` (r:1 w:0) /// Proof: `SubtensorModule::SubnetMechanism` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::SubnetAlphaIn` (r:1 w:1) @@ -264,7 +264,7 @@ impl WeightInfo for SubstrateWeight { /// Proof: `Swap::FeeRate` (`max_values`: None, `max_size`: Some(12), added: 2487, mode: `MaxEncodedLen`) /// Storage: `Swap::CurrentLiquidity` (r:1 w:0) /// Proof: `Swap::CurrentLiquidity` (`max_values`: None, `max_size`: Some(18), added: 2493, mode: `MaxEncodedLen`) - /// Storage: `System::Account` (r:1 w:1) + /// Storage: `System::Account` (r:3 w:3) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(104), added: 2579, mode: `MaxEncodedLen`) /// Storage: `SubtensorModule::Owner` (r:1 w:0) /// Proof: `SubtensorModule::Owner` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -288,22 +288,28 @@ impl WeightInfo for SubstrateWeight { /// Proof: `SubtensorModule::Alpha` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::AlphaV2` (r:1 w:1) /// Proof: `SubtensorModule::AlphaV2` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `SubtensorModule::TotalIssuance` (r:1 w:1) - /// Proof: `SubtensorModule::TotalIssuance` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::SubnetTaoFlow` (r:1 w:1) /// Proof: `SubtensorModule::SubnetTaoFlow` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::Lock` (r:2 w:1) + /// Proof: `SubtensorModule::Lock` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::MaturityRate` (r:1 w:0) + /// Proof: `SubtensorModule::MaturityRate` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::UnlockRate` (r:1 w:0) + /// Proof: `SubtensorModule::UnlockRate` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::HotkeyLock` (r:1 w:1) + /// Proof: `SubtensorModule::HotkeyLock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::StakingOperationRateLimiter` (r:0 w:1) /// Proof: `SubtensorModule::StakingOperationRateLimiter` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::LastColdkeyHotkeyStakeBlock` (r:0 w:1) /// Proof: `SubtensorModule::LastColdkeyHotkeyStakeBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) fn add_stake() -> Weight { // Proof Size summary in bytes: - // Measured: `2307` - // Estimated: `8556` - // Minimum execution time: 332_138_000 picoseconds. - Weight::from_parts(340_254_000, 8556) - .saturating_add(T::DbWeight::get().reads(28_u64)) - .saturating_add(T::DbWeight::get().writes(16_u64)) + // Measured: `2560` + // Estimated: `8727` + // Minimum execution time: 437_405_000 picoseconds. + Weight::from_parts(442_415_000, 8727) + .saturating_add(T::DbWeight::get().reads(33_u64)) + .saturating_add(T::DbWeight::get().writes(18_u64)) } /// Storage: `SubtensorModule::IsNetworkMember` (r:2 w:0) /// Proof: `SubtensorModule::IsNetworkMember` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -315,8 +321,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `791` // Estimated: `6731` - // Minimum execution time: 34_624_000 picoseconds. - Weight::from_parts(35_666_000, 6731) + // Minimum execution time: 34_064_000 picoseconds. + Weight::from_parts(34_645_000, 6731) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -330,8 +336,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `764` // Estimated: `6704` - // Minimum execution time: 30_797_000 picoseconds. - Weight::from_parts(31_860_000, 6704) + // Minimum execution time: 30_276_000 picoseconds. + Weight::from_parts(31_338_000, 6704) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -343,7 +349,7 @@ impl WeightInfo for SubstrateWeight { /// Proof: `SubtensorModule::Uids` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::Burn` (r:1 w:1) /// Proof: `SubtensorModule::Burn` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `System::Account` (r:1 w:1) + /// Storage: `System::Account` (r:2 w:2) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(104), added: 2579, mode: `MaxEncodedLen`) /// Storage: `SubtensorModule::Owner` (r:1 w:1) /// Proof: `SubtensorModule::Owner` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -431,8 +437,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1639` // Estimated: `13600` - // Minimum execution time: 341_517_000 picoseconds. - Weight::from_parts(343_359_000, 13600) + // Minimum execution time: 369_369_000 picoseconds. + Weight::from_parts(374_207_000, 13600) .saturating_add(T::DbWeight::get().reads(47_u64)) .saturating_add(T::DbWeight::get().writes(39_u64)) } @@ -484,8 +490,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1415` // Estimated: `4880` - // Minimum execution time: 102_561_000 picoseconds. - Weight::from_parts(104_435_000, 4880) + // Minimum execution time: 100_538_000 picoseconds. + Weight::from_parts(102_030_000, 4880) .saturating_add(T::DbWeight::get().reads(19_u64)) .saturating_add(T::DbWeight::get().writes(16_u64)) } @@ -511,7 +517,7 @@ impl WeightInfo for SubstrateWeight { /// Proof: `SubtensorModule::TotalIssuance` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::BlockEmission` (r:1 w:0) /// Proof: `SubtensorModule::BlockEmission` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `System::Account` (r:1 w:1) + /// Storage: `System::Account` (r:2 w:2) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(104), added: 2579, mode: `MaxEncodedLen`) /// Storage: `SubtensorModule::SubnetMechanism` (r:1 w:1) /// Proof: `SubtensorModule::SubnetMechanism` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -565,8 +571,6 @@ impl WeightInfo for SubstrateWeight { /// Proof: `SubtensorModule::Keys` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::Burn` (r:0 w:1) /// Proof: `SubtensorModule::Burn` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `SubtensorModule::RAORecycledForRegistration` (r:0 w:1) - /// Proof: `SubtensorModule::RAORecycledForRegistration` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::SubnetLocked` (r:0 w:1) /// Proof: `SubtensorModule::SubnetLocked` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::NetworkRegisteredAt` (r:0 w:1) @@ -605,8 +609,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1459` // Estimated: `9874` - // Minimum execution time: 253_543_000 picoseconds. - Weight::from_parts(259_162_000, 9874) + // Minimum execution time: 266_317_000 picoseconds. + Weight::from_parts(269_883_000, 9874) .saturating_add(T::DbWeight::get().reads(42_u64)) .saturating_add(T::DbWeight::get().writes(47_u64)) } @@ -634,8 +638,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1061` // Estimated: `4526` - // Minimum execution time: 61_785_000 picoseconds. - Weight::from_parts(62_667_000, 4526) + // Minimum execution time: 60_743_000 picoseconds. + Weight::from_parts(61_915_000, 4526) .saturating_add(T::DbWeight::get().reads(10_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -679,8 +683,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1579` // Estimated: `7519` - // Minimum execution time: 109_063_000 picoseconds. - Weight::from_parts(110_616_000, 7519) + // Minimum execution time: 107_070_000 picoseconds. + Weight::from_parts(108_663_000, 7519) .saturating_add(T::DbWeight::get().reads(18_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -690,8 +694,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_340_000 picoseconds. - Weight::from_parts(5_541_000, 0) + // Minimum execution time: 5_330_000 picoseconds. + Weight::from_parts(5_640_000, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::Owner` (r:1 w:0) @@ -708,8 +712,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `938` // Estimated: `4403` - // Minimum execution time: 47_128_000 picoseconds. - Weight::from_parts(47_769_000, 4403) + // Minimum execution time: 46_457_000 picoseconds. + Weight::from_parts(47_509_000, 4403) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -725,8 +729,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `694` // Estimated: `4159` - // Minimum execution time: 43_000_000 picoseconds. - Weight::from_parts(43_812_000, 4159) + // Minimum execution time: 45_174_000 picoseconds. + Weight::from_parts(46_146_000, 4159) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -756,16 +760,18 @@ impl WeightInfo for SubstrateWeight { /// Proof: `SubtensorModule::TotalHotkeySharesV2` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::OwnedHotkeys` (r:2 w:2) /// Proof: `SubtensorModule::OwnedHotkeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::Lock` (r:2 w:0) + /// Proof: `SubtensorModule::Lock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `System::Account` (r:2 w:2) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(104), added: 2579, mode: `MaxEncodedLen`) /// Storage: `SubtensorModule::LastRateLimitedBlock` (r:0 w:1) /// Proof: `SubtensorModule::LastRateLimitedBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) fn swap_coldkey_announced() -> Weight { // Proof Size summary in bytes: - // Measured: `1815` - // Estimated: `12705` - // Minimum execution time: 254_054_000 picoseconds. - Weight::from_parts(256_498_000, 12705) + // Measured: `2117` + // Estimated: `13007` + // Minimum execution time: 268_099_000 picoseconds. + Weight::from_parts(270_495_000, 13007) .saturating_add(T::DbWeight::get().reads(33_u64)) .saturating_add(T::DbWeight::get().writes(15_u64)) } @@ -797,6 +803,8 @@ impl WeightInfo for SubstrateWeight { /// Proof: `SubtensorModule::TotalHotkeySharesV2` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::OwnedHotkeys` (r:2 w:2) /// Proof: `SubtensorModule::OwnedHotkeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::Lock` (r:2 w:0) + /// Proof: `SubtensorModule::Lock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::ColdkeySwapAnnouncements` (r:0 w:1) /// Proof: `SubtensorModule::ColdkeySwapAnnouncements` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::ColdkeySwapDisputes` (r:0 w:1) @@ -805,10 +813,10 @@ impl WeightInfo for SubstrateWeight { /// Proof: `SubtensorModule::LastRateLimitedBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) fn swap_coldkey() -> Weight { // Proof Size summary in bytes: - // Measured: `1908` - // Estimated: `12798` - // Minimum execution time: 276_024_000 picoseconds. - Weight::from_parts(279_571_000, 12798) + // Measured: `2210` + // Estimated: `13100` + // Minimum execution time: 291_804_000 picoseconds. + Weight::from_parts(297_384_000, 13100) .saturating_add(T::DbWeight::get().reads(33_u64)) .saturating_add(T::DbWeight::get().writes(19_u64)) } @@ -820,8 +828,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `665` // Estimated: `4130` - // Minimum execution time: 22_051_000 picoseconds. - Weight::from_parts(22_531_000, 4130) + // Minimum execution time: 22_412_000 picoseconds. + Weight::from_parts(22_962_000, 4130) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -833,8 +841,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `613` // Estimated: `4078` - // Minimum execution time: 18_605_000 picoseconds. - Weight::from_parts(19_015_000, 4078) + // Minimum execution time: 18_565_000 picoseconds. + Weight::from_parts(19_176_000, 4078) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -846,8 +854,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 8_426_000 picoseconds. - Weight::from_parts(8_766_000, 0) + // Minimum execution time: 8_336_000 picoseconds. + Weight::from_parts(8_665_000, 0) .saturating_add(T::DbWeight::get().writes(2_u64)) } /// Storage: `SubtensorModule::CommitRevealWeightsEnabled` (r:1 w:0) @@ -890,8 +898,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `2084` // Estimated: `8024` - // Minimum execution time: 411_286_000 picoseconds. - Weight::from_parts(430_662_000, 8024) + // Minimum execution time: 401_519_000 picoseconds. + Weight::from_parts(407_931_000, 8024) .saturating_add(T::DbWeight::get().reads(18_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -913,12 +921,16 @@ impl WeightInfo for SubstrateWeight { /// Proof: `SubtensorModule::TotalHotkeySharesV2` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::SubnetAlphaOut` (r:1 w:1) /// Proof: `SubtensorModule::SubnetAlphaOut` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::StakingHotkeys` (r:1 w:0) + /// Proof: `SubtensorModule::StakingHotkeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::Lock` (r:1 w:0) + /// Proof: `SubtensorModule::Lock` (`max_values`: None, `max_size`: None, mode: `Measured`) fn recycle_alpha() -> Weight { // Proof Size summary in bytes: - // Measured: `1424` - // Estimated: `4889` - // Minimum execution time: 126_435_000 picoseconds. - Weight::from_parts(128_039_000, 4889) + // Measured: `1860` + // Estimated: `5325` + // Minimum execution time: 170_759_000 picoseconds. + Weight::from_parts(172_852_000, 5325) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -940,12 +952,16 @@ impl WeightInfo for SubstrateWeight { /// Proof: `SubtensorModule::TotalHotkeySharesV2` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::SubnetAlphaOut` (r:1 w:0) /// Proof: `SubtensorModule::SubnetAlphaOut` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::StakingHotkeys` (r:1 w:0) + /// Proof: `SubtensorModule::StakingHotkeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::Lock` (r:1 w:0) + /// Proof: `SubtensorModule::Lock` (`max_values`: None, `max_size`: None, mode: `Measured`) fn burn_alpha() -> Weight { // Proof Size summary in bytes: - // Measured: `1424` - // Estimated: `4889` - // Minimum execution time: 126_171_000 picoseconds. - Weight::from_parts(128_965_000, 4889) + // Measured: `1860` + // Estimated: `5325` + // Minimum execution time: 170_008_000 picoseconds. + Weight::from_parts(172_351_000, 5325) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -965,8 +981,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1079` // Estimated: `4544` - // Minimum execution time: 38_992_000 picoseconds. - Weight::from_parts(39_714_000, 4544) + // Minimum execution time: 38_492_000 picoseconds. + Weight::from_parts(39_303_000, 4544) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -992,7 +1008,7 @@ impl WeightInfo for SubstrateWeight { /// Proof: `SubtensorModule::NetworksAdded` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::SubtokenEnabled` (r:1 w:0) /// Proof: `SubtensorModule::SubtokenEnabled` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `System::Account` (r:1 w:1) + /// Storage: `System::Account` (r:3 w:3) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(104), added: 2579, mode: `MaxEncodedLen`) /// Storage: `SubtensorModule::Owner` (r:1 w:0) /// Proof: `SubtensorModule::Owner` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -1016,22 +1032,28 @@ impl WeightInfo for SubstrateWeight { /// Proof: `SubtensorModule::Alpha` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::AlphaV2` (r:1 w:1) /// Proof: `SubtensorModule::AlphaV2` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `SubtensorModule::TotalIssuance` (r:1 w:1) - /// Proof: `SubtensorModule::TotalIssuance` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::SubnetTaoFlow` (r:1 w:1) /// Proof: `SubtensorModule::SubnetTaoFlow` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::Lock` (r:2 w:1) + /// Proof: `SubtensorModule::Lock` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::MaturityRate` (r:1 w:0) + /// Proof: `SubtensorModule::MaturityRate` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::UnlockRate` (r:1 w:0) + /// Proof: `SubtensorModule::UnlockRate` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::HotkeyLock` (r:1 w:1) + /// Proof: `SubtensorModule::HotkeyLock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::StakingOperationRateLimiter` (r:0 w:1) /// Proof: `SubtensorModule::StakingOperationRateLimiter` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::LastColdkeyHotkeyStakeBlock` (r:0 w:1) /// Proof: `SubtensorModule::LastColdkeyHotkeyStakeBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) fn add_stake_limit() -> Weight { // Proof Size summary in bytes: - // Measured: `2307` - // Estimated: `8556` - // Minimum execution time: 367_735_000 picoseconds. - Weight::from_parts(372_424_000, 8556) - .saturating_add(T::DbWeight::get().reads(28_u64)) - .saturating_add(T::DbWeight::get().writes(16_u64)) + // Measured: `2560` + // Estimated: `8727` + // Minimum execution time: 472_802_000 picoseconds. + Weight::from_parts(483_060_000, 8727) + .saturating_add(T::DbWeight::get().reads(33_u64)) + .saturating_add(T::DbWeight::get().writes(18_u64)) } /// Storage: `SubtensorModule::Alpha` (r:2 w:0) /// Proof: `SubtensorModule::Alpha` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -1065,8 +1087,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `2002` // Estimated: `7942` - // Minimum execution time: 215_561_000 picoseconds. - Weight::from_parts(218_267_000, 7942) + // Minimum execution time: 210_262_000 picoseconds. + Weight::from_parts(212_767_000, 7942) .saturating_add(T::DbWeight::get().reads(19_u64)) .saturating_add(T::DbWeight::get().writes(7_u64)) } @@ -1106,6 +1128,10 @@ impl WeightInfo for SubstrateWeight { /// Proof: `Swap::CurrentLiquidity` (`max_values`: None, `max_size`: Some(18), added: 2493, mode: `MaxEncodedLen`) /// Storage: `SubtensorModule::Owner` (r:1 w:0) /// Proof: `SubtensorModule::Owner` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::StakingHotkeys` (r:1 w:0) + /// Proof: `SubtensorModule::StakingHotkeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::Lock` (r:1 w:0) + /// Proof: `SubtensorModule::Lock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::SubnetAlphaIn` (r:1 w:1) /// Proof: `SubtensorModule::SubnetAlphaIn` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::SubnetAlphaOut` (r:1 w:1) @@ -1114,21 +1140,21 @@ impl WeightInfo for SubstrateWeight { /// Proof: `SubtensorModule::TotalStake` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::SubnetVolume` (r:1 w:1) /// Proof: `SubtensorModule::SubnetVolume` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(104), added: 2579, mode: `MaxEncodedLen`) /// Storage: `SubtensorModule::SubnetTaoFlow` (r:1 w:1) /// Proof: `SubtensorModule::SubnetTaoFlow` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `System::Account` (r:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(104), added: 2579, mode: `MaxEncodedLen`) /// Storage: `SubtensorModule::StakeThreshold` (r:1 w:0) /// Proof: `SubtensorModule::StakeThreshold` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::LastColdkeyHotkeyStakeBlock` (r:0 w:1) /// Proof: `SubtensorModule::LastColdkeyHotkeyStakeBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) fn remove_stake() -> Weight { // Proof Size summary in bytes: - // Measured: `2211` - // Estimated: `10626` - // Minimum execution time: 347_237_000 picoseconds. - Weight::from_parts(367_354_000, 10626) - .saturating_add(T::DbWeight::get().reads(32_u64)) + // Measured: `2536` + // Estimated: `10951` + // Minimum execution time: 417_889_000 picoseconds. + Weight::from_parts(439_609_000, 10951) + .saturating_add(T::DbWeight::get().reads(34_u64)) .saturating_add(T::DbWeight::get().writes(14_u64)) } /// Storage: `SubtensorModule::SubnetMechanism` (r:2 w:0) @@ -1165,6 +1191,10 @@ impl WeightInfo for SubstrateWeight { /// Proof: `SubtensorModule::TotalHotkeySharesV2` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::Owner` (r:1 w:0) /// Proof: `SubtensorModule::Owner` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::StakingHotkeys` (r:1 w:0) + /// Proof: `SubtensorModule::StakingHotkeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::Lock` (r:1 w:0) + /// Proof: `SubtensorModule::Lock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::SubnetAlphaIn` (r:1 w:1) /// Proof: `SubtensorModule::SubnetAlphaIn` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::SubnetAlphaOut` (r:1 w:1) @@ -1173,21 +1203,21 @@ impl WeightInfo for SubstrateWeight { /// Proof: `SubtensorModule::TotalStake` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::SubnetVolume` (r:1 w:1) /// Proof: `SubtensorModule::SubnetVolume` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(104), added: 2579, mode: `MaxEncodedLen`) /// Storage: `SubtensorModule::SubnetTaoFlow` (r:1 w:1) /// Proof: `SubtensorModule::SubnetTaoFlow` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `System::Account` (r:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(104), added: 2579, mode: `MaxEncodedLen`) /// Storage: `SubtensorModule::StakeThreshold` (r:1 w:0) /// Proof: `SubtensorModule::StakeThreshold` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::LastColdkeyHotkeyStakeBlock` (r:0 w:1) /// Proof: `SubtensorModule::LastColdkeyHotkeyStakeBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) fn remove_stake_limit() -> Weight { // Proof Size summary in bytes: - // Measured: `2211` - // Estimated: `10626` - // Minimum execution time: 387_646_000 picoseconds. - Weight::from_parts(403_169_000, 10626) - .saturating_add(T::DbWeight::get().reads(31_u64)) + // Measured: `2536` + // Estimated: `10951` + // Minimum execution time: 456_171_000 picoseconds. + Weight::from_parts(462_091_000, 10951) + .saturating_add(T::DbWeight::get().reads(33_u64)) .saturating_add(T::DbWeight::get().writes(14_u64)) } /// Storage: `SubtensorModule::Alpha` (r:2 w:0) @@ -1226,6 +1256,10 @@ impl WeightInfo for SubstrateWeight { /// Proof: `SubtensorModule::SubtokenEnabled` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::Owner` (r:1 w:0) /// Proof: `SubtensorModule::Owner` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::StakingHotkeys` (r:1 w:0) + /// Proof: `SubtensorModule::StakingHotkeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::Lock` (r:3 w:1) + /// Proof: `SubtensorModule::Lock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::SubnetAlphaIn` (r:2 w:2) /// Proof: `SubtensorModule::SubnetAlphaIn` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::SubnetAlphaOut` (r:2 w:2) @@ -1234,22 +1268,26 @@ impl WeightInfo for SubstrateWeight { /// Proof: `SubtensorModule::TotalStake` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::SubnetVolume` (r:2 w:2) /// Proof: `SubtensorModule::SubnetVolume` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `System::Account` (r:3 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(104), added: 2579, mode: `MaxEncodedLen`) /// Storage: `SubtensorModule::SubnetTaoFlow` (r:2 w:2) /// Proof: `SubtensorModule::SubnetTaoFlow` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `SubtensorModule::StakingHotkeys` (r:1 w:0) - /// Proof: `SubtensorModule::StakingHotkeys` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `SubtensorModule::TotalIssuance` (r:1 w:1) - /// Proof: `SubtensorModule::TotalIssuance` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::MaturityRate` (r:1 w:0) + /// Proof: `SubtensorModule::MaturityRate` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::UnlockRate` (r:1 w:0) + /// Proof: `SubtensorModule::UnlockRate` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::HotkeyLock` (r:1 w:1) + /// Proof: `SubtensorModule::HotkeyLock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::LastColdkeyHotkeyStakeBlock` (r:0 w:1) /// Proof: `SubtensorModule::LastColdkeyHotkeyStakeBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) fn swap_stake_limit() -> Weight { // Proof Size summary in bytes: - // Measured: `2494` - // Estimated: `8556` - // Minimum execution time: 461_377_000 picoseconds. - Weight::from_parts(477_951_000, 8556) - .saturating_add(T::DbWeight::get().reads(42_u64)) - .saturating_add(T::DbWeight::get().writes(23_u64)) + // Measured: `2923` + // Estimated: `11338` + // Minimum execution time: 652_947_000 picoseconds. + Weight::from_parts(675_229_000, 11338) + .saturating_add(T::DbWeight::get().reads(48_u64)) + .saturating_add(T::DbWeight::get().writes(25_u64)) } /// Storage: `SubtensorModule::Alpha` (r:2 w:0) /// Proof: `SubtensorModule::Alpha` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -1271,8 +1309,10 @@ impl WeightInfo for SubstrateWeight { /// Proof: `SubtensorModule::Owner` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::TransferToggle` (r:1 w:0) /// Proof: `SubtensorModule::TransferToggle` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `SubtensorModule::StakingHotkeys` (r:1 w:1) + /// Storage: `SubtensorModule::StakingHotkeys` (r:2 w:1) /// Proof: `SubtensorModule::StakingHotkeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::Lock` (r:1 w:0) + /// Proof: `SubtensorModule::Lock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::SubnetMechanism` (r:1 w:0) /// Proof: `SubtensorModule::SubnetMechanism` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `Swap::SwapV3Initialized` (r:1 w:0) @@ -1283,10 +1323,10 @@ impl WeightInfo for SubstrateWeight { /// Proof: `SubtensorModule::LastColdkeyHotkeyStakeBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) fn transfer_stake() -> Weight { // Proof Size summary in bytes: - // Measured: `1829` - // Estimated: `7769` - // Minimum execution time: 209_670_000 picoseconds. - Weight::from_parts(212_276_000, 7769) + // Measured: `1996` + // Estimated: `7936` + // Minimum execution time: 246_169_000 picoseconds. + Weight::from_parts(248_564_000, 7936) .saturating_add(T::DbWeight::get().reads(18_u64)) .saturating_add(T::DbWeight::get().writes(6_u64)) } @@ -1326,6 +1366,10 @@ impl WeightInfo for SubstrateWeight { /// Proof: `Swap::FeeRate` (`max_values`: None, `max_size`: Some(12), added: 2487, mode: `MaxEncodedLen`) /// Storage: `Swap::CurrentLiquidity` (r:1 w:0) /// Proof: `Swap::CurrentLiquidity` (`max_values`: None, `max_size`: Some(18), added: 2493, mode: `MaxEncodedLen`) + /// Storage: `SubtensorModule::StakingHotkeys` (r:1 w:0) + /// Proof: `SubtensorModule::StakingHotkeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::Lock` (r:3 w:1) + /// Proof: `SubtensorModule::Lock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::SubnetAlphaIn` (r:2 w:2) /// Proof: `SubtensorModule::SubnetAlphaIn` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::SubnetAlphaOut` (r:2 w:2) @@ -1334,22 +1378,26 @@ impl WeightInfo for SubstrateWeight { /// Proof: `SubtensorModule::TotalStake` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::SubnetVolume` (r:2 w:2) /// Proof: `SubtensorModule::SubnetVolume` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `System::Account` (r:3 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(104), added: 2579, mode: `MaxEncodedLen`) /// Storage: `SubtensorModule::SubnetTaoFlow` (r:2 w:2) /// Proof: `SubtensorModule::SubnetTaoFlow` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `SubtensorModule::StakingHotkeys` (r:1 w:0) - /// Proof: `SubtensorModule::StakingHotkeys` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `SubtensorModule::TotalIssuance` (r:1 w:1) - /// Proof: `SubtensorModule::TotalIssuance` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::MaturityRate` (r:1 w:0) + /// Proof: `SubtensorModule::MaturityRate` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::UnlockRate` (r:1 w:0) + /// Proof: `SubtensorModule::UnlockRate` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::HotkeyLock` (r:1 w:1) + /// Proof: `SubtensorModule::HotkeyLock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::LastColdkeyHotkeyStakeBlock` (r:0 w:1) /// Proof: `SubtensorModule::LastColdkeyHotkeyStakeBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) fn swap_stake() -> Weight { // Proof Size summary in bytes: - // Measured: `2421` - // Estimated: `8556` - // Minimum execution time: 402_808_000 picoseconds. - Weight::from_parts(420_035_000, 8556) - .saturating_add(T::DbWeight::get().reads(42_u64)) - .saturating_add(T::DbWeight::get().writes(23_u64)) + // Measured: `2785` + // Estimated: `11200` + // Minimum execution time: 599_358_000 picoseconds. + Weight::from_parts(619_795_000, 11200) + .saturating_add(T::DbWeight::get().reads(48_u64)) + .saturating_add(T::DbWeight::get().writes(25_u64)) } /// Storage: `SubtensorModule::NetworksAdded` (r:1 w:0) /// Proof: `SubtensorModule::NetworksAdded` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -1377,8 +1425,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1084` // Estimated: `4549` - // Minimum execution time: 125_634_000 picoseconds. - Weight::from_parts(128_289_000, 4549) + // Minimum execution time: 122_378_000 picoseconds. + Weight::from_parts(123_540_000, 4549) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -1418,8 +1466,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1416` // Estimated: `7356` - // Minimum execution time: 100_718_000 picoseconds. - Weight::from_parts(101_739_000, 7356) + // Minimum execution time: 100_217_000 picoseconds. + Weight::from_parts(101_349_000, 7356) .saturating_add(T::DbWeight::get().reads(16_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -1435,8 +1483,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `793` // Estimated: `4258` - // Minimum execution time: 28_653_000 picoseconds. - Weight::from_parts(29_064_000, 4258) + // Minimum execution time: 28_072_000 picoseconds. + Weight::from_parts(28_905_000, 4258) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -1454,8 +1502,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `886` // Estimated: `4351` - // Minimum execution time: 35_276_000 picoseconds. - Weight::from_parts(36_067_000, 4351) + // Minimum execution time: 35_146_000 picoseconds. + Weight::from_parts(35_937_000, 4351) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -1501,6 +1549,8 @@ impl WeightInfo for SubstrateWeight { /// Proof: `SubtensorModule::ActivityCutoff` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::RegistrationsThisInterval` (r:1 w:1) /// Proof: `SubtensorModule::RegistrationsThisInterval` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(104), added: 2579, mode: `MaxEncodedLen`) /// Storage: `SubtensorModule::OwnedHotkeys` (r:1 w:1) /// Proof: `SubtensorModule::OwnedHotkeys` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::StakingHotkeys` (r:1 w:1) @@ -1533,8 +1583,6 @@ impl WeightInfo for SubstrateWeight { /// Proof: `SubtensorModule::Keys` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::Burn` (r:0 w:1) /// Proof: `SubtensorModule::Burn` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `SubtensorModule::RAORecycledForRegistration` (r:0 w:1) - /// Proof: `SubtensorModule::RAORecycledForRegistration` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::SubnetLocked` (r:0 w:1) /// Proof: `SubtensorModule::SubnetLocked` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::NetworkRegisteredAt` (r:0 w:1) @@ -1573,8 +1621,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1343` // Estimated: `9758` - // Minimum execution time: 247_121_000 picoseconds. - Weight::from_parts(250_386_000, 9758) + // Minimum execution time: 276_175_000 picoseconds. + Weight::from_parts(281_044_000, 9758) .saturating_add(T::DbWeight::get().reads(41_u64)) .saturating_add(T::DbWeight::get().writes(46_u64)) } @@ -1588,8 +1636,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `762` // Estimated: `6702` - // Minimum execution time: 33_723_000 picoseconds. - Weight::from_parts(34_675_000, 6702) + // Minimum execution time: 34_585_000 picoseconds. + Weight::from_parts(35_195_000, 6702) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -1603,8 +1651,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `842` // Estimated: `6782` - // Minimum execution time: 30_918_000 picoseconds. - Weight::from_parts(31_589_000, 6782) + // Minimum execution time: 31_539_000 picoseconds. + Weight::from_parts(32_150_000, 6782) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -1616,7 +1664,7 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `595` // Estimated: `4060` - // Minimum execution time: 17_742_000 picoseconds. + // Minimum execution time: 17_543_000 picoseconds. Weight::from_parts(18_184_000, 4060) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) @@ -1639,10 +1687,12 @@ impl WeightInfo for SubstrateWeight { /// Proof: `SubtensorModule::Alpha` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::AlphaV2` (r:9 w:8) /// Proof: `SubtensorModule::AlphaV2` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `SubtensorModule::OwnedHotkeys` (r:1 w:1) - /// Proof: `SubtensorModule::OwnedHotkeys` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::NetworksAdded` (r:6 w:0) /// Proof: `SubtensorModule::NetworksAdded` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::HotkeyLock` (r:5 w:0) + /// Proof: `SubtensorModule::HotkeyLock` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::OwnedHotkeys` (r:1 w:1) + /// Proof: `SubtensorModule::OwnedHotkeys` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::ChildKeys` (r:10 w:10) /// Proof: `SubtensorModule::ChildKeys` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::ParentKeys` (r:10 w:10) @@ -1689,8 +1739,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `3026` // Estimated: `28766` - // Minimum execution time: 1_148_871_000 picoseconds. - Weight::from_parts(1_162_857_000, 28766) + // Minimum execution time: 1_138_432_000 picoseconds. + Weight::from_parts(1_146_287_000, 28766) .saturating_add(T::DbWeight::get().reads(166_u64)) .saturating_add(T::DbWeight::get().writes(95_u64)) } @@ -1704,8 +1754,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `745` // Estimated: `4210` - // Minimum execution time: 23_784_000 picoseconds. - Weight::from_parts(24_406_000, 4210) + // Minimum execution time: 23_844_000 picoseconds. + Weight::from_parts(24_556_000, 4210) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -1719,8 +1769,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `740` // Estimated: `9155` - // Minimum execution time: 26_539_000 picoseconds. - Weight::from_parts(27_602_000, 9155) + // Minimum execution time: 26_440_000 picoseconds. + Weight::from_parts(26_900_000, 9155) .saturating_add(T::DbWeight::get().reads(6_u64)) } /// Storage: `SubtensorModule::Owner` (r:1 w:0) @@ -1759,6 +1809,10 @@ impl WeightInfo for SubstrateWeight { /// Proof: `Swap::FeeRate` (`max_values`: None, `max_size`: Some(12), added: 2487, mode: `MaxEncodedLen`) /// Storage: `Swap::CurrentLiquidity` (r:1 w:0) /// Proof: `Swap::CurrentLiquidity` (`max_values`: None, `max_size`: Some(18), added: 2493, mode: `MaxEncodedLen`) + /// Storage: `SubtensorModule::StakingHotkeys` (r:1 w:0) + /// Proof: `SubtensorModule::StakingHotkeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::Lock` (r:2 w:0) + /// Proof: `SubtensorModule::Lock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::SubnetAlphaIn` (r:2 w:2) /// Proof: `SubtensorModule::SubnetAlphaIn` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::SubnetAlphaOut` (r:2 w:2) @@ -1767,12 +1821,10 @@ impl WeightInfo for SubstrateWeight { /// Proof: `SubtensorModule::TotalStake` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::SubnetVolume` (r:2 w:2) /// Proof: `SubtensorModule::SubnetVolume` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `System::Account` (r:4 w:3) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(104), added: 2579, mode: `MaxEncodedLen`) /// Storage: `SubtensorModule::SubnetTaoFlow` (r:2 w:2) /// Proof: `SubtensorModule::SubnetTaoFlow` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `SubtensorModule::StakingHotkeys` (r:1 w:0) - /// Proof: `SubtensorModule::StakingHotkeys` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `SubtensorModule::TotalIssuance` (r:1 w:1) - /// Proof: `SubtensorModule::TotalIssuance` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::RootClaimable` (r:1 w:0) /// Proof: `SubtensorModule::RootClaimable` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::StakingColdkeys` (r:1 w:1) @@ -1785,11 +1837,11 @@ impl WeightInfo for SubstrateWeight { /// Proof: `SubtensorModule::LastColdkeyHotkeyStakeBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) fn unstake_all_alpha() -> Weight { // Proof Size summary in bytes: - // Measured: `2372` - // Estimated: `10787` - // Minimum execution time: 414_015_000 picoseconds. - Weight::from_parts(427_445_000, 10787) - .saturating_add(T::DbWeight::get().reads(47_u64)) + // Measured: `2614` + // Estimated: `11306` + // Minimum execution time: 573_750_000 picoseconds. + Weight::from_parts(578_749_000, 11306) + .saturating_add(T::DbWeight::get().reads(49_u64)) .saturating_add(T::DbWeight::get().writes(26_u64)) } /// Storage: `SubtensorModule::Alpha` (r:1 w:0) @@ -1826,6 +1878,10 @@ impl WeightInfo for SubstrateWeight { /// Proof: `SubtensorModule::StakingOperationRateLimiter` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::Owner` (r:1 w:0) /// Proof: `SubtensorModule::Owner` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::StakingHotkeys` (r:1 w:0) + /// Proof: `SubtensorModule::StakingHotkeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::Lock` (r:1 w:0) + /// Proof: `SubtensorModule::Lock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::SubnetAlphaIn` (r:1 w:1) /// Proof: `SubtensorModule::SubnetAlphaIn` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::SubnetAlphaOut` (r:1 w:1) @@ -1834,21 +1890,21 @@ impl WeightInfo for SubstrateWeight { /// Proof: `SubtensorModule::TotalStake` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::SubnetVolume` (r:1 w:1) /// Proof: `SubtensorModule::SubnetVolume` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(104), added: 2579, mode: `MaxEncodedLen`) /// Storage: `SubtensorModule::SubnetTaoFlow` (r:1 w:1) /// Proof: `SubtensorModule::SubnetTaoFlow` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `System::Account` (r:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(104), added: 2579, mode: `MaxEncodedLen`) /// Storage: `SubtensorModule::StakeThreshold` (r:1 w:0) /// Proof: `SubtensorModule::StakeThreshold` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::LastColdkeyHotkeyStakeBlock` (r:0 w:1) /// Proof: `SubtensorModule::LastColdkeyHotkeyStakeBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) fn remove_stake_full_limit() -> Weight { // Proof Size summary in bytes: - // Measured: `2211` - // Estimated: `10626` - // Minimum execution time: 412_223_000 picoseconds. - Weight::from_parts(430_190_000, 10626) - .saturating_add(T::DbWeight::get().reads(31_u64)) + // Measured: `2536` + // Estimated: `10951` + // Minimum execution time: 477_430_000 picoseconds. + Weight::from_parts(488_440_000, 10951) + .saturating_add(T::DbWeight::get().reads(33_u64)) .saturating_add(T::DbWeight::get().writes(14_u64)) } /// Storage: `Crowdloan::CurrentCrowdloanId` (r:1 w:0) @@ -1857,7 +1913,7 @@ impl WeightInfo for SubstrateWeight { /// Proof: `Crowdloan::Crowdloans` (`max_values`: None, `max_size`: Some(282), added: 2757, mode: `MaxEncodedLen`) /// Storage: `SubtensorModule::NextSubnetLeaseId` (r:1 w:1) /// Proof: `SubtensorModule::NextSubnetLeaseId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `System::Account` (r:502 w:502) + /// Storage: `System::Account` (r:503 w:503) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(104), added: 2579, mode: `MaxEncodedLen`) /// Storage: `SubtensorModule::Owner` (r:1 w:1) /// Proof: `SubtensorModule::Owner` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -1939,8 +1995,6 @@ impl WeightInfo for SubstrateWeight { /// Proof: `Crowdloan::Contributions` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) /// Storage: `SubtensorModule::Burn` (r:0 w:1) /// Proof: `SubtensorModule::Burn` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `SubtensorModule::RAORecycledForRegistration` (r:0 w:1) - /// Proof: `SubtensorModule::RAORecycledForRegistration` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::SubnetUidToLeaseId` (r:0 w:1) /// Proof: `SubtensorModule::SubnetUidToLeaseId` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::SubnetLocked` (r:0 w:1) @@ -1986,10 +2040,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1762 + k * (44 ±0)` // Estimated: `10183 + k * (2579 ±0)` - // Minimum execution time: 460_608_000 picoseconds. - Weight::from_parts(288_591_956, 10183) - // Standard Error: 49_874 - .saturating_add(Weight::from_parts(46_601_875, 0).saturating_mul(k.into())) + // Minimum execution time: 464_997_000 picoseconds. + Weight::from_parts(289_483_511, 10183) + // Standard Error: 31_251 + .saturating_add(Weight::from_parts(44_721_932, 0).saturating_mul(k.into())) .saturating_add(T::DbWeight::get().reads(51_u64)) .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(k.into()))) .saturating_add(T::DbWeight::get().writes(52_u64)) @@ -2019,10 +2073,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1447 + k * (53 ±0)` // Estimated: `6148 + k * (2514 ±0)` - // Minimum execution time: 91_881_000 picoseconds. - Weight::from_parts(76_151_337, 6148) - // Standard Error: 6_935 - .saturating_add(Weight::from_parts(1_611_715, 0).saturating_mul(k.into())) + // Minimum execution time: 108_031_000 picoseconds. + Weight::from_parts(85_510_917, 6148) + // Standard Error: 8_550 + .saturating_add(Weight::from_parts(1_534_915, 0).saturating_mul(k.into())) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(k.into()))) .saturating_add(T::DbWeight::get().writes(7_u64)) @@ -2037,8 +2091,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `649` // Estimated: `9064` - // Minimum execution time: 28_173_000 picoseconds. - Weight::from_parts(29_054_000, 9064) + // Minimum execution time: 28_012_000 picoseconds. + Weight::from_parts(29_235_000, 9064) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -2066,8 +2120,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1060` // Estimated: `4525` - // Minimum execution time: 74_899_000 picoseconds. - Weight::from_parts(76_262_000, 4525) + // Minimum execution time: 74_398_000 picoseconds. + Weight::from_parts(75_631_000, 4525) .saturating_add(T::DbWeight::get().reads(10_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -2083,8 +2137,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `799` // Estimated: `4264` - // Minimum execution time: 33_833_000 picoseconds. - Weight::from_parts(34_534_000, 4264) + // Minimum execution time: 33_572_000 picoseconds. + Weight::from_parts(34_244_000, 4264) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -2100,8 +2154,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `476` // Estimated: `3941` - // Minimum execution time: 17_713_000 picoseconds. - Weight::from_parts(18_294_000, 3941) + // Minimum execution time: 17_262_000 picoseconds. + Weight::from_parts(18_184_000, 3941) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -2131,8 +2185,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1908` // Estimated: `7848` - // Minimum execution time: 134_892_000 picoseconds. - Weight::from_parts(137_416_000, 7848) + // Minimum execution time: 132_567_000 picoseconds. + Weight::from_parts(135_243_000, 7848) .saturating_add(T::DbWeight::get().reads(16_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -2142,8 +2196,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_734_000 picoseconds. - Weight::from_parts(2_865_000, 0) + // Minimum execution time: 2_715_000 picoseconds. + Weight::from_parts(2_915_000, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::RootClaimableThreshold` (r:0 w:1) @@ -2152,8 +2206,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_290_000 picoseconds. - Weight::from_parts(5_831_000, 0) + // Minimum execution time: 5_490_000 picoseconds. + Weight::from_parts(5_791_000, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::Owner` (r:1 w:0) @@ -2166,17 +2220,11 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `852` // Estimated: `4317` - // Minimum execution time: 26_740_000 picoseconds. - Weight::from_parts(27_722_000, 4317) + // Minimum execution time: 26_931_000 picoseconds. + Weight::from_parts(27_972_000, 4317) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } - /// Storage: `SubtensorModule::SubnetOwner` (r:1 w:0) - /// Proof: `SubtensorModule::SubnetOwner` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `SubtensorModule::LastRateLimitedBlock` (r:1 w:1) - /// Proof: `SubtensorModule::LastRateLimitedBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `SubtensorModule::Tempo` (r:1 w:0) - /// Proof: `SubtensorModule::Tempo` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::SubnetMechanism` (r:1 w:0) /// Proof: `SubtensorModule::SubnetMechanism` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::SubnetAlphaIn` (r:1 w:1) @@ -2199,7 +2247,7 @@ impl WeightInfo for SubstrateWeight { /// Proof: `SubtensorModule::NetworksAdded` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::SubtokenEnabled` (r:1 w:0) /// Proof: `SubtensorModule::SubtokenEnabled` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `System::Account` (r:1 w:1) + /// Storage: `System::Account` (r:3 w:3) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(104), added: 2579, mode: `MaxEncodedLen`) /// Storage: `SubtensorModule::Owner` (r:1 w:0) /// Proof: `SubtensorModule::Owner` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -2223,22 +2271,28 @@ impl WeightInfo for SubstrateWeight { /// Proof: `SubtensorModule::Alpha` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::AlphaV2` (r:1 w:1) /// Proof: `SubtensorModule::AlphaV2` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `SubtensorModule::TotalIssuance` (r:1 w:1) - /// Proof: `SubtensorModule::TotalIssuance` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::SubnetTaoFlow` (r:1 w:1) /// Proof: `SubtensorModule::SubnetTaoFlow` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::Lock` (r:2 w:1) + /// Proof: `SubtensorModule::Lock` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::MaturityRate` (r:1 w:0) + /// Proof: `SubtensorModule::MaturityRate` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::UnlockRate` (r:1 w:0) + /// Proof: `SubtensorModule::UnlockRate` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::HotkeyLock` (r:1 w:1) + /// Proof: `SubtensorModule::HotkeyLock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::StakingOperationRateLimiter` (r:0 w:1) /// Proof: `SubtensorModule::StakingOperationRateLimiter` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::LastColdkeyHotkeyStakeBlock` (r:0 w:1) /// Proof: `SubtensorModule::LastColdkeyHotkeyStakeBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) fn add_stake_burn() -> Weight { // Proof Size summary in bytes: - // Measured: `2365` - // Estimated: `8556` - // Minimum execution time: 534_433_000 picoseconds. - Weight::from_parts(534_433_000, 8556) - .saturating_add(T::DbWeight::get().reads(31_u64)) - .saturating_add(T::DbWeight::get().writes(17_u64)) + // Measured: `2560` + // Estimated: `8727` + // Minimum execution time: 591_622_000 picoseconds. + Weight::from_parts(612_511_000, 8727) + .saturating_add(T::DbWeight::get().reads(33_u64)) + .saturating_add(T::DbWeight::get().writes(18_u64)) } /// Storage: `SubtensorModule::PendingChildKeyCooldown` (r:0 w:1) /// Proof: `SubtensorModule::PendingChildKeyCooldown` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) @@ -2246,28 +2300,71 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_745_000 picoseconds. - Weight::from_parts(2_956_000, 0) + // Minimum execution time: 2_795_000 picoseconds. + Weight::from_parts(2_965_000, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } - - fn lock_stake() -> Weight { - Weight::from_parts(81_532_000, 4317) - .saturating_add(T::DbWeight::get().reads(8_u64)) - .saturating_add(T::DbWeight::get().writes(2_u64)) - } - - fn unlock_stake() -> Weight { - Weight::from_parts(81_532_000, 4317) - .saturating_add(T::DbWeight::get().reads(8_u64)) - .saturating_add(T::DbWeight::get().writes(2_u64)) - } - - fn move_lock() -> Weight { - Weight::from_parts(77_234_000, 4317) - .saturating_add(T::DbWeight::get().reads(7_u64)) - .saturating_add(T::DbWeight::get().writes(4_u64)) - } + /// Storage: `SubtensorModule::StakingHotkeys` (r:1 w:0) + /// Proof: `SubtensorModule::StakingHotkeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::Alpha` (r:1 w:0) + /// Proof: `SubtensorModule::Alpha` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::AlphaV2` (r:1 w:0) + /// Proof: `SubtensorModule::AlphaV2` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::TotalHotkeyAlpha` (r:1 w:0) + /// Proof: `SubtensorModule::TotalHotkeyAlpha` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::TotalHotkeyShares` (r:1 w:0) + /// Proof: `SubtensorModule::TotalHotkeyShares` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::TotalHotkeySharesV2` (r:1 w:0) + /// Proof: `SubtensorModule::TotalHotkeySharesV2` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::Lock` (r:1 w:1) + /// Proof: `SubtensorModule::Lock` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::HotkeyLock` (r:1 w:1) + /// Proof: `SubtensorModule::HotkeyLock` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn lock_stake() -> Weight { + // Proof Size summary in bytes: + // Measured: `1463` + // Estimated: `4928` + // Minimum execution time: 91_060_000 picoseconds. + Weight::from_parts(92_432_000, 4928) + .saturating_add(T::DbWeight::get().reads(8_u64)) + .saturating_add(T::DbWeight::get().writes(2_u64)) + } + /// Storage: `SubtensorModule::Lock` (r:2 w:1) + /// Proof: `SubtensorModule::Lock` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::MaturityRate` (r:1 w:0) + /// Proof: `SubtensorModule::MaturityRate` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::UnlockRate` (r:1 w:0) + /// Proof: `SubtensorModule::UnlockRate` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::HotkeyLock` (r:1 w:1) + /// Proof: `SubtensorModule::HotkeyLock` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn unlock_stake() -> Weight { + // Proof Size summary in bytes: + // Measured: `978` + // Estimated: `6918` + // Minimum execution time: 71_883_000 picoseconds. + Weight::from_parts(72_865_000, 6918) + .saturating_add(T::DbWeight::get().reads(5_u64)) + .saturating_add(T::DbWeight::get().writes(2_u64)) + } + /// Storage: `SubtensorModule::Lock` (r:2 w:2) + /// Proof: `SubtensorModule::Lock` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::Owner` (r:2 w:0) + /// Proof: `SubtensorModule::Owner` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::MaturityRate` (r:1 w:0) + /// Proof: `SubtensorModule::MaturityRate` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::UnlockRate` (r:1 w:0) + /// Proof: `SubtensorModule::UnlockRate` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::HotkeyLock` (r:2 w:2) + /// Proof: `SubtensorModule::HotkeyLock` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn move_lock() -> Weight { + // Proof Size summary in bytes: + // Measured: `1302` + // Estimated: `7242` + // Minimum execution time: 93_594_000 picoseconds. + Weight::from_parts(95_458_000, 7242) + .saturating_add(T::DbWeight::get().reads(8_u64)) + .saturating_add(T::DbWeight::get().writes(4_u64)) + } } // For backwards compatibility and tests. @@ -2280,7 +2377,7 @@ impl WeightInfo for () { /// Proof: `SubtensorModule::Uids` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::Burn` (r:1 w:1) /// Proof: `SubtensorModule::Burn` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `System::Account` (r:1 w:1) + /// Storage: `System::Account` (r:2 w:2) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(104), added: 2579, mode: `MaxEncodedLen`) /// Storage: `SubtensorModule::Owner` (r:1 w:1) /// Proof: `SubtensorModule::Owner` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -2366,10 +2463,10 @@ impl WeightInfo for () { /// Proof: `Swap::CurrentTick` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`) fn register() -> Weight { // Proof Size summary in bytes: - // Measured: `1629` + // Measured: `1706` // Estimated: `13600` - // Minimum execution time: 348_900_000 picoseconds. - Weight::from_parts(371_883_000, 13600) + // Minimum execution time: 358_568_000 picoseconds. + Weight::from_parts(378_786_000, 13600) .saturating_add(RocksDbWeight::get().reads(47_u64)) .saturating_add(RocksDbWeight::get().writes(39_u64)) } @@ -2411,15 +2508,15 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `188782` // Estimated: `10327372` - // Minimum execution time: 15_197_206_000 picoseconds. - Weight::from_parts(15_388_724_000, 10327372) + // Minimum execution time: 14_891_250_000 picoseconds. + Weight::from_parts(15_158_539_000, 10327372) .saturating_add(RocksDbWeight::get().reads(4112_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } - /// Storage: `SubtensorModule::SubtokenEnabled` (r:1 w:0) - /// Proof: `SubtensorModule::SubtokenEnabled` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::NetworksAdded` (r:1 w:0) /// Proof: `SubtensorModule::NetworksAdded` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::SubtokenEnabled` (r:1 w:0) + /// Proof: `SubtensorModule::SubtokenEnabled` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::SubnetMechanism` (r:1 w:0) /// Proof: `SubtensorModule::SubnetMechanism` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::SubnetAlphaIn` (r:1 w:1) @@ -2438,7 +2535,7 @@ impl WeightInfo for () { /// Proof: `Swap::FeeRate` (`max_values`: None, `max_size`: Some(12), added: 2487, mode: `MaxEncodedLen`) /// Storage: `Swap::CurrentLiquidity` (r:1 w:0) /// Proof: `Swap::CurrentLiquidity` (`max_values`: None, `max_size`: Some(18), added: 2493, mode: `MaxEncodedLen`) - /// Storage: `System::Account` (r:1 w:1) + /// Storage: `System::Account` (r:3 w:3) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(104), added: 2579, mode: `MaxEncodedLen`) /// Storage: `SubtensorModule::Owner` (r:1 w:0) /// Proof: `SubtensorModule::Owner` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -2462,22 +2559,28 @@ impl WeightInfo for () { /// Proof: `SubtensorModule::Alpha` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::AlphaV2` (r:1 w:1) /// Proof: `SubtensorModule::AlphaV2` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `SubtensorModule::TotalIssuance` (r:1 w:1) - /// Proof: `SubtensorModule::TotalIssuance` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::SubnetTaoFlow` (r:1 w:1) /// Proof: `SubtensorModule::SubnetTaoFlow` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::Lock` (r:2 w:1) + /// Proof: `SubtensorModule::Lock` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::MaturityRate` (r:1 w:0) + /// Proof: `SubtensorModule::MaturityRate` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::UnlockRate` (r:1 w:0) + /// Proof: `SubtensorModule::UnlockRate` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::HotkeyLock` (r:1 w:1) + /// Proof: `SubtensorModule::HotkeyLock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::StakingOperationRateLimiter` (r:0 w:1) /// Proof: `SubtensorModule::StakingOperationRateLimiter` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::LastColdkeyHotkeyStakeBlock` (r:0 w:1) /// Proof: `SubtensorModule::LastColdkeyHotkeyStakeBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) fn add_stake() -> Weight { // Proof Size summary in bytes: - // Measured: `2307` - // Estimated: `8556` - // Minimum execution time: 399_660_000 picoseconds. - Weight::from_parts(399_660_000, 8556) - .saturating_add(RocksDbWeight::get().reads(28_u64)) - .saturating_add(RocksDbWeight::get().writes(16_u64)) + // Measured: `2560` + // Estimated: `8727` + // Minimum execution time: 437_405_000 picoseconds. + Weight::from_parts(442_415_000, 8727) + .saturating_add(RocksDbWeight::get().reads(33_u64)) + .saturating_add(RocksDbWeight::get().writes(18_u64)) } /// Storage: `SubtensorModule::IsNetworkMember` (r:2 w:0) /// Proof: `SubtensorModule::IsNetworkMember` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -2489,8 +2592,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `791` // Estimated: `6731` - // Minimum execution time: 34_624_000 picoseconds. - Weight::from_parts(35_666_000, 6731) + // Minimum execution time: 34_064_000 picoseconds. + Weight::from_parts(34_645_000, 6731) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -2504,8 +2607,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `764` // Estimated: `6704` - // Minimum execution time: 30_797_000 picoseconds. - Weight::from_parts(31_860_000, 6704) + // Minimum execution time: 30_276_000 picoseconds. + Weight::from_parts(31_338_000, 6704) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -2517,7 +2620,7 @@ impl WeightInfo for () { /// Proof: `SubtensorModule::Uids` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::Burn` (r:1 w:1) /// Proof: `SubtensorModule::Burn` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `System::Account` (r:1 w:1) + /// Storage: `System::Account` (r:2 w:2) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(104), added: 2579, mode: `MaxEncodedLen`) /// Storage: `SubtensorModule::Owner` (r:1 w:1) /// Proof: `SubtensorModule::Owner` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -2605,8 +2708,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1639` // Estimated: `13600` - // Minimum execution time: 385_433_000 picoseconds. - Weight::from_parts(385_433_000, 13600) + // Minimum execution time: 369_369_000 picoseconds. + Weight::from_parts(374_207_000, 13600) .saturating_add(RocksDbWeight::get().reads(47_u64)) .saturating_add(RocksDbWeight::get().writes(39_u64)) } @@ -2658,8 +2761,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1415` // Estimated: `4880` - // Minimum execution time: 102_561_000 picoseconds. - Weight::from_parts(104_435_000, 4880) + // Minimum execution time: 100_538_000 picoseconds. + Weight::from_parts(102_030_000, 4880) .saturating_add(RocksDbWeight::get().reads(19_u64)) .saturating_add(RocksDbWeight::get().writes(16_u64)) } @@ -2685,7 +2788,7 @@ impl WeightInfo for () { /// Proof: `SubtensorModule::TotalIssuance` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::BlockEmission` (r:1 w:0) /// Proof: `SubtensorModule::BlockEmission` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `System::Account` (r:1 w:1) + /// Storage: `System::Account` (r:2 w:2) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(104), added: 2579, mode: `MaxEncodedLen`) /// Storage: `SubtensorModule::SubnetMechanism` (r:1 w:1) /// Proof: `SubtensorModule::SubnetMechanism` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -2739,8 +2842,6 @@ impl WeightInfo for () { /// Proof: `SubtensorModule::Keys` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::Burn` (r:0 w:1) /// Proof: `SubtensorModule::Burn` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `SubtensorModule::RAORecycledForRegistration` (r:0 w:1) - /// Proof: `SubtensorModule::RAORecycledForRegistration` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::SubnetLocked` (r:0 w:1) /// Proof: `SubtensorModule::SubnetLocked` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::NetworkRegisteredAt` (r:0 w:1) @@ -2777,12 +2878,12 @@ impl WeightInfo for () { /// Proof: `SubtensorModule::MaxAllowedUids` (`max_values`: None, `max_size`: None, mode: `Measured`) fn register_network() -> Weight { // Proof Size summary in bytes: - // Measured: `1676` - // Estimated: `10091` - // Minimum execution time: 259_162_000 picoseconds. - Weight::from_parts(259_162_000, 10091) + // Measured: `1459` + // Estimated: `9874` + // Minimum execution time: 266_317_000 picoseconds. + Weight::from_parts(269_883_000, 9874) .saturating_add(RocksDbWeight::get().reads(42_u64)) - .saturating_add(RocksDbWeight::get().writes(46_u64)) + .saturating_add(RocksDbWeight::get().writes(47_u64)) } /// Storage: `SubtensorModule::NetworksAdded` (r:1 w:0) /// Proof: `SubtensorModule::NetworksAdded` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -2808,8 +2909,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1061` // Estimated: `4526` - // Minimum execution time: 61_785_000 picoseconds. - Weight::from_parts(62_667_000, 4526) + // Minimum execution time: 60_743_000 picoseconds. + Weight::from_parts(61_915_000, 4526) .saturating_add(RocksDbWeight::get().reads(10_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -2853,8 +2954,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1579` // Estimated: `7519` - // Minimum execution time: 109_063_000 picoseconds. - Weight::from_parts(110_616_000, 7519) + // Minimum execution time: 107_070_000 picoseconds. + Weight::from_parts(108_663_000, 7519) .saturating_add(RocksDbWeight::get().reads(18_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -2864,8 +2965,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_340_000 picoseconds. - Weight::from_parts(5_541_000, 0) + // Minimum execution time: 5_330_000 picoseconds. + Weight::from_parts(5_640_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::Owner` (r:1 w:0) @@ -2882,8 +2983,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `938` // Estimated: `4403` - // Minimum execution time: 47_128_000 picoseconds. - Weight::from_parts(47_769_000, 4403) + // Minimum execution time: 46_457_000 picoseconds. + Weight::from_parts(47_509_000, 4403) .saturating_add(RocksDbWeight::get().reads(5_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -2899,8 +3000,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `694` // Estimated: `4159` - // Minimum execution time: 43_000_000 picoseconds. - Weight::from_parts(43_812_000, 4159) + // Minimum execution time: 45_174_000 picoseconds. + Weight::from_parts(46_146_000, 4159) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -2930,16 +3031,18 @@ impl WeightInfo for () { /// Proof: `SubtensorModule::TotalHotkeySharesV2` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::OwnedHotkeys` (r:2 w:2) /// Proof: `SubtensorModule::OwnedHotkeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::Lock` (r:2 w:0) + /// Proof: `SubtensorModule::Lock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `System::Account` (r:2 w:2) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(104), added: 2579, mode: `MaxEncodedLen`) /// Storage: `SubtensorModule::LastRateLimitedBlock` (r:0 w:1) /// Proof: `SubtensorModule::LastRateLimitedBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) fn swap_coldkey_announced() -> Weight { // Proof Size summary in bytes: - // Measured: `1815` - // Estimated: `12705` - // Minimum execution time: 254_054_000 picoseconds. - Weight::from_parts(256_498_000, 12705) + // Measured: `2117` + // Estimated: `13007` + // Minimum execution time: 268_099_000 picoseconds. + Weight::from_parts(270_495_000, 13007) .saturating_add(RocksDbWeight::get().reads(33_u64)) .saturating_add(RocksDbWeight::get().writes(15_u64)) } @@ -2971,6 +3074,8 @@ impl WeightInfo for () { /// Proof: `SubtensorModule::TotalHotkeySharesV2` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::OwnedHotkeys` (r:2 w:2) /// Proof: `SubtensorModule::OwnedHotkeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::Lock` (r:2 w:0) + /// Proof: `SubtensorModule::Lock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::ColdkeySwapAnnouncements` (r:0 w:1) /// Proof: `SubtensorModule::ColdkeySwapAnnouncements` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::ColdkeySwapDisputes` (r:0 w:1) @@ -2979,10 +3084,10 @@ impl WeightInfo for () { /// Proof: `SubtensorModule::LastRateLimitedBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) fn swap_coldkey() -> Weight { // Proof Size summary in bytes: - // Measured: `1908` - // Estimated: `12798` - // Minimum execution time: 276_024_000 picoseconds. - Weight::from_parts(279_571_000, 12798) + // Measured: `2210` + // Estimated: `13100` + // Minimum execution time: 291_804_000 picoseconds. + Weight::from_parts(297_384_000, 13100) .saturating_add(RocksDbWeight::get().reads(33_u64)) .saturating_add(RocksDbWeight::get().writes(19_u64)) } @@ -2994,8 +3099,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `665` // Estimated: `4130` - // Minimum execution time: 22_051_000 picoseconds. - Weight::from_parts(22_531_000, 4130) + // Minimum execution time: 22_412_000 picoseconds. + Weight::from_parts(22_962_000, 4130) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -3007,8 +3112,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `613` // Estimated: `4078` - // Minimum execution time: 18_605_000 picoseconds. - Weight::from_parts(19_015_000, 4078) + // Minimum execution time: 18_565_000 picoseconds. + Weight::from_parts(19_176_000, 4078) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -3020,8 +3125,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 8_426_000 picoseconds. - Weight::from_parts(8_766_000, 0) + // Minimum execution time: 8_336_000 picoseconds. + Weight::from_parts(8_665_000, 0) .saturating_add(RocksDbWeight::get().writes(2_u64)) } /// Storage: `SubtensorModule::CommitRevealWeightsEnabled` (r:1 w:0) @@ -3064,8 +3169,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `2084` // Estimated: `8024` - // Minimum execution time: 411_286_000 picoseconds. - Weight::from_parts(430_662_000, 8024) + // Minimum execution time: 401_519_000 picoseconds. + Weight::from_parts(407_931_000, 8024) .saturating_add(RocksDbWeight::get().reads(18_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -3087,12 +3192,16 @@ impl WeightInfo for () { /// Proof: `SubtensorModule::TotalHotkeySharesV2` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::SubnetAlphaOut` (r:1 w:1) /// Proof: `SubtensorModule::SubnetAlphaOut` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::StakingHotkeys` (r:1 w:0) + /// Proof: `SubtensorModule::StakingHotkeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::Lock` (r:1 w:0) + /// Proof: `SubtensorModule::Lock` (`max_values`: None, `max_size`: None, mode: `Measured`) fn recycle_alpha() -> Weight { // Proof Size summary in bytes: - // Measured: `1424` - // Estimated: `4889` - // Minimum execution time: 126_435_000 picoseconds. - Weight::from_parts(128_039_000, 4889) + // Measured: `1860` + // Estimated: `5325` + // Minimum execution time: 170_759_000 picoseconds. + Weight::from_parts(172_852_000, 5325) .saturating_add(RocksDbWeight::get().reads(11_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } @@ -3114,12 +3223,16 @@ impl WeightInfo for () { /// Proof: `SubtensorModule::TotalHotkeySharesV2` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::SubnetAlphaOut` (r:1 w:0) /// Proof: `SubtensorModule::SubnetAlphaOut` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::StakingHotkeys` (r:1 w:0) + /// Proof: `SubtensorModule::StakingHotkeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::Lock` (r:1 w:0) + /// Proof: `SubtensorModule::Lock` (`max_values`: None, `max_size`: None, mode: `Measured`) fn burn_alpha() -> Weight { // Proof Size summary in bytes: - // Measured: `1424` - // Estimated: `4889` - // Minimum execution time: 126_171_000 picoseconds. - Weight::from_parts(128_965_000, 4889) + // Measured: `1860` + // Estimated: `5325` + // Minimum execution time: 170_008_000 picoseconds. + Weight::from_parts(172_351_000, 5325) .saturating_add(RocksDbWeight::get().reads(11_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -3139,8 +3252,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1079` // Estimated: `4544` - // Minimum execution time: 38_992_000 picoseconds. - Weight::from_parts(39_714_000, 4544) + // Minimum execution time: 38_492_000 picoseconds. + Weight::from_parts(39_303_000, 4544) .saturating_add(RocksDbWeight::get().reads(5_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -3166,7 +3279,7 @@ impl WeightInfo for () { /// Proof: `SubtensorModule::NetworksAdded` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::SubtokenEnabled` (r:1 w:0) /// Proof: `SubtensorModule::SubtokenEnabled` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `System::Account` (r:1 w:1) + /// Storage: `System::Account` (r:3 w:3) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(104), added: 2579, mode: `MaxEncodedLen`) /// Storage: `SubtensorModule::Owner` (r:1 w:0) /// Proof: `SubtensorModule::Owner` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -3190,22 +3303,28 @@ impl WeightInfo for () { /// Proof: `SubtensorModule::Alpha` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::AlphaV2` (r:1 w:1) /// Proof: `SubtensorModule::AlphaV2` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `SubtensorModule::TotalIssuance` (r:1 w:1) - /// Proof: `SubtensorModule::TotalIssuance` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::SubnetTaoFlow` (r:1 w:1) /// Proof: `SubtensorModule::SubnetTaoFlow` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::Lock` (r:2 w:1) + /// Proof: `SubtensorModule::Lock` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::MaturityRate` (r:1 w:0) + /// Proof: `SubtensorModule::MaturityRate` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::UnlockRate` (r:1 w:0) + /// Proof: `SubtensorModule::UnlockRate` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::HotkeyLock` (r:1 w:1) + /// Proof: `SubtensorModule::HotkeyLock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::StakingOperationRateLimiter` (r:0 w:1) /// Proof: `SubtensorModule::StakingOperationRateLimiter` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::LastColdkeyHotkeyStakeBlock` (r:0 w:1) /// Proof: `SubtensorModule::LastColdkeyHotkeyStakeBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) fn add_stake_limit() -> Weight { // Proof Size summary in bytes: - // Measured: `2307` - // Estimated: `8556` - // Minimum execution time: 444_193_000 picoseconds. - Weight::from_parts(444_193_000, 8556) - .saturating_add(RocksDbWeight::get().reads(31_u64)) - .saturating_add(RocksDbWeight::get().writes(17_u64)) + // Measured: `2560` + // Estimated: `8727` + // Minimum execution time: 472_802_000 picoseconds. + Weight::from_parts(483_060_000, 8727) + .saturating_add(RocksDbWeight::get().reads(33_u64)) + .saturating_add(RocksDbWeight::get().writes(18_u64)) } /// Storage: `SubtensorModule::Alpha` (r:2 w:0) /// Proof: `SubtensorModule::Alpha` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -3239,8 +3358,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `2002` // Estimated: `7942` - // Minimum execution time: 215_561_000 picoseconds. - Weight::from_parts(218_267_000, 7942) + // Minimum execution time: 210_262_000 picoseconds. + Weight::from_parts(212_767_000, 7942) .saturating_add(RocksDbWeight::get().reads(19_u64)) .saturating_add(RocksDbWeight::get().writes(7_u64)) } @@ -3280,6 +3399,10 @@ impl WeightInfo for () { /// Proof: `Swap::CurrentLiquidity` (`max_values`: None, `max_size`: Some(18), added: 2493, mode: `MaxEncodedLen`) /// Storage: `SubtensorModule::Owner` (r:1 w:0) /// Proof: `SubtensorModule::Owner` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::StakingHotkeys` (r:1 w:0) + /// Proof: `SubtensorModule::StakingHotkeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::Lock` (r:1 w:0) + /// Proof: `SubtensorModule::Lock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::SubnetAlphaIn` (r:1 w:1) /// Proof: `SubtensorModule::SubnetAlphaIn` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::SubnetAlphaOut` (r:1 w:1) @@ -3288,21 +3411,21 @@ impl WeightInfo for () { /// Proof: `SubtensorModule::TotalStake` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::SubnetVolume` (r:1 w:1) /// Proof: `SubtensorModule::SubnetVolume` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(104), added: 2579, mode: `MaxEncodedLen`) /// Storage: `SubtensorModule::SubnetTaoFlow` (r:1 w:1) /// Proof: `SubtensorModule::SubnetTaoFlow` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `System::Account` (r:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(104), added: 2579, mode: `MaxEncodedLen`) /// Storage: `SubtensorModule::StakeThreshold` (r:1 w:0) /// Proof: `SubtensorModule::StakeThreshold` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::LastColdkeyHotkeyStakeBlock` (r:0 w:1) /// Proof: `SubtensorModule::LastColdkeyHotkeyStakeBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) fn remove_stake() -> Weight { // Proof Size summary in bytes: - // Measured: `2211` - // Estimated: `10626` - // Minimum execution time: 347_237_000 picoseconds. - Weight::from_parts(367_354_000, 10626) - .saturating_add(RocksDbWeight::get().reads(32_u64)) + // Measured: `2536` + // Estimated: `10951` + // Minimum execution time: 417_889_000 picoseconds. + Weight::from_parts(439_609_000, 10951) + .saturating_add(RocksDbWeight::get().reads(34_u64)) .saturating_add(RocksDbWeight::get().writes(14_u64)) } /// Storage: `SubtensorModule::SubnetMechanism` (r:2 w:0) @@ -3339,6 +3462,10 @@ impl WeightInfo for () { /// Proof: `SubtensorModule::TotalHotkeySharesV2` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::Owner` (r:1 w:0) /// Proof: `SubtensorModule::Owner` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::StakingHotkeys` (r:1 w:0) + /// Proof: `SubtensorModule::StakingHotkeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::Lock` (r:1 w:0) + /// Proof: `SubtensorModule::Lock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::SubnetAlphaIn` (r:1 w:1) /// Proof: `SubtensorModule::SubnetAlphaIn` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::SubnetAlphaOut` (r:1 w:1) @@ -3347,21 +3474,21 @@ impl WeightInfo for () { /// Proof: `SubtensorModule::TotalStake` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::SubnetVolume` (r:1 w:1) /// Proof: `SubtensorModule::SubnetVolume` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(104), added: 2579, mode: `MaxEncodedLen`) /// Storage: `SubtensorModule::SubnetTaoFlow` (r:1 w:1) /// Proof: `SubtensorModule::SubnetTaoFlow` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `System::Account` (r:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(104), added: 2579, mode: `MaxEncodedLen`) /// Storage: `SubtensorModule::StakeThreshold` (r:1 w:0) /// Proof: `SubtensorModule::StakeThreshold` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::LastColdkeyHotkeyStakeBlock` (r:0 w:1) /// Proof: `SubtensorModule::LastColdkeyHotkeyStakeBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) fn remove_stake_limit() -> Weight { // Proof Size summary in bytes: - // Measured: `2211` - // Estimated: `10626` - // Minimum execution time: 387_646_000 picoseconds. - Weight::from_parts(403_169_000, 10626) - .saturating_add(RocksDbWeight::get().reads(31_u64)) + // Measured: `2536` + // Estimated: `10951` + // Minimum execution time: 456_171_000 picoseconds. + Weight::from_parts(462_091_000, 10951) + .saturating_add(RocksDbWeight::get().reads(33_u64)) .saturating_add(RocksDbWeight::get().writes(14_u64)) } /// Storage: `SubtensorModule::Alpha` (r:2 w:0) @@ -3400,6 +3527,10 @@ impl WeightInfo for () { /// Proof: `SubtensorModule::SubtokenEnabled` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::Owner` (r:1 w:0) /// Proof: `SubtensorModule::Owner` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::StakingHotkeys` (r:1 w:0) + /// Proof: `SubtensorModule::StakingHotkeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::Lock` (r:3 w:1) + /// Proof: `SubtensorModule::Lock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::SubnetAlphaIn` (r:2 w:2) /// Proof: `SubtensorModule::SubnetAlphaIn` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::SubnetAlphaOut` (r:2 w:2) @@ -3408,22 +3539,26 @@ impl WeightInfo for () { /// Proof: `SubtensorModule::TotalStake` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::SubnetVolume` (r:2 w:2) /// Proof: `SubtensorModule::SubnetVolume` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `System::Account` (r:3 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(104), added: 2579, mode: `MaxEncodedLen`) /// Storage: `SubtensorModule::SubnetTaoFlow` (r:2 w:2) /// Proof: `SubtensorModule::SubnetTaoFlow` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `SubtensorModule::StakingHotkeys` (r:1 w:0) - /// Proof: `SubtensorModule::StakingHotkeys` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `SubtensorModule::TotalIssuance` (r:1 w:1) - /// Proof: `SubtensorModule::TotalIssuance` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::MaturityRate` (r:1 w:0) + /// Proof: `SubtensorModule::MaturityRate` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::UnlockRate` (r:1 w:0) + /// Proof: `SubtensorModule::UnlockRate` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::HotkeyLock` (r:1 w:1) + /// Proof: `SubtensorModule::HotkeyLock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::LastColdkeyHotkeyStakeBlock` (r:0 w:1) /// Proof: `SubtensorModule::LastColdkeyHotkeyStakeBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) fn swap_stake_limit() -> Weight { // Proof Size summary in bytes: - // Measured: `2494` - // Estimated: `8556` - // Minimum execution time: 461_377_000 picoseconds. - Weight::from_parts(477_951_000, 8556) - .saturating_add(RocksDbWeight::get().reads(42_u64)) - .saturating_add(RocksDbWeight::get().writes(23_u64)) + // Measured: `2923` + // Estimated: `11338` + // Minimum execution time: 652_947_000 picoseconds. + Weight::from_parts(675_229_000, 11338) + .saturating_add(RocksDbWeight::get().reads(48_u64)) + .saturating_add(RocksDbWeight::get().writes(25_u64)) } /// Storage: `SubtensorModule::Alpha` (r:2 w:0) /// Proof: `SubtensorModule::Alpha` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -3445,8 +3580,10 @@ impl WeightInfo for () { /// Proof: `SubtensorModule::Owner` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::TransferToggle` (r:1 w:0) /// Proof: `SubtensorModule::TransferToggle` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `SubtensorModule::StakingHotkeys` (r:1 w:1) + /// Storage: `SubtensorModule::StakingHotkeys` (r:2 w:1) /// Proof: `SubtensorModule::StakingHotkeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::Lock` (r:1 w:0) + /// Proof: `SubtensorModule::Lock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::SubnetMechanism` (r:1 w:0) /// Proof: `SubtensorModule::SubnetMechanism` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `Swap::SwapV3Initialized` (r:1 w:0) @@ -3457,10 +3594,10 @@ impl WeightInfo for () { /// Proof: `SubtensorModule::LastColdkeyHotkeyStakeBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) fn transfer_stake() -> Weight { // Proof Size summary in bytes: - // Measured: `1829` - // Estimated: `7769` - // Minimum execution time: 209_670_000 picoseconds. - Weight::from_parts(212_276_000, 7769) + // Measured: `1996` + // Estimated: `7936` + // Minimum execution time: 246_169_000 picoseconds. + Weight::from_parts(248_564_000, 7936) .saturating_add(RocksDbWeight::get().reads(18_u64)) .saturating_add(RocksDbWeight::get().writes(6_u64)) } @@ -3500,6 +3637,10 @@ impl WeightInfo for () { /// Proof: `Swap::FeeRate` (`max_values`: None, `max_size`: Some(12), added: 2487, mode: `MaxEncodedLen`) /// Storage: `Swap::CurrentLiquidity` (r:1 w:0) /// Proof: `Swap::CurrentLiquidity` (`max_values`: None, `max_size`: Some(18), added: 2493, mode: `MaxEncodedLen`) + /// Storage: `SubtensorModule::StakingHotkeys` (r:1 w:0) + /// Proof: `SubtensorModule::StakingHotkeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::Lock` (r:3 w:1) + /// Proof: `SubtensorModule::Lock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::SubnetAlphaIn` (r:2 w:2) /// Proof: `SubtensorModule::SubnetAlphaIn` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::SubnetAlphaOut` (r:2 w:2) @@ -3508,22 +3649,26 @@ impl WeightInfo for () { /// Proof: `SubtensorModule::TotalStake` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::SubnetVolume` (r:2 w:2) /// Proof: `SubtensorModule::SubnetVolume` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `System::Account` (r:3 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(104), added: 2579, mode: `MaxEncodedLen`) /// Storage: `SubtensorModule::SubnetTaoFlow` (r:2 w:2) /// Proof: `SubtensorModule::SubnetTaoFlow` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `SubtensorModule::StakingHotkeys` (r:1 w:0) - /// Proof: `SubtensorModule::StakingHotkeys` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `SubtensorModule::TotalIssuance` (r:1 w:1) - /// Proof: `SubtensorModule::TotalIssuance` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::MaturityRate` (r:1 w:0) + /// Proof: `SubtensorModule::MaturityRate` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::UnlockRate` (r:1 w:0) + /// Proof: `SubtensorModule::UnlockRate` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::HotkeyLock` (r:1 w:1) + /// Proof: `SubtensorModule::HotkeyLock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::LastColdkeyHotkeyStakeBlock` (r:0 w:1) /// Proof: `SubtensorModule::LastColdkeyHotkeyStakeBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) fn swap_stake() -> Weight { // Proof Size summary in bytes: - // Measured: `2421` - // Estimated: `8556` - // Minimum execution time: 402_808_000 picoseconds. - Weight::from_parts(420_035_000, 8556) - .saturating_add(RocksDbWeight::get().reads(42_u64)) - .saturating_add(RocksDbWeight::get().writes(23_u64)) + // Measured: `2785` + // Estimated: `11200` + // Minimum execution time: 599_358_000 picoseconds. + Weight::from_parts(619_795_000, 11200) + .saturating_add(RocksDbWeight::get().reads(48_u64)) + .saturating_add(RocksDbWeight::get().writes(25_u64)) } /// Storage: `SubtensorModule::NetworksAdded` (r:1 w:0) /// Proof: `SubtensorModule::NetworksAdded` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -3551,8 +3696,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1084` // Estimated: `4549` - // Minimum execution time: 125_634_000 picoseconds. - Weight::from_parts(128_289_000, 4549) + // Minimum execution time: 122_378_000 picoseconds. + Weight::from_parts(123_540_000, 4549) .saturating_add(RocksDbWeight::get().reads(11_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -3592,8 +3737,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1416` // Estimated: `7356` - // Minimum execution time: 100_718_000 picoseconds. - Weight::from_parts(101_739_000, 7356) + // Minimum execution time: 100_217_000 picoseconds. + Weight::from_parts(101_349_000, 7356) .saturating_add(RocksDbWeight::get().reads(16_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -3609,8 +3754,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `793` // Estimated: `4258` - // Minimum execution time: 28_653_000 picoseconds. - Weight::from_parts(29_064_000, 4258) + // Minimum execution time: 28_072_000 picoseconds. + Weight::from_parts(28_905_000, 4258) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -3628,8 +3773,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `886` // Estimated: `4351` - // Minimum execution time: 35_276_000 picoseconds. - Weight::from_parts(36_067_000, 4351) + // Minimum execution time: 35_146_000 picoseconds. + Weight::from_parts(35_937_000, 4351) .saturating_add(RocksDbWeight::get().reads(5_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -3675,6 +3820,8 @@ impl WeightInfo for () { /// Proof: `SubtensorModule::ActivityCutoff` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::RegistrationsThisInterval` (r:1 w:1) /// Proof: `SubtensorModule::RegistrationsThisInterval` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(104), added: 2579, mode: `MaxEncodedLen`) /// Storage: `SubtensorModule::OwnedHotkeys` (r:1 w:1) /// Proof: `SubtensorModule::OwnedHotkeys` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::StakingHotkeys` (r:1 w:1) @@ -3707,8 +3854,6 @@ impl WeightInfo for () { /// Proof: `SubtensorModule::Keys` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::Burn` (r:0 w:1) /// Proof: `SubtensorModule::Burn` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `SubtensorModule::RAORecycledForRegistration` (r:0 w:1) - /// Proof: `SubtensorModule::RAORecycledForRegistration` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::SubnetLocked` (r:0 w:1) /// Proof: `SubtensorModule::SubnetLocked` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::NetworkRegisteredAt` (r:0 w:1) @@ -3747,8 +3892,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1343` // Estimated: `9758` - // Minimum execution time: 247_121_000 picoseconds. - Weight::from_parts(250_386_000, 9758) + // Minimum execution time: 276_175_000 picoseconds. + Weight::from_parts(281_044_000, 9758) .saturating_add(RocksDbWeight::get().reads(41_u64)) .saturating_add(RocksDbWeight::get().writes(46_u64)) } @@ -3762,8 +3907,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `762` // Estimated: `6702` - // Minimum execution time: 33_723_000 picoseconds. - Weight::from_parts(34_675_000, 6702) + // Minimum execution time: 34_585_000 picoseconds. + Weight::from_parts(35_195_000, 6702) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -3777,8 +3922,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `842` // Estimated: `6782` - // Minimum execution time: 30_918_000 picoseconds. - Weight::from_parts(31_589_000, 6782) + // Minimum execution time: 31_539_000 picoseconds. + Weight::from_parts(32_150_000, 6782) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -3790,7 +3935,7 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `595` // Estimated: `4060` - // Minimum execution time: 17_742_000 picoseconds. + // Minimum execution time: 17_543_000 picoseconds. Weight::from_parts(18_184_000, 4060) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) @@ -3813,10 +3958,12 @@ impl WeightInfo for () { /// Proof: `SubtensorModule::Alpha` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::AlphaV2` (r:9 w:8) /// Proof: `SubtensorModule::AlphaV2` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `SubtensorModule::OwnedHotkeys` (r:1 w:1) - /// Proof: `SubtensorModule::OwnedHotkeys` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::NetworksAdded` (r:6 w:0) /// Proof: `SubtensorModule::NetworksAdded` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::HotkeyLock` (r:5 w:0) + /// Proof: `SubtensorModule::HotkeyLock` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::OwnedHotkeys` (r:1 w:1) + /// Proof: `SubtensorModule::OwnedHotkeys` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::ChildKeys` (r:10 w:10) /// Proof: `SubtensorModule::ChildKeys` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::ParentKeys` (r:10 w:10) @@ -3863,9 +4010,9 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `3026` // Estimated: `28766` - // Minimum execution time: 1_148_985_000 picoseconds. - Weight::from_parts(1_154_584_000, 28766) - .saturating_add(RocksDbWeight::get().reads(161_u64)) + // Minimum execution time: 1_138_432_000 picoseconds. + Weight::from_parts(1_146_287_000, 28766) + .saturating_add(RocksDbWeight::get().reads(166_u64)) .saturating_add(RocksDbWeight::get().writes(95_u64)) } /// Storage: `SubtensorModule::Owner` (r:1 w:1) @@ -3878,8 +4025,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `745` // Estimated: `4210` - // Minimum execution time: 23_784_000 picoseconds. - Weight::from_parts(24_406_000, 4210) + // Minimum execution time: 23_844_000 picoseconds. + Weight::from_parts(24_556_000, 4210) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -3893,8 +4040,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `740` // Estimated: `9155` - // Minimum execution time: 26_539_000 picoseconds. - Weight::from_parts(27_602_000, 9155) + // Minimum execution time: 26_440_000 picoseconds. + Weight::from_parts(26_900_000, 9155) .saturating_add(RocksDbWeight::get().reads(6_u64)) } /// Storage: `SubtensorModule::Owner` (r:1 w:0) @@ -3933,6 +4080,10 @@ impl WeightInfo for () { /// Proof: `Swap::FeeRate` (`max_values`: None, `max_size`: Some(12), added: 2487, mode: `MaxEncodedLen`) /// Storage: `Swap::CurrentLiquidity` (r:1 w:0) /// Proof: `Swap::CurrentLiquidity` (`max_values`: None, `max_size`: Some(18), added: 2493, mode: `MaxEncodedLen`) + /// Storage: `SubtensorModule::StakingHotkeys` (r:1 w:0) + /// Proof: `SubtensorModule::StakingHotkeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::Lock` (r:2 w:0) + /// Proof: `SubtensorModule::Lock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::SubnetAlphaIn` (r:2 w:2) /// Proof: `SubtensorModule::SubnetAlphaIn` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::SubnetAlphaOut` (r:2 w:2) @@ -3941,12 +4092,10 @@ impl WeightInfo for () { /// Proof: `SubtensorModule::TotalStake` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::SubnetVolume` (r:2 w:2) /// Proof: `SubtensorModule::SubnetVolume` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `System::Account` (r:4 w:3) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(104), added: 2579, mode: `MaxEncodedLen`) /// Storage: `SubtensorModule::SubnetTaoFlow` (r:2 w:2) /// Proof: `SubtensorModule::SubnetTaoFlow` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `SubtensorModule::StakingHotkeys` (r:1 w:0) - /// Proof: `SubtensorModule::StakingHotkeys` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `SubtensorModule::TotalIssuance` (r:1 w:1) - /// Proof: `SubtensorModule::TotalIssuance` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::RootClaimable` (r:1 w:0) /// Proof: `SubtensorModule::RootClaimable` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::StakingColdkeys` (r:1 w:1) @@ -3959,11 +4108,11 @@ impl WeightInfo for () { /// Proof: `SubtensorModule::LastColdkeyHotkeyStakeBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) fn unstake_all_alpha() -> Weight { // Proof Size summary in bytes: - // Measured: `2372` - // Estimated: `10787` - // Minimum execution time: 414_015_000 picoseconds. - Weight::from_parts(427_445_000, 10787) - .saturating_add(RocksDbWeight::get().reads(47_u64)) + // Measured: `2614` + // Estimated: `11306` + // Minimum execution time: 573_750_000 picoseconds. + Weight::from_parts(578_749_000, 11306) + .saturating_add(RocksDbWeight::get().reads(49_u64)) .saturating_add(RocksDbWeight::get().writes(26_u64)) } /// Storage: `SubtensorModule::Alpha` (r:1 w:0) @@ -4000,6 +4149,10 @@ impl WeightInfo for () { /// Proof: `SubtensorModule::StakingOperationRateLimiter` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::Owner` (r:1 w:0) /// Proof: `SubtensorModule::Owner` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::StakingHotkeys` (r:1 w:0) + /// Proof: `SubtensorModule::StakingHotkeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::Lock` (r:1 w:0) + /// Proof: `SubtensorModule::Lock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::SubnetAlphaIn` (r:1 w:1) /// Proof: `SubtensorModule::SubnetAlphaIn` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::SubnetAlphaOut` (r:1 w:1) @@ -4008,21 +4161,21 @@ impl WeightInfo for () { /// Proof: `SubtensorModule::TotalStake` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::SubnetVolume` (r:1 w:1) /// Proof: `SubtensorModule::SubnetVolume` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(104), added: 2579, mode: `MaxEncodedLen`) /// Storage: `SubtensorModule::SubnetTaoFlow` (r:1 w:1) /// Proof: `SubtensorModule::SubnetTaoFlow` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `System::Account` (r:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(104), added: 2579, mode: `MaxEncodedLen`) /// Storage: `SubtensorModule::StakeThreshold` (r:1 w:0) /// Proof: `SubtensorModule::StakeThreshold` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::LastColdkeyHotkeyStakeBlock` (r:0 w:1) /// Proof: `SubtensorModule::LastColdkeyHotkeyStakeBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) fn remove_stake_full_limit() -> Weight { // Proof Size summary in bytes: - // Measured: `2211` - // Estimated: `10626` - // Minimum execution time: 412_223_000 picoseconds. - Weight::from_parts(430_190_000, 10626) - .saturating_add(RocksDbWeight::get().reads(31_u64)) + // Measured: `2536` + // Estimated: `10951` + // Minimum execution time: 477_430_000 picoseconds. + Weight::from_parts(488_440_000, 10951) + .saturating_add(RocksDbWeight::get().reads(33_u64)) .saturating_add(RocksDbWeight::get().writes(14_u64)) } /// Storage: `Crowdloan::CurrentCrowdloanId` (r:1 w:0) @@ -4031,7 +4184,7 @@ impl WeightInfo for () { /// Proof: `Crowdloan::Crowdloans` (`max_values`: None, `max_size`: Some(282), added: 2757, mode: `MaxEncodedLen`) /// Storage: `SubtensorModule::NextSubnetLeaseId` (r:1 w:1) /// Proof: `SubtensorModule::NextSubnetLeaseId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `System::Account` (r:502 w:502) + /// Storage: `System::Account` (r:503 w:503) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(104), added: 2579, mode: `MaxEncodedLen`) /// Storage: `SubtensorModule::Owner` (r:1 w:1) /// Proof: `SubtensorModule::Owner` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -4113,8 +4266,6 @@ impl WeightInfo for () { /// Proof: `Crowdloan::Contributions` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) /// Storage: `SubtensorModule::Burn` (r:0 w:1) /// Proof: `SubtensorModule::Burn` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `SubtensorModule::RAORecycledForRegistration` (r:0 w:1) - /// Proof: `SubtensorModule::RAORecycledForRegistration` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::SubnetUidToLeaseId` (r:0 w:1) /// Proof: `SubtensorModule::SubnetUidToLeaseId` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::SubnetLocked` (r:0 w:1) @@ -4160,10 +4311,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1762 + k * (44 ±0)` // Estimated: `10183 + k * (2579 ±0)` - // Minimum execution time: 460_608_000 picoseconds. - Weight::from_parts(288_591_956, 10183) - // Standard Error: 49_874 - .saturating_add(Weight::from_parts(46_601_875, 0).saturating_mul(k.into())) + // Minimum execution time: 464_997_000 picoseconds. + Weight::from_parts(289_483_511, 10183) + // Standard Error: 31_251 + .saturating_add(Weight::from_parts(44_721_932, 0).saturating_mul(k.into())) .saturating_add(RocksDbWeight::get().reads(51_u64)) .saturating_add(RocksDbWeight::get().reads((2_u64).saturating_mul(k.into()))) .saturating_add(RocksDbWeight::get().writes(52_u64)) @@ -4193,10 +4344,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1447 + k * (53 ±0)` // Estimated: `6148 + k * (2514 ±0)` - // Minimum execution time: 91_881_000 picoseconds. - Weight::from_parts(76_151_337, 6148) - // Standard Error: 6_935 - .saturating_add(Weight::from_parts(1_611_715, 0).saturating_mul(k.into())) + // Minimum execution time: 108_031_000 picoseconds. + Weight::from_parts(85_510_917, 6148) + // Standard Error: 8_550 + .saturating_add(Weight::from_parts(1_534_915, 0).saturating_mul(k.into())) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(k.into()))) .saturating_add(RocksDbWeight::get().writes(7_u64)) @@ -4211,8 +4362,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `649` // Estimated: `9064` - // Minimum execution time: 28_173_000 picoseconds. - Weight::from_parts(29_054_000, 9064) + // Minimum execution time: 28_012_000 picoseconds. + Weight::from_parts(29_235_000, 9064) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -4240,8 +4391,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1060` // Estimated: `4525` - // Minimum execution time: 74_899_000 picoseconds. - Weight::from_parts(76_262_000, 4525) + // Minimum execution time: 74_398_000 picoseconds. + Weight::from_parts(75_631_000, 4525) .saturating_add(RocksDbWeight::get().reads(10_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -4257,8 +4408,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `799` // Estimated: `4264` - // Minimum execution time: 33_833_000 picoseconds. - Weight::from_parts(34_534_000, 4264) + // Minimum execution time: 33_572_000 picoseconds. + Weight::from_parts(34_244_000, 4264) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -4274,8 +4425,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `476` // Estimated: `3941` - // Minimum execution time: 17_713_000 picoseconds. - Weight::from_parts(18_294_000, 3941) + // Minimum execution time: 17_262_000 picoseconds. + Weight::from_parts(18_184_000, 3941) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } @@ -4305,8 +4456,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1908` // Estimated: `7848` - // Minimum execution time: 134_892_000 picoseconds. - Weight::from_parts(137_416_000, 7848) + // Minimum execution time: 132_567_000 picoseconds. + Weight::from_parts(135_243_000, 7848) .saturating_add(RocksDbWeight::get().reads(16_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } @@ -4316,8 +4467,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_734_000 picoseconds. - Weight::from_parts(2_865_000, 0) + // Minimum execution time: 2_715_000 picoseconds. + Weight::from_parts(2_915_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::RootClaimableThreshold` (r:0 w:1) @@ -4326,8 +4477,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_290_000 picoseconds. - Weight::from_parts(5_831_000, 0) + // Minimum execution time: 5_490_000 picoseconds. + Weight::from_parts(5_791_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::Owner` (r:1 w:0) @@ -4340,17 +4491,11 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `852` // Estimated: `4317` - // Minimum execution time: 26_740_000 picoseconds. - Weight::from_parts(27_722_000, 4317) + // Minimum execution time: 26_931_000 picoseconds. + Weight::from_parts(27_972_000, 4317) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } - /// Storage: `SubtensorModule::SubnetOwner` (r:1 w:0) - /// Proof: `SubtensorModule::SubnetOwner` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `SubtensorModule::LastRateLimitedBlock` (r:1 w:1) - /// Proof: `SubtensorModule::LastRateLimitedBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `SubtensorModule::Tempo` (r:1 w:0) - /// Proof: `SubtensorModule::Tempo` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::SubnetMechanism` (r:1 w:0) /// Proof: `SubtensorModule::SubnetMechanism` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::SubnetAlphaIn` (r:1 w:1) @@ -4373,7 +4518,7 @@ impl WeightInfo for () { /// Proof: `SubtensorModule::NetworksAdded` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::SubtokenEnabled` (r:1 w:0) /// Proof: `SubtensorModule::SubtokenEnabled` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `System::Account` (r:1 w:1) + /// Storage: `System::Account` (r:3 w:3) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(104), added: 2579, mode: `MaxEncodedLen`) /// Storage: `SubtensorModule::Owner` (r:1 w:0) /// Proof: `SubtensorModule::Owner` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -4397,21 +4542,27 @@ impl WeightInfo for () { /// Proof: `SubtensorModule::Alpha` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::AlphaV2` (r:1 w:1) /// Proof: `SubtensorModule::AlphaV2` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `SubtensorModule::TotalIssuance` (r:1 w:1) - /// Proof: `SubtensorModule::TotalIssuance` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::SubnetTaoFlow` (r:1 w:1) /// Proof: `SubtensorModule::SubnetTaoFlow` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::Lock` (r:2 w:1) + /// Proof: `SubtensorModule::Lock` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::MaturityRate` (r:1 w:0) + /// Proof: `SubtensorModule::MaturityRate` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::UnlockRate` (r:1 w:0) + /// Proof: `SubtensorModule::UnlockRate` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::HotkeyLock` (r:1 w:1) + /// Proof: `SubtensorModule::HotkeyLock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::StakingOperationRateLimiter` (r:0 w:1) /// Proof: `SubtensorModule::StakingOperationRateLimiter` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::LastColdkeyHotkeyStakeBlock` (r:0 w:1) /// Proof: `SubtensorModule::LastColdkeyHotkeyStakeBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) fn add_stake_burn() -> Weight { // Proof Size summary in bytes: - // Measured: `2365` - // Estimated: `8556` - // Minimum execution time: 471_702_000 picoseconds. - Weight::from_parts(484_481_000, 8556) - .saturating_add(RocksDbWeight::get().reads(34_u64)) + // Measured: `2560` + // Estimated: `8727` + // Minimum execution time: 591_622_000 picoseconds. + Weight::from_parts(612_511_000, 8727) + .saturating_add(RocksDbWeight::get().reads(33_u64)) .saturating_add(RocksDbWeight::get().writes(18_u64)) } /// Storage: `SubtensorModule::PendingChildKeyCooldown` (r:0 w:1) @@ -4420,26 +4571,69 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_745_000 picoseconds. - Weight::from_parts(2_956_000, 0) + // Minimum execution time: 2_795_000 picoseconds. + Weight::from_parts(2_965_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } - - fn lock_stake() -> Weight { - Weight::from_parts(81_532_000, 4317) - .saturating_add(RocksDbWeight::get().reads(8_u64)) - .saturating_add(RocksDbWeight::get().writes(2_u64)) - } - - fn unlock_stake() -> Weight { - Weight::from_parts(81_532_000, 4317) - .saturating_add(RocksDbWeight::get().reads(8_u64)) - .saturating_add(RocksDbWeight::get().writes(2_u64)) - } - - fn move_lock() -> Weight { - Weight::from_parts(77_234_000, 4317) - .saturating_add(RocksDbWeight::get().reads(7_u64)) - .saturating_add(RocksDbWeight::get().writes(4_u64)) - } + /// Storage: `SubtensorModule::StakingHotkeys` (r:1 w:0) + /// Proof: `SubtensorModule::StakingHotkeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::Alpha` (r:1 w:0) + /// Proof: `SubtensorModule::Alpha` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::AlphaV2` (r:1 w:0) + /// Proof: `SubtensorModule::AlphaV2` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::TotalHotkeyAlpha` (r:1 w:0) + /// Proof: `SubtensorModule::TotalHotkeyAlpha` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::TotalHotkeyShares` (r:1 w:0) + /// Proof: `SubtensorModule::TotalHotkeyShares` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::TotalHotkeySharesV2` (r:1 w:0) + /// Proof: `SubtensorModule::TotalHotkeySharesV2` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::Lock` (r:1 w:1) + /// Proof: `SubtensorModule::Lock` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::HotkeyLock` (r:1 w:1) + /// Proof: `SubtensorModule::HotkeyLock` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn lock_stake() -> Weight { + // Proof Size summary in bytes: + // Measured: `1463` + // Estimated: `4928` + // Minimum execution time: 91_060_000 picoseconds. + Weight::from_parts(92_432_000, 4928) + .saturating_add(RocksDbWeight::get().reads(8_u64)) + .saturating_add(RocksDbWeight::get().writes(2_u64)) + } + /// Storage: `SubtensorModule::Lock` (r:2 w:1) + /// Proof: `SubtensorModule::Lock` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::MaturityRate` (r:1 w:0) + /// Proof: `SubtensorModule::MaturityRate` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::UnlockRate` (r:1 w:0) + /// Proof: `SubtensorModule::UnlockRate` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::HotkeyLock` (r:1 w:1) + /// Proof: `SubtensorModule::HotkeyLock` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn unlock_stake() -> Weight { + // Proof Size summary in bytes: + // Measured: `978` + // Estimated: `6918` + // Minimum execution time: 71_883_000 picoseconds. + Weight::from_parts(72_865_000, 6918) + .saturating_add(RocksDbWeight::get().reads(5_u64)) + .saturating_add(RocksDbWeight::get().writes(2_u64)) + } + /// Storage: `SubtensorModule::Lock` (r:2 w:2) + /// Proof: `SubtensorModule::Lock` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::Owner` (r:2 w:0) + /// Proof: `SubtensorModule::Owner` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::MaturityRate` (r:1 w:0) + /// Proof: `SubtensorModule::MaturityRate` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::UnlockRate` (r:1 w:0) + /// Proof: `SubtensorModule::UnlockRate` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::HotkeyLock` (r:2 w:2) + /// Proof: `SubtensorModule::HotkeyLock` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn move_lock() -> Weight { + // Proof Size summary in bytes: + // Measured: `1302` + // Estimated: `7242` + // Minimum execution time: 93_594_000 picoseconds. + Weight::from_parts(95_458_000, 7242) + .saturating_add(RocksDbWeight::get().reads(8_u64)) + .saturating_add(RocksDbWeight::get().writes(4_u64)) + } } diff --git a/pallets/utility/src/weights.rs b/pallets/utility/src/weights.rs index f5234ee528..462804199f 100644 --- a/pallets/utility/src/weights.rs +++ b/pallets/utility/src/weights.rs @@ -2,7 +2,7 @@ //! Autogenerated weights for `pallet_subtensor_utility` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 49.1.0 -//! DATE: 2026-04-23, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2026-05-05, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runnervmeorf1`, CPU: `AMD EPYC 7763 64-Core Processor` //! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: `1024` @@ -22,7 +22,7 @@ // --no-storage-info // --no-min-squares // --no-median-slopes -// --output=/tmp/tmp.KdzJkvj7lA +// --output=/tmp/tmp.4nwfKx4NPm // --template=/home/runner/work/subtensor/subtensor/.maintain/frame-weight-template.hbs #![cfg_attr(rustfmt, rustfmt_skip)] @@ -57,10 +57,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `518` // Estimated: `3983` - // Minimum execution time: 5_069_000 picoseconds. - Weight::from_parts(17_591_644, 3983) - // Standard Error: 2_161 - .saturating_add(Weight::from_parts(5_615_733, 0).saturating_mul(c.into())) + // Minimum execution time: 4_859_000 picoseconds. + Weight::from_parts(28_407_150, 3983) + // Standard Error: 6_395 + .saturating_add(Weight::from_parts(5_254_263, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(2_u64)) } /// Storage: `SafeMode::EnteredUntil` (r:1 w:0) @@ -71,8 +71,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `518` // Estimated: `3983` - // Minimum execution time: 15_228_000 picoseconds. - Weight::from_parts(15_679_000, 3983) + // Minimum execution time: 14_828_000 picoseconds. + Weight::from_parts(15_318_000, 3983) .saturating_add(T::DbWeight::get().reads(2_u64)) } /// Storage: `SafeMode::EnteredUntil` (r:1 w:0) @@ -84,18 +84,18 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `518` // Estimated: `3983` - // Minimum execution time: 5_110_000 picoseconds. - Weight::from_parts(17_036_214, 3983) - // Standard Error: 2_084 - .saturating_add(Weight::from_parts(5_820_595, 0).saturating_mul(c.into())) + // Minimum execution time: 4_528_000 picoseconds. + Weight::from_parts(18_871_700, 3983) + // Standard Error: 1_818 + .saturating_add(Weight::from_parts(5_525_521, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(2_u64)) } fn dispatch_as() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_962_000 picoseconds. - Weight::from_parts(7_233_000, 0) + // Minimum execution time: 6_562_000 picoseconds. + Weight::from_parts(6_823_000, 0) } /// Storage: `SafeMode::EnteredUntil` (r:1 w:0) /// Proof: `SafeMode::EnteredUntil` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) @@ -106,18 +106,18 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `518` // Estimated: `3983` - // Minimum execution time: 5_019_000 picoseconds. - Weight::from_parts(16_701_377, 3983) - // Standard Error: 2_713 - .saturating_add(Weight::from_parts(5_639_027, 0).saturating_mul(c.into())) + // Minimum execution time: 4_939_000 picoseconds. + Weight::from_parts(12_544_904, 3983) + // Standard Error: 3_006 + .saturating_add(Weight::from_parts(5_296_996, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(2_u64)) } fn dispatch_as_fallible() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_943_000 picoseconds. - Weight::from_parts(7_243_000, 0) + // Minimum execution time: 6_472_000 picoseconds. + Weight::from_parts(6_862_000, 0) } /// Storage: `SafeMode::EnteredUntil` (r:1 w:0) /// Proof: `SafeMode::EnteredUntil` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) @@ -127,8 +127,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `518` // Estimated: `3983` - // Minimum execution time: 21_730_000 picoseconds. - Weight::from_parts(22_171_000, 3983) + // Minimum execution time: 21_039_000 picoseconds. + Weight::from_parts(21_600_000, 3983) .saturating_add(T::DbWeight::get().reads(2_u64)) } } @@ -144,10 +144,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `518` // Estimated: `3983` - // Minimum execution time: 5_069_000 picoseconds. - Weight::from_parts(17_591_644, 3983) - // Standard Error: 2_161 - .saturating_add(Weight::from_parts(5_615_733, 0).saturating_mul(c.into())) + // Minimum execution time: 4_859_000 picoseconds. + Weight::from_parts(28_407_150, 3983) + // Standard Error: 6_395 + .saturating_add(Weight::from_parts(5_254_263, 0).saturating_mul(c.into())) .saturating_add(RocksDbWeight::get().reads(2_u64)) } /// Storage: `SafeMode::EnteredUntil` (r:1 w:0) @@ -158,8 +158,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `518` // Estimated: `3983` - // Minimum execution time: 15_228_000 picoseconds. - Weight::from_parts(15_679_000, 3983) + // Minimum execution time: 14_828_000 picoseconds. + Weight::from_parts(15_318_000, 3983) .saturating_add(RocksDbWeight::get().reads(2_u64)) } /// Storage: `SafeMode::EnteredUntil` (r:1 w:0) @@ -171,18 +171,18 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `518` // Estimated: `3983` - // Minimum execution time: 5_110_000 picoseconds. - Weight::from_parts(17_036_214, 3983) - // Standard Error: 2_084 - .saturating_add(Weight::from_parts(5_820_595, 0).saturating_mul(c.into())) + // Minimum execution time: 4_528_000 picoseconds. + Weight::from_parts(18_871_700, 3983) + // Standard Error: 1_818 + .saturating_add(Weight::from_parts(5_525_521, 0).saturating_mul(c.into())) .saturating_add(RocksDbWeight::get().reads(2_u64)) } fn dispatch_as() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_962_000 picoseconds. - Weight::from_parts(7_233_000, 0) + // Minimum execution time: 6_562_000 picoseconds. + Weight::from_parts(6_823_000, 0) } /// Storage: `SafeMode::EnteredUntil` (r:1 w:0) /// Proof: `SafeMode::EnteredUntil` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) @@ -193,18 +193,18 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `518` // Estimated: `3983` - // Minimum execution time: 5_019_000 picoseconds. - Weight::from_parts(16_701_377, 3983) - // Standard Error: 2_713 - .saturating_add(Weight::from_parts(5_639_027, 0).saturating_mul(c.into())) + // Minimum execution time: 4_939_000 picoseconds. + Weight::from_parts(12_544_904, 3983) + // Standard Error: 3_006 + .saturating_add(Weight::from_parts(5_296_996, 0).saturating_mul(c.into())) .saturating_add(RocksDbWeight::get().reads(2_u64)) } fn dispatch_as_fallible() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_943_000 picoseconds. - Weight::from_parts(7_243_000, 0) + // Minimum execution time: 6_472_000 picoseconds. + Weight::from_parts(6_862_000, 0) } /// Storage: `SafeMode::EnteredUntil` (r:1 w:0) /// Proof: `SafeMode::EnteredUntil` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) @@ -214,8 +214,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `518` // Estimated: `3983` - // Minimum execution time: 21_730_000 picoseconds. - Weight::from_parts(22_171_000, 3983) + // Minimum execution time: 21_039_000 picoseconds. + Weight::from_parts(21_600_000, 3983) .saturating_add(RocksDbWeight::get().reads(2_u64)) } } From e9ce66e727962daa81b6d00eb1d1b837dfff4e9f Mon Sep 17 00:00:00 2001 From: open-junius Date: Wed, 6 May 2026 07:41:51 +0800 Subject: [PATCH 11/11] rename one test --- pallets/subtensor/src/tests/recycle_alpha.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pallets/subtensor/src/tests/recycle_alpha.rs b/pallets/subtensor/src/tests/recycle_alpha.rs index a78c4ab5ee..3da1112972 100644 --- a/pallets/subtensor/src/tests/recycle_alpha.rs +++ b/pallets/subtensor/src/tests/recycle_alpha.rs @@ -774,7 +774,7 @@ fn test_add_stake_burn_with_limit_success() { } #[test] -fn test_add_stake_burn_non_owner_success() { +fn test_add_stake_burn_non_owner_succeeds() { new_test_ext(1).execute_with(|| { let hotkey_account_id = U256::from(1); let coldkey_account_id = U256::from(2);