From 061559c23cd391e3db1be0cf19e4c441c04692f6 Mon Sep 17 00:00:00 2001 From: Greg Zaitsev Date: Mon, 22 Jun 2026 22:02:35 +0300 Subject: [PATCH 01/13] Trim account flags PR to main changes --- .../subtensor/src/coinbase/run_coinbase.rs | 14 +- .../src/coinbase/subnet_emissions.rs | 12 +- pallets/subtensor/src/lib.rs | 8 + pallets/subtensor/src/macros/dispatches.rs | 25 +++ pallets/subtensor/src/macros/errors.rs | 2 + pallets/subtensor/src/macros/events.rs | 8 + pallets/subtensor/src/staking/lock.rs | 55 +++++- pallets/subtensor/src/tests/claim_root.rs | 14 +- pallets/subtensor/src/tests/coinbase.rs | 182 +++++++++-------- pallets/subtensor/src/tests/locks.rs | 185 ++++++++++++++++++ .../subtensor/src/tests/subnet_emissions.rs | 120 ------------ pallets/subtensor/src/weights.rs | 8 +- 12 files changed, 403 insertions(+), 230 deletions(-) diff --git a/pallets/subtensor/src/coinbase/run_coinbase.rs b/pallets/subtensor/src/coinbase/run_coinbase.rs index a6c988feea..e372d70407 100644 --- a/pallets/subtensor/src/coinbase/run_coinbase.rs +++ b/pallets/subtensor/src/coinbase/run_coinbase.rs @@ -187,11 +187,6 @@ impl Pallet { let mut alpha_in: BTreeMap = BTreeMap::new(); let mut alpha_out: BTreeMap = BTreeMap::new(); let mut excess_tao: BTreeMap = BTreeMap::new(); - let tao_block_emission: U96F32 = U96F32::saturating_from_num( - Self::calculate_block_emission() - .unwrap_or(TaoBalance::ZERO) - .to_u64(), - ); // Only calculate for subnets that we are emitting to. for (&netuid_i, &tao_emission_i) in subnet_emissions.iter() { @@ -210,7 +205,14 @@ impl Pallet { let alpha_out_i: U96F32 = alpha_emission_i; let mut alpha_in_i: U96F32 = tao_emission_i.safe_div_or(price_i, U96F32::from_num(0.0)); - let alpha_injection_cap: U96F32 = alpha_emission_i.min(tao_block_emission); + // Cap alpha injection by the subnet's root proportion of its alpha emission. + // root_proportion = tao_weight / (tao_weight + alpha_issuance), so as a subnet + // ages its alpha issuance grows, root_proportion shrinks, and the injection cap + // falls. The TAO emission that can no longer be injected as liquidity becomes + // excess TAO and is routed into chain buys instead. This is what transitions + // older subnets from liquidity injection to chain buys over time. + let root_proportion_i: U96F32 = Self::root_proportion(netuid_i); + let alpha_injection_cap: U96F32 = root_proportion_i.saturating_mul(alpha_emission_i); if alpha_in_i > alpha_injection_cap { alpha_in_i = alpha_injection_cap; tao_in_i = alpha_in_i.saturating_mul(price_i); diff --git a/pallets/subtensor/src/coinbase/subnet_emissions.rs b/pallets/subtensor/src/coinbase/subnet_emissions.rs index 63dbf36e5a..7599d27a62 100644 --- a/pallets/subtensor/src/coinbase/subnet_emissions.rs +++ b/pallets/subtensor/src/coinbase/subnet_emissions.rs @@ -329,14 +329,16 @@ impl Pallet { offset_flows } - // Combines ema price method and tao flow method linearly over FlowHalfLife blocks + // Price-based emission shares: each subnet's share is its EMA price normalized + // by the sum of EMA prices. Emit-disabled subnets are zeroed and their share + // redistributed to enabled subnets in `get_subnet_block_emissions`, so the + // effective emission is e_i = p_i / sum(p_j) over emit-enabled subnets. pub(crate) fn get_shares(subnets_to_emit_to: &[NetUid]) -> BTreeMap { - Self::get_shares_flow(subnets_to_emit_to) - // Self::get_shares_price_ema(subnets_to_emit_to) + Self::get_shares_price_ema(subnets_to_emit_to) } - // DEPRECATED: Implementation of shares that uses EMA prices will be gradually deprecated - #[allow(dead_code)] + // Implementation of shares that uses subnet EMA prices (SubnetMovingPrice), + // not the active/spot alpha price. fn get_shares_price_ema(subnets_to_emit_to: &[NetUid]) -> BTreeMap { // Get sum of alpha moving prices let total_moving_prices = subnets_to_emit_to diff --git a/pallets/subtensor/src/lib.rs b/pallets/subtensor/src/lib.rs index 97ba77a92a..4058ff983f 100644 --- a/pallets/subtensor/src/lib.rs +++ b/pallets/subtensor/src/lib.rs @@ -69,6 +69,9 @@ pub const MAX_SUBNET_CLAIMS: usize = 5; pub const MAX_ROOT_CLAIM_THRESHOLD: u64 = 10_000_000; +/// Account flag bit that opts into receiving locked alpha transfers. +pub const ACCOUNT_FLAGS_ACCEPT_LOCKED_ALPHA: u128 = 1u128 << 0; + #[allow(deprecated)] #[deny(missing_docs)] #[import_section(errors::errors)] @@ -1186,6 +1189,11 @@ pub mod pallet { pub type Owner = StorageMap<_, Blake2_128Concat, T::AccountId, T::AccountId, ValueQuery, DefaultAccount>; + /// MAP ( coldkey ) --> flags | Account-level flags. Defaults to zero. + #[pallet::storage] + pub type AccountFlags = + StorageMap<_, Blake2_128Concat, T::AccountId, u128, ValueQuery>; + /// MAP ( hot ) --> take | Returns the hotkey delegation take. And signals that this key is open for delegation #[pallet::storage] pub type Delegates = diff --git a/pallets/subtensor/src/macros/dispatches.rs b/pallets/subtensor/src/macros/dispatches.rs index b471328aec..0e5a386529 100644 --- a/pallets/subtensor/src/macros/dispatches.rs +++ b/pallets/subtensor/src/macros/dispatches.rs @@ -2593,5 +2593,30 @@ mod dispatches { let coldkey = ensure_signed(origin)?; Self::do_set_perpetual_lock(&coldkey, netuid, enabled) } + /// Sets or clears whether the caller rejects incoming locked alpha. + /// + /// Coldkeys reject locked alpha by default. Passing `false` opts the + /// caller into receiving locked alpha from stake transfers or coldkey + /// swaps. + #[pallet::call_index(139)] + #[pallet::weight(( + ::DbWeight::get().reads_writes(1, 1), + DispatchClass::Normal, + Pays::Yes + ))] + pub fn set_reject_locked_alpha(origin: OriginFor, enabled: bool) -> DispatchResult { + let coldkey = ensure_signed(origin)?; + AccountFlags::::mutate_exists(&coldkey, |maybe_flags| { + let mut flags = maybe_flags.unwrap_or_default(); + if enabled { + flags &= !crate::ACCOUNT_FLAGS_ACCEPT_LOCKED_ALPHA; + } else { + flags |= crate::ACCOUNT_FLAGS_ACCEPT_LOCKED_ALPHA; + } + *maybe_flags = if flags == 0 { None } else { Some(flags) }; + }); + Self::deposit_event(Event::RejectLockedAlphaUpdated { coldkey, enabled }); + Ok(()) + } } } diff --git a/pallets/subtensor/src/macros/errors.rs b/pallets/subtensor/src/macros/errors.rs index cb120b56b5..8b454d609c 100644 --- a/pallets/subtensor/src/macros/errors.rs +++ b/pallets/subtensor/src/macros/errors.rs @@ -305,5 +305,7 @@ mod errors { CannotUseSystemAccount, /// Trying to unlock more than locked UnlockAmountTooHigh, + /// The destination coldkey rejects incoming locked alpha. + AccountRejectsLockedAlpha, } } diff --git a/pallets/subtensor/src/macros/events.rs b/pallets/subtensor/src/macros/events.rs index 918baf1107..787b5b5503 100644 --- a/pallets/subtensor/src/macros/events.rs +++ b/pallets/subtensor/src/macros/events.rs @@ -631,5 +631,13 @@ mod events { /// Whether this coldkey's locks are now perpetual. enabled: bool, }, + + /// A coldkey's reject locked alpha account flag was updated. + RejectLockedAlphaUpdated { + /// The coldkey whose flag changed. + coldkey: T::AccountId, + /// Whether this coldkey rejects incoming locked alpha. + enabled: bool, + }, } } diff --git a/pallets/subtensor/src/staking/lock.rs b/pallets/subtensor/src/staking/lock.rs index aa4a6508ab..ae27614f14 100644 --- a/pallets/subtensor/src/staking/lock.rs +++ b/pallets/subtensor/src/staking/lock.rs @@ -444,6 +444,29 @@ impl ConvictionModel { } impl Pallet { + pub fn account_rejects_locked_alpha(coldkey: &T::AccountId) -> bool { + AccountFlags::::get(coldkey) & crate::ACCOUNT_FLAGS_ACCEPT_LOCKED_ALPHA != 1 + } + + pub fn ensure_can_receive_locked_alpha( + coldkey: &T::AccountId, + amount: AlphaBalance, + ) -> DispatchResult { + let rejects_locked_alpha = Self::account_rejects_locked_alpha(coldkey); + Self::ensure_can_receive_locked_alpha_with_flag(rejects_locked_alpha, amount) + } + + fn ensure_can_receive_locked_alpha_with_flag( + rejects_locked_alpha: bool, + amount: AlphaBalance, + ) -> DispatchResult { + if amount.is_zero() { + return Ok(()); + } + ensure!(!rejects_locked_alpha, Error::::AccountRejectsLockedAlpha); + Ok(()) + } + pub fn insert_lock_state( coldkey: &T::AccountId, netuid: NetUid, @@ -1331,32 +1354,51 @@ impl Pallet { Self::ensure_no_active_locks(new_coldkey)?; let mut locks_to_transfer: Vec<(NetUid, T::AccountId, LockState)> = Vec::new(); + let now = Self::get_current_block_as_u64(); + let unlock_rate = UnlockRate::::get(); + let maturity_rate = MaturityRate::::get(); + let new_coldkey_rejects_locked_alpha = Self::account_rejects_locked_alpha(new_coldkey); + let decaying_locks_to_transfer: Vec<(NetUid, bool)> = + DecayingLock::::iter_prefix(old_coldkey).collect(); // Gather locks for old coldkey for ((netuid, hotkey), lock) in Lock::::iter_prefix((old_coldkey,)) { locks_to_transfer.push((netuid, hotkey, lock)); } - // Remove locks for old coldkey and insert for new + for (netuid, decaying) in decaying_locks_to_transfer.iter() { + DecayingLock::::insert(new_coldkey, *netuid, *decaying); + } + + let mut rolled_locks_to_transfer: Vec<(NetUid, T::AccountId, LockState, bool)> = Vec::new(); for (netuid, hotkey, lock) in locks_to_transfer { - let now = Self::get_current_block_as_u64(); - let unlock_rate = UnlockRate::::get(); - let maturity_rate = MaturityRate::::get(); + let perpetual_lock = decaying_locks_to_transfer + .iter() + .any(|(decaying_netuid, decaying)| *decaying_netuid == netuid && !*decaying); let old_lock = ConvictionModel::roll_forward_lock( lock, now, unlock_rate, maturity_rate, Self::is_subnet_owner_hotkey(netuid, &hotkey), - Self::is_perpetual_lock(old_coldkey, netuid), + perpetual_lock, ); + Self::ensure_can_receive_locked_alpha_with_flag( + new_coldkey_rejects_locked_alpha, + old_lock.locked_mass, + )?; + rolled_locks_to_transfer.push((netuid, hotkey, old_lock, perpetual_lock)); + } + + // Remove locks for old coldkey and insert for new + for (netuid, hotkey, old_lock, perpetual_lock) in rolled_locks_to_transfer { let new_lock = ConvictionModel::roll_forward_lock( old_lock.clone(), now, unlock_rate, maturity_rate, Self::is_subnet_owner_hotkey(netuid, &hotkey), - Self::is_perpetual_lock(new_coldkey, netuid), + perpetual_lock, ); Lock::::remove((old_coldkey.clone(), netuid, hotkey.clone())); Self::reduce_aggregate_lock( @@ -1780,6 +1822,7 @@ impl Pallet { .conviction .saturating_add(conviction_transfer); } + Self::ensure_can_receive_locked_alpha(destination_coldkey, locked_transfer)?; source_lock = ConvictionModel::roll_forward_lock( source_lock, diff --git a/pallets/subtensor/src/tests/claim_root.rs b/pallets/subtensor/src/tests/claim_root.rs index 1b6b9d8c6b..4b75d164f4 100644 --- a/pallets/subtensor/src/tests/claim_root.rs +++ b/pallets/subtensor/src/tests/claim_root.rs @@ -1139,11 +1139,15 @@ fn test_claim_root_coinbase_distribution() { run_to_block(2); let alpha_issuance = SubtensorModule::get_alpha_issuance(netuid); - // We went two blocks so we should have 2x the alpha emissions - assert_eq!( - initial_alpha_issuance + alpha_emissions.saturating_mul(2.into()), - alpha_issuance - ); + // Net issuance grows by the block alpha emission (alpha_out) plus the + // root-proportion-capped alpha injection. Chain buys move alpha between the + // pool reserve and outstanding supply without changing net issuance, and with + // this subnet's small root proportion the injection is well under a second + // full emission. + let issuance_growth = + u64::from(alpha_issuance).saturating_sub(u64::from(initial_alpha_issuance)); + assert!(issuance_growth >= u64::from(alpha_emissions)); + assert!(issuance_growth < u64::from(alpha_emissions.saturating_mul(2.into()))); let root_prop = initial_tao as f64 / (u64::from(alpha_issuance) + initial_tao) as f64; let root_validators_share = 0.5f64; diff --git a/pallets/subtensor/src/tests/coinbase.rs b/pallets/subtensor/src/tests/coinbase.rs index 45260ef8fc..6b5857afcc 100644 --- a/pallets/subtensor/src/tests/coinbase.rs +++ b/pallets/subtensor/src/tests/coinbase.rs @@ -30,6 +30,19 @@ fn close(value: u64, target: u64, eps: u64) { ) } +/// Seed a large root stake with full TAO weight so that +/// `root_proportion = tao_weight / (tao_weight + alpha_issuance)` is ~1. +/// This keeps the alpha-injection cap (`root_proportion * alpha_emission`) from +/// spuriously binding for small per-subnet emissions, preserving the liquidity +/// injection behavior these tests were written for. +fn set_full_injection_root_stake() { + SubnetTAO::::insert( + NetUid::ROOT, + TaoBalance::from(1_000_000_000_000_000_000_u64), + ); + SubtensorModule::set_tao_weight(u64::MAX); +} + // SKIP_WASM_BUILD=1 RUST_LOG=debug cargo test --package pallet-subtensor --lib -- tests::coinbase::test_hotkey_take --exact --show-output --nocapture #[test] fn test_hotkey_take() { @@ -70,9 +83,11 @@ fn test_coinbase_tao_issuance_base() { let subnet_owner_ck = U256::from(1001); let subnet_owner_hk = U256::from(1002); let netuid = add_dynamic_network(&subnet_owner_hk, &subnet_owner_ck); + // Price-based emission shares require a non-zero moving price. + SubnetMovingPrice::::insert(netuid, I96F32::from_num(1)); + // Keep root_proportion ~1 so the injection cap does not bind. + set_full_injection_root_stake(); let total_issuance_before = TotalIssuance::::get(); - // Set subnet TAO flow to non-zero - SubnetTaoFlow::::insert(netuid, 1234567_i64); let tao_in_before = SubnetTAO::::get(netuid); let total_stake_before = TotalStake::::get(); let emission_credit = SubtensorModule::mint_tao(emission); @@ -248,43 +263,6 @@ fn test_coinbase_disabled_subnet_emission_redistributes_tao_to_enabled_subnets() }); } -#[test] -fn test_net_tao_flow_disabled_still_drains_protocol_flow_into_ema() { - new_test_ext(1).execute_with(|| { - let netuid1 = NetUid::from(1); - let netuid2 = NetUid::from(2); - - add_network(netuid1, 1, 0); - add_network(netuid2, 1, 0); - - NetTaoFlowEnabled::::set(false); - FlowEmaSmoothingFactor::::set(i64::MAX as u64); - - SubnetTaoFlow::::insert(netuid1, 1_000_i64); - SubnetTaoFlow::::insert(netuid2, 1_000_i64); - SubtensorModule::record_protocol_inflow(netuid1, 700.into()); - SubtensorModule::record_protocol_outflow(netuid2, 300.into()); - - System::set_block_number(1); - - SubtensorModule::get_subnet_block_emissions( - &[netuid1, netuid2], - U96F32::saturating_from_num(1_000_000u64), - ); - - assert_eq!(SubnetProtocolFlow::::get(netuid1), 0); - assert_eq!(SubnetProtocolFlow::::get(netuid2), 0); - assert_eq!( - SubnetEmaProtocolFlow::::get(netuid1), - Some((1, I64F64::from_num(700))) - ); - assert_eq!( - SubnetEmaProtocolFlow::::get(netuid2), - Some((1, I64F64::from_num(-300))) - ); - }); -} - #[test] fn test_sudo_set_subnet_emission_enabled_multiple_subnets_multiple_toggles() { new_test_ext(1).execute_with(|| { @@ -297,9 +275,9 @@ fn test_sudo_set_subnet_emission_enabled_multiple_subnets_multiple_toggles() { add_network(netuid2, 1, 0); add_network(netuid3, 1, 0); - SubnetTaoFlow::::insert(netuid1, 100_000_000_i64); - SubnetTaoFlow::::insert(netuid2, 100_000_000_i64); - SubnetTaoFlow::::insert(netuid3, 100_000_000_i64); + // Keep root_proportion ~1 so TAO-side emission is injected (populating + // SubnetTaoInEmission) rather than routed entirely to chain buys. + set_full_injection_root_stake(); let assert_emission_storage = |expected1: u64, expected2: u64, expected3: u64| { assert_abs_diff_eq!( @@ -417,10 +395,12 @@ fn test_coinbase_tao_issuance_different_prices() { SubnetMechanism::::insert(netuid1, 1); SubnetMechanism::::insert(netuid2, 1); - // Set subnet flows - // Subnet 2 has twice the flow of subnet 1. - SubnetTaoFlow::::insert(netuid1, 100_000_000_i64); - SubnetTaoFlow::::insert(netuid2, 200_000_000_i64); + // Price-based shares: subnet 2 has twice the moving price of subnet 1, + // so it should receive twice the TAO emission. + SubnetMovingPrice::::insert(netuid1, I96F32::from_num(0.1)); + SubnetMovingPrice::::insert(netuid2, I96F32::from_num(0.2)); + // Keep root_proportion ~1 so the injection cap does not bind. + set_full_injection_root_stake(); // Assert initial TAO reserves. assert_eq!(SubnetTAO::::get(netuid1), initial_tao.into()); @@ -668,9 +648,8 @@ fn test_coinbase_alpha_issuance_base() { SubnetAlphaIn::::insert(netuid1, AlphaBalance::from(initial)); SubnetTAO::::insert(netuid2, TaoBalance::from(initial)); SubnetAlphaIn::::insert(netuid2, AlphaBalance::from(initial)); - // Equal flow - SubnetTaoFlow::::insert(netuid1, 100_000_000_i64); - SubnetTaoFlow::::insert(netuid2, 100_000_000_i64); + // Keep root_proportion ~1 so the injection cap does not bind. + set_full_injection_root_stake(); // Check initial SubtensorModule::run_coinbase(emission_credit); // tao_in = 500_000 @@ -710,10 +689,11 @@ fn test_coinbase_alpha_issuance_different() { SubnetAlphaIn::::insert(netuid1, AlphaBalance::from(initial)); SubnetTAO::::insert(netuid2, TaoBalance::from(2 * initial)); SubnetAlphaIn::::insert(netuid2, AlphaBalance::from(initial)); - // Set subnet TAO flows to non-zero and 1:2 ratio - SubnetTaoFlow::::insert(netuid1, 100_000_000_i64); - SubnetTaoFlow::::insert(netuid2, 200_000_000_i64); - // Do NOT Set tao flow, let it initialize + // Price-based shares with prices 1 and 2 (1:2 ratio). + SubnetMovingPrice::::insert(netuid1, I96F32::from_num(1)); + SubnetMovingPrice::::insert(netuid2, I96F32::from_num(2)); + // Keep root_proportion ~1 so the injection cap does not bind. + set_full_injection_root_stake(); // Run coinbase SubtensorModule::run_coinbase(emission_credit); // tao_in = 333_333 @@ -754,16 +734,23 @@ fn test_coinbase_alpha_issuance_with_cap_trigger() { // Set subnet prices. SubnetMovingPrice::::insert(netuid1, I96F32::from_num(1)); SubnetMovingPrice::::insert(netuid2, I96F32::from_num(2)); + // Keep root_proportion ~1 so the injection cap binds at alpha_emission. + set_full_injection_root_stake(); // Run coinbase SubtensorModule::run_coinbase(emission_credit); - // tao_in = 333_333 - // alpha_in = 333_333/price > 1_000_000_000 --> 1_000_000_000 + initial_alpha + // alpha_in is capped at the injection cap, so injected alpha stays below + // a full block emission on top of the initial reserve. assert!(SubnetAlphaIn::::get(netuid1) < (initial_alpha + 1_000_000_000).into()); - assert_eq!(SubnetAlphaOut::::get(netuid2), 1_000_000_000.into()); - // tao_in = 666_666 - // alpha_in = 666_666/price > 1_000_000_000 --> 1_000_000_000 + initial_alpha + // Per-block alpha emission is the full block emission regardless of the cap. + assert_eq!( + SubnetAlphaOutEmission::::get(netuid1), + 1_000_000_000.into() + ); assert!(SubnetAlphaIn::::get(netuid2) < (initial_alpha + 1_000_000_000).into()); - assert_eq!(SubnetAlphaOut::::get(netuid2), 1_000_000_000.into()); // Gets full block emission. + assert_eq!( + SubnetAlphaOutEmission::::get(netuid2), + 1_000_000_000.into() + ); // Gets full block emission. }); } @@ -791,9 +778,10 @@ fn test_coinbase_alpha_issuance_with_cap_trigger_and_block_emission() { // Enable emission FirstEmissionBlockNumber::::insert(netuid1, 0); FirstEmissionBlockNumber::::insert(netuid2, 0); - // Set subnet TAO flows to non-zero and 1:2 ratio - SubnetTaoFlow::::insert(netuid1, 100_000_000_i64); - SubnetTaoFlow::::insert(netuid2, 200_000_000_i64); + // Price-based shares (1:2 ratio). Low pool prices mean alpha_in exceeds the + // injection cap, so the surplus TAO is spent on chain buys. + SubnetMovingPrice::::insert(netuid1, I96F32::from_num(1)); + SubnetMovingPrice::::insert(netuid2, I96F32::from_num(2)); // Force the swap to initialize SubtensorModule::swap_tao_for_alpha( @@ -2706,6 +2694,11 @@ fn test_distribute_emission_zero_emission() { Incentive::::remove(NetUidStorageIndex::from(netuid)); Dividends::::remove(netuid); + // Capture stake right before the zero-emission distribution so the assertion + // isolates that call (the subnet legitimately accrues emission during the + // preceding block runs under price-based shares). + let stake_before_distribute = SubtensorModule::get_total_stake_for_hotkey(&hotkey); + // Set the emission to be ZERO. SubtensorModule::distribute_emission( netuid, @@ -2717,8 +2710,8 @@ fn test_distribute_emission_zero_emission() { // Get the new stake of the hotkey. let new_stake = SubtensorModule::get_total_stake_for_hotkey(&hotkey); - // We expect the stake to remain unchanged. - assert_eq!(new_stake, init_stake.into()); + // We expect the stake to remain unchanged by the zero-emission distribution. + assert_eq!(new_stake, stake_before_distribute); // Check that the incentive and dividends are set by epoch. assert!( @@ -2962,8 +2955,10 @@ fn test_coinbase_v3_liquidity_update() { // Enable emissions and run coinbase (which will increase position liquidity) let emission: u64 = 1_234_567; let emission_credit = SubtensorModule::mint_tao(emission.into()); - // Set the TAO flow to non-zero - SubnetTaoFlow::::insert(netuid, 8348383_i64); + // Price-based emission shares require a non-zero moving price. + SubnetMovingPrice::::insert(netuid, I96F32::from_num(1)); + // Keep root_proportion ~1 so the injection cap does not bind. + set_full_injection_root_stake(); FirstEmissionBlockNumber::::insert(netuid, 0); SubtensorModule::run_coinbase(emission_credit); @@ -3625,11 +3620,17 @@ fn test_coinbase_subnet_terms_with_alpha_in_gt_alpha_emission() { let subnet_emissions = BTreeMap::from([(netuid0, tao_emission)]); + // The injection cap is root_proportion * alpha_emission. Seed root stake so + // root_proportion is well-defined and the cap is positive. + set_full_injection_root_stake(); + let root_prop: U96F32 = SubtensorModule::root_proportion(netuid0); + let injection_cap: U96F32 = root_prop.saturating_mul(alpha_emission); + let (tao_in, alpha_in, alpha_out, excess_tao) = SubtensorModule::get_subnet_terms(&subnet_emissions); - // Check our condition is met - assert!(tao_emission / price_to_set_fixed > alpha_emission); + // Check our condition is met: the raw alpha_in exceeds the cap, so it binds. + assert!(tao_emission / price_to_set_fixed > injection_cap); // alpha_out should be the alpha_emission, always assert_abs_diff_eq!( @@ -3638,11 +3639,11 @@ fn test_coinbase_subnet_terms_with_alpha_in_gt_alpha_emission() { epsilon = 0.01 ); - // alpha_in should equal the alpha_emission + // alpha_in should be capped at root_proportion * alpha_emission assert_abs_diff_eq!( alpha_in[&netuid0].to_num::(), - alpha_emission.to_num::(), - epsilon = 0.01 + injection_cap.to_num::(), + epsilon = injection_cap.to_num::() / 1_000.0 ); // tao_in should be the alpha_in at the ratio of the price assert_abs_diff_eq!( @@ -3687,11 +3688,17 @@ fn test_coinbase_subnet_terms_with_alpha_in_lte_alpha_emission() { let subnet_emissions = BTreeMap::from([(netuid0, tao_emission)]); + // The injection cap is root_proportion * alpha_emission. Seed root stake so + // the cap is large enough that raw alpha_in stays under it (no excess). + set_full_injection_root_stake(); + let root_prop: U96F32 = SubtensorModule::root_proportion(netuid0); + let injection_cap: U96F32 = root_prop.saturating_mul(alpha_emission); + let (tao_in, alpha_in, alpha_out, excess_tao) = SubtensorModule::get_subnet_terms(&subnet_emissions); - // Check our condition is met - assert!(tao_emission / price <= alpha_emission); + // Check our condition is met: raw alpha_in stays under the cap. + assert!(tao_emission / price <= injection_cap); // alpha_out should be the alpha_emission, always assert_abs_diff_eq!( @@ -4310,32 +4317,35 @@ fn test_get_subnet_terms_alpha_emissions_cap() { let owner_hotkey = U256::from(10); let owner_coldkey = U256::from(11); let netuid = add_dynamic_network(&owner_hotkey, &owner_coldkey); - let tao_block_emission: U96F32 = U96F32::saturating_from_num( - SubtensorModule::calculate_block_emission() - .unwrap_or(TaoBalance::ZERO) - .to_u64(), + + // The injection cap is now root_proportion * alpha_emission. Seed root stake + // so root_proportion is well-defined, and derive the cap from the live values. + set_full_injection_root_stake(); + let alpha_emission_i: U96F32 = U96F32::saturating_from_num( + SubtensorModule::get_block_emission_for_issuance( + SubtensorModule::get_alpha_issuance(netuid).into(), + ) + .unwrap_or(0), ); + let injection_cap: U96F32 = + SubtensorModule::root_proportion(netuid).saturating_mul(alpha_emission_i); - // price = 1.0 - // tao_block_emission = 1000000000 - // tao_block_emission == alpha_emission_i - // alpha_in_i <= alpha_injection_cap + // price = 1.0, alpha_in_i (== emissions1) <= alpha_injection_cap (not capped) let emissions1 = U96F32::from_num(100_000_000); + assert!(emissions1 < injection_cap); let subnet_emissions1 = BTreeMap::from([(netuid, emissions1)]); let (_, alpha_in, _, _) = SubtensorModule::get_subnet_terms(&subnet_emissions1); assert_eq!(alpha_in.get(&netuid).copied().unwrap(), emissions1); - // price = 1.0 - // tao_block_emission = 1000000000 - // tao_block_emission == alpha_emission_i - // alpha_in_i > alpha_injection_cap + // price = 1.0, alpha_in_i (== emissions2) > alpha_injection_cap (capped) let emissions2 = U96F32::from_num(10_000_000_000u64); + assert!(emissions2 > injection_cap); let subnet_emissions2 = BTreeMap::from([(netuid, emissions2)]); let (_, alpha_in, _, _) = SubtensorModule::get_subnet_terms(&subnet_emissions2); - assert_eq!(alpha_in.get(&netuid).copied().unwrap(), tao_block_emission); + assert_eq!(alpha_in.get(&netuid).copied().unwrap(), injection_cap); }); } diff --git a/pallets/subtensor/src/tests/locks.rs b/pallets/subtensor/src/tests/locks.rs index 91b87a634f..78573eac3b 100644 --- a/pallets/subtensor/src/tests/locks.rs +++ b/pallets/subtensor/src/tests/locks.rs @@ -6,6 +6,7 @@ )] use approx::assert_abs_diff_eq; +use frame_support::dispatch::{GetDispatchInfo, Pays}; use frame_support::weights::Weight; use frame_support::{assert_noop, assert_ok}; use safe_math::FixedExt; @@ -96,6 +97,40 @@ fn roll_forward_individual_lock( ) } +#[test] +fn test_account_flags_default_to_zero_and_reject_locked_alpha_setter_pays_fee() { + new_test_ext(1).execute_with(|| { + let coldkey = U256::from(1); + + assert_eq!(AccountFlags::::get(coldkey), 0); + assert!(!AccountFlags::::contains_key(coldkey)); + assert!(SubtensorModule::account_rejects_locked_alpha(&coldkey)); + + let call = + RuntimeCall::SubtensorModule(crate::Call::set_reject_locked_alpha { enabled: true }); + assert_eq!(call.get_dispatch_info().pays_fee, Pays::Yes); + + assert_ok!(SubtensorModule::set_reject_locked_alpha( + RuntimeOrigin::signed(coldkey), + false, + )); + assert_eq!( + AccountFlags::::get(coldkey), + ACCOUNT_FLAGS_ACCEPT_LOCKED_ALPHA + ); + assert!(AccountFlags::::contains_key(coldkey)); + assert!(!SubtensorModule::account_rejects_locked_alpha(&coldkey)); + + assert_ok!(SubtensorModule::set_reject_locked_alpha( + RuntimeOrigin::signed(coldkey), + true, + )); + assert_eq!(AccountFlags::::get(coldkey), 0); + assert!(!AccountFlags::::contains_key(coldkey)); + assert!(SubtensorModule::account_rejects_locked_alpha(&coldkey)); + }); +} + fn roll_forward_hotkey_lock(lock: LockState, now: u64) -> LockState { roll_forward_lock(lock, now, false, true) } @@ -1599,6 +1634,10 @@ fn test_do_transfer_stake_same_subnet_transfers_lock_to_destination_coldkey() { let hotkey = U256::from(2); let netuid = setup_subnet_with_stake(coldkey_sender, hotkey, 100_000_000_000); DecayingLock::::insert(coldkey_receiver, netuid, false); + assert_ok!(SubtensorModule::set_reject_locked_alpha( + RuntimeOrigin::signed(coldkey_receiver), + false, + )); let total = SubtensorModule::total_coldkey_alpha_on_subnet(&coldkey_sender, netuid); let lock_half = total / 2.into(); @@ -1694,6 +1733,101 @@ fn test_move_stake_cross_subnet_blocked_by_lock() { }); } +#[test] +fn test_do_transfer_stake_rejects_locked_alpha_to_flagged_destination() { + new_test_ext(1).execute_with(|| { + let coldkey_sender = U256::from(1); + let coldkey_receiver = U256::from(5); + let hotkey = U256::from(2); + let netuid = setup_subnet_with_stake(coldkey_sender, hotkey, 100_000_000_000); + + let total = SubtensorModule::total_coldkey_alpha_on_subnet(&coldkey_sender, netuid); + let lock_half = total / 2.into(); + assert_ok!(SubtensorModule::do_lock_stake( + &coldkey_sender, + netuid, + &hotkey, + lock_half, + )); + assert_ok!(SubtensorModule::set_reject_locked_alpha( + RuntimeOrigin::signed(coldkey_receiver), + true, + )); + + let sender_lock_before = + Lock::::get((coldkey_sender, netuid, hotkey)).expect("sender lock should exist"); + let sender_alpha_before = + SubtensorModule::total_coldkey_alpha_on_subnet(&coldkey_sender, netuid); + let receiver_alpha_before = + SubtensorModule::total_coldkey_alpha_on_subnet(&coldkey_receiver, netuid); + + assert_noop!( + SubtensorModule::do_transfer_stake( + RuntimeOrigin::signed(coldkey_sender), + coldkey_receiver, + hotkey, + netuid, + netuid, + total, + ), + Error::::AccountRejectsLockedAlpha + ); + + assert_eq!( + Lock::::get((coldkey_sender, netuid, hotkey)), + Some(sender_lock_before) + ); + assert!(Lock::::get((coldkey_receiver, netuid, hotkey)).is_none()); + assert_eq!( + SubtensorModule::total_coldkey_alpha_on_subnet(&coldkey_sender, netuid), + sender_alpha_before + ); + assert_eq!( + SubtensorModule::total_coldkey_alpha_on_subnet(&coldkey_receiver, netuid), + receiver_alpha_before + ); + }); +} + +#[test] +fn test_do_transfer_stake_allows_unlocked_alpha_to_flagged_destination() { + new_test_ext(1).execute_with(|| { + let coldkey_sender = U256::from(1); + let coldkey_receiver = U256::from(5); + let hotkey = U256::from(2); + let netuid = setup_subnet_with_stake(coldkey_sender, hotkey, 100_000_000_000); + + let total = SubtensorModule::total_coldkey_alpha_on_subnet(&coldkey_sender, netuid); + let lock_half = total / 2.into(); + assert_ok!(SubtensorModule::do_lock_stake( + &coldkey_sender, + netuid, + &hotkey, + lock_half, + )); + assert_ok!(SubtensorModule::set_reject_locked_alpha( + RuntimeOrigin::signed(coldkey_receiver), + true, + )); + + let unlocked_transfer = lock_half / 2.into(); + assert_ok!(SubtensorModule::do_transfer_stake( + RuntimeOrigin::signed(coldkey_sender), + coldkey_receiver, + hotkey, + netuid, + netuid, + unlocked_transfer, + )); + + assert!(Lock::::get((coldkey_receiver, netuid, hotkey)).is_none()); + assert_eq!( + SubtensorModule::total_coldkey_alpha_on_subnet(&coldkey_receiver, netuid), + unlocked_transfer + ); + }); +} + #[test] fn test_transfer_stake_cross_coldkey_allowed_partial() { new_test_ext(1).execute_with(|| { @@ -2724,6 +2858,10 @@ fn test_coldkey_swap_swaps_lock() { &hotkey, 5000u64.into(), )); + assert_ok!(SubtensorModule::set_reject_locked_alpha( + RuntimeOrigin::signed(new_coldkey), + false, + )); // Perform coldkey swap assert_ok!(SubtensorModule::do_swap_coldkey(&old_coldkey, &new_coldkey)); @@ -2754,6 +2892,10 @@ fn test_coldkey_swap_lock_blocks_unstake() { &hotkey, total, )); + assert_ok!(SubtensorModule::set_reject_locked_alpha( + RuntimeOrigin::signed(new_coldkey), + false, + )); // Swap coldkey assert_ok!(SubtensorModule::do_swap_coldkey(&old_coldkey, &new_coldkey)); @@ -2888,6 +3030,49 @@ fn test_coldkey_swap_rejects_destination_lock() { }); } +#[test] +fn test_coldkey_swap_rejects_locked_alpha_to_flagged_destination() { + new_test_ext(1).execute_with(|| { + let old_coldkey = U256::from(1); + let new_coldkey = U256::from(10); + let old_hotkey = U256::from(2); + let netuid = subtensor_runtime_common::NetUid::from(1); + + let old_locked = AlphaBalance::from(7_000u64); + let old_conviction = U64F64::from_num(77); + + SubtensorModule::insert_lock_state( + &old_coldkey, + netuid, + &old_hotkey, + LockState { + locked_mass: old_locked, + conviction: old_conviction, + last_update: SubtensorModule::get_current_block_as_u64(), + }, + ); + assert_ok!(SubtensorModule::set_reject_locked_alpha( + RuntimeOrigin::signed(new_coldkey), + true, + )); + + assert_noop!( + SubtensorModule::swap_coldkey_locks(&old_coldkey, &new_coldkey), + Error::::AccountRejectsLockedAlpha + ); + + let source_lock = Lock::::get((old_coldkey, netuid, old_hotkey)) + .expect("source lock should remain after failed transfer"); + assert_eq!(source_lock.locked_mass, old_locked); + assert_eq!(source_lock.conviction, old_conviction); + assert!( + Lock::::iter_prefix((new_coldkey, netuid)) + .next() + .is_none() + ); + }); +} + #[test] // The public coldkey swap extrinsic runs inside a storage layer, so a late failure rolls back the earlier writes. fn test_failed_coldkey_swap_extrinsic_rolls_back_state_changes() { diff --git a/pallets/subtensor/src/tests/subnet_emissions.rs b/pallets/subtensor/src/tests/subnet_emissions.rs index 060171d5c7..4bb1aa4c75 100644 --- a/pallets/subtensor/src/tests/subnet_emissions.rs +++ b/pallets/subtensor/src/tests/subnet_emissions.rs @@ -151,126 +151,6 @@ fn inplace_pow_normalize_fractional_exponent() { }) } -#[allow(clippy::expect_used)] -#[test] -fn protocol_normalization_keeps_eligible_subnet_count_from_collapsing() { - new_test_ext(1).execute_with(|| { - let subnet_count = 70usize; - let user_flow = 100u64; - let protocol_flow_start = 40u64; - let protocol_flow_step = 4u64; - - NetTaoFlowEnabled::::set(true); - FlowNormExponent::::set(u64f64(1.0)); - TaoFlowCutoff::::set(i64f64(0.0)); - FlowEmaSmoothingFactor::::set(i64::MAX as u64); - - let subnets = (0..subnet_count) - .map(|i| { - let netuid = NetUid::from((i + 1) as u16); - add_network(netuid, 360, 0); - SubnetEmissionEnabled::::insert(netuid, true); - - let protocol_flow = protocol_flow_start + protocol_flow_step.saturating_mul(i as u64); - SubtensorModule::record_tao_inflow(netuid, TaoBalance::from(user_flow)); - SubtensorModule::record_protocol_inflow(netuid, TaoBalance::from(protocol_flow)); - - netuid - }) - .collect::>(); - - let subnets_to_emit_to = SubtensorModule::get_subnets_to_emit_to(&subnets); - assert_eq!( - subnets_to_emit_to.len(), - subnets.len(), - "test setup should make every subnet structurally eligible before flow scoring" - ); - - let emissions = SubtensorModule::get_subnet_block_emissions( - &subnets_to_emit_to, - U96F32::saturating_from_num(1_000_000_000u64), - ); - - let ema_rows = subnets_to_emit_to - .iter() - .map(|netuid| { - let (_, user_ema) = SubnetEmaTaoFlow::::get(*netuid) - .expect("user EMA should be initialized by get_subnet_block_emissions"); - let (_, protocol_ema) = SubnetEmaProtocolFlow::::get(*netuid) - .expect("protocol EMA should be initialized by get_subnet_block_emissions"); - - (*netuid, user_ema.to_num::(), protocol_ema.to_num::()) - }) - .collect::>(); - - let positive_user_ema_count = ema_rows - .iter() - .filter(|(_, user_ema, _)| *user_ema > 0.0) - .count(); - let dynamic_eligibility_floor = positive_user_ema_count / 2; - - let sum_positive_user_ema: f64 = ema_rows - .iter() - .map(|(_, user_ema, _)| (*user_ema).max(0.0)) - .sum(); - let sum_positive_protocol_ema: f64 = ema_rows - .iter() - .map(|(_, _, protocol_ema)| (*protocol_ema).max(0.0)) - .sum(); - let protocol_norm_factor = if sum_positive_protocol_ema > 0.0 { - (sum_positive_user_ema / sum_positive_protocol_ema).min(1.0) - } else { - 0.0 - }; - - let unnormalized_eligible = ema_rows - .iter() - .filter(|(_, user_ema, protocol_ema)| *user_ema > *protocol_ema) - .count(); - let expected_normalized_eligible = ema_rows - .iter() - .filter(|(_, user_ema, protocol_ema)| { - let scaled_protocol_ema = if *protocol_ema > 0.0 { - protocol_norm_factor * *protocol_ema - } else { - *protocol_ema - }; - *user_ema > scaled_protocol_ema - }) - .count(); - let actual_eligible = emissions - .values() - .filter(|emission| emission.to_num::() > 0.0) - .count(); - let total_emission: f64 = emissions - .values() - .map(|emission| emission.to_num::()) - .sum(); - - assert_abs_diff_eq!(total_emission, 1_000_000_000.0_f64, epsilon = 1.0); - assert!( - unnormalized_eligible < dynamic_eligibility_floor, - "test setup should reproduce the old unnormalized collapse: unnormalized_eligible={unnormalized_eligible}, dynamic_eligibility_floor={dynamic_eligibility_floor}" - ); - assert!( - expected_normalized_eligible >= dynamic_eligibility_floor, - "test setup should keep enough subnets eligible after protocol normalization: expected_normalized_eligible={expected_normalized_eligible}, dynamic_eligibility_floor={dynamic_eligibility_floor}" - ); - assert_eq!( - actual_eligible, expected_normalized_eligible, - "eligible subnet count should be derived from the normalized protocol-cost calculation" - ); - assert!( - actual_eligible >= dynamic_eligibility_floor, - "eligible subnet count collapsed below the dynamic floor: actual_eligible={actual_eligible}, dynamic_eligibility_floor={dynamic_eligibility_floor}, unnormalized_eligible={unnormalized_eligible}" - ); - assert!( - actual_eligible > unnormalized_eligible, - "normalization should preserve more eligible subnets than the old unnormalized path: actual_eligible={actual_eligible}, unnormalized_eligible={unnormalized_eligible}" - ); - }); -} - // /// Normal (moderate, non-zero) EMA flows across 3 subnets. // /// Expect: shares sum to ~1 and are monotonic with flows. // #[test] diff --git a/pallets/subtensor/src/weights.rs b/pallets/subtensor/src/weights.rs index 6d536dadaa..4876a830a0 100644 --- a/pallets/subtensor/src/weights.rs +++ b/pallets/subtensor/src/weights.rs @@ -1374,6 +1374,8 @@ impl WeightInfo for SubstrateWeight { /// 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::AccountFlags` (r:1 w:0) + /// Proof: `SubtensorModule::AccountFlags` (`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) @@ -1388,7 +1390,7 @@ impl WeightInfo for SubstrateWeight { // Estimated: `7994` // Minimum execution time: 254_636_000 picoseconds. Weight::from_parts(258_541_000, 7994) - .saturating_add(T::DbWeight::get().reads(18_u64)) + .saturating_add(T::DbWeight::get().reads(19_u64)) .saturating_add(T::DbWeight::get().writes(6_u64)) } /// Storage: `SubtensorModule::Alpha` (r:2 w:0) @@ -3754,6 +3756,8 @@ impl WeightInfo for () { /// 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::AccountFlags` (r:1 w:0) + /// Proof: `SubtensorModule::AccountFlags` (`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) @@ -3768,7 +3772,7 @@ impl WeightInfo for () { // Estimated: `7994` // Minimum execution time: 254_636_000 picoseconds. Weight::from_parts(258_541_000, 7994) - .saturating_add(RocksDbWeight::get().reads(18_u64)) + .saturating_add(RocksDbWeight::get().reads(19_u64)) .saturating_add(RocksDbWeight::get().writes(6_u64)) } /// Storage: `SubtensorModule::Alpha` (r:2 w:0) From 5c1b38081b5fba15adb43da283a54aef30ba2a00 Mon Sep 17 00:00:00 2001 From: unconst Date: Mon, 22 Jun 2026 14:02:16 -0600 Subject: [PATCH 02/13] Scale chain emission away from subnets burning miner emission - Add a per-subnet MinerBurned storage holding the proportion (0..1) of each tempo's miner (incentive) emission that was burned during emission distribution because the recipient hotkey is owned by the subnet owner. - Weight price-based emission shares by (1 - miner_burned) and renormalize, so subnets that burn more of their miner emission receive proportionally less chain emission (reallocated toward non-burning subnets). Co-authored-by: Cursor --- .../subtensor/src/coinbase/run_coinbase.rs | 11 +++++++ .../src/coinbase/subnet_emissions.rs | 32 ++++++++++++++++++- pallets/subtensor/src/lib.rs | 12 +++++++ 3 files changed, 54 insertions(+), 1 deletion(-) diff --git a/pallets/subtensor/src/coinbase/run_coinbase.rs b/pallets/subtensor/src/coinbase/run_coinbase.rs index e372d70407..1d075a313c 100644 --- a/pallets/subtensor/src/coinbase/run_coinbase.rs +++ b/pallets/subtensor/src/coinbase/run_coinbase.rs @@ -613,8 +613,12 @@ impl Pallet { let subnet_owner_coldkey = SubnetOwner::::get(netuid); let owner_hotkeys = Self::get_owner_hotkeys(netuid, &subnet_owner_coldkey); log::debug!("incentives: owner hotkeys: {owner_hotkeys:?}"); + // Track total vs burned miner emission this tempo to record the burned proportion. + let mut total_incentive: AlphaBalance = AlphaBalance::ZERO; + let mut burned_incentive: AlphaBalance = AlphaBalance::ZERO; for (hotkey, incentive) in incentives { log::debug!("incentives: hotkey: {incentive:?}"); + total_incentive = total_incentive.saturating_add(incentive); // Skip/burn miner-emission for immune keys if owner_hotkeys.contains(&hotkey) { @@ -630,6 +634,7 @@ impl Pallet { Ok(RecycleOrBurnEnum::Burn) | Err(_) => { log::debug!("burning {incentive:?}"); Self::burn_subnet_alpha(netuid, incentive); + burned_incentive = burned_incentive.saturating_add(incentive); } } continue; @@ -660,6 +665,12 @@ impl Pallet { ); } + // Record the proportion of this tempo's miner emission that was burned. + let burned_proportion: U96F32 = U96F32::saturating_from_num(burned_incentive.to_u64()) + .checked_div(U96F32::saturating_from_num(total_incentive.to_u64())) + .unwrap_or_else(|| U96F32::saturating_from_num(0)); + MinerBurned::::insert(netuid, burned_proportion); + // Distribute alpha divs. let _ = AlphaDividendsPerSubnet::::clear_prefix(netuid, u32::MAX, None); for (hotkey, mut alpha_divs) in alpha_dividends { diff --git a/pallets/subtensor/src/coinbase/subnet_emissions.rs b/pallets/subtensor/src/coinbase/subnet_emissions.rs index 7599d27a62..d59a8d1a9d 100644 --- a/pallets/subtensor/src/coinbase/subnet_emissions.rs +++ b/pallets/subtensor/src/coinbase/subnet_emissions.rs @@ -334,7 +334,37 @@ impl Pallet { // redistributed to enabled subnets in `get_subnet_block_emissions`, so the // effective emission is e_i = p_i / sum(p_j) over emit-enabled subnets. pub(crate) fn get_shares(subnets_to_emit_to: &[NetUid]) -> BTreeMap { - Self::get_shares_price_ema(subnets_to_emit_to) + let price_shares = Self::get_shares_price_ema(subnets_to_emit_to); + + // Reallocate emission away from subnets that burn miner emission: weight each + // subnet's price share by (1 - miner_burned_proportion), then renormalize so the + // block's total emission is preserved and redistributed toward subnets that are + // not burning their miner emission. + let zero = U64F64::saturating_from_num(0); + let one = U64F64::saturating_from_num(1); + let weighted: BTreeMap = price_shares + .iter() + .map(|(netuid, share)| { + let burned = U64F64::saturating_from_num(MinerBurned::::get(netuid)).min(one); + (*netuid, share.saturating_mul(one.saturating_sub(burned))) + }) + .collect(); + + let total_weight = weighted + .values() + .copied() + .fold(zero, |acc, w| acc.saturating_add(w)); + + if total_weight > zero { + weighted + .into_iter() + .map(|(netuid, w)| (netuid, w.safe_div(total_weight))) + .collect() + } else { + // Every eligible subnet is burning all of its miner emission; fall back to + // the unweighted price shares so the block's emission is not stranded. + price_shares + } } // Implementation of shares that uses subnet EMA prices (SubnetMovingPrice), diff --git a/pallets/subtensor/src/lib.rs b/pallets/subtensor/src/lib.rs index 4058ff983f..dddfa8fd09 100644 --- a/pallets/subtensor/src/lib.rs +++ b/pallets/subtensor/src/lib.rs @@ -1883,6 +1883,18 @@ pub mod pallet { pub type PendingOwnerCut = StorageMap<_, Identity, NetUid, AlphaBalance, ValueQuery, DefaultZeroAlpha>; + /// Default miner-burned proportion. + #[pallet::type_value] + pub fn DefaultMinerBurned() -> U96F32 { + U96F32::saturating_from_num(0.0) + } + /// --- MAP ( netuid ) --> miner_burned | Proportion (0..1) of this tempo's miner + /// (incentive) emission that was burned during emission distribution because the + /// recipient hotkey is owned by the subnet owner (immune key). + #[pallet::storage] + pub type MinerBurned = + StorageMap<_, Identity, NetUid, U96F32, ValueQuery, DefaultMinerBurned>; + /// --- MAP ( netuid ) --> blocks_since_last_step #[pallet::storage] pub type BlocksSinceLastStep = From a068db561fdd1293b19b0a78308a3ce551557bff Mon Sep 17 00:00:00 2001 From: unconst Date: Mon, 22 Jun 2026 14:13:55 -0600 Subject: [PATCH 03/13] Address review of miner-burn emission scaling - Count miner emission withheld via an owner/immune hotkey toward the burned proportion whether it is recycled or burned, so the emission penalty is independent of a subnet's RecycleOrBurn config (no Recycle bypass, no unique penalty for the unset default). - Clear MinerBurned on subnet removal so a deregistered subnet leaves no stale proportion; extend dissolve cleanup test to cover it. - Add active tests for the price-share reweight by (1 - miner_burned): no-burn, partial burn, full burn, and all-full-burn fallback to price shares. Co-authored-by: Cursor --- pallets/subtensor/src/coinbase/root.rs | 1 + .../subtensor/src/coinbase/run_coinbase.rs | 18 ++-- pallets/subtensor/src/lib.rs | 6 +- pallets/subtensor/src/tests/networks.rs | 2 + .../subtensor/src/tests/subnet_emissions.rs | 99 +++++++++++++++++++ 5 files changed, 118 insertions(+), 8 deletions(-) diff --git a/pallets/subtensor/src/coinbase/root.rs b/pallets/subtensor/src/coinbase/root.rs index b64043a4f5..35069ef6b5 100644 --- a/pallets/subtensor/src/coinbase/root.rs +++ b/pallets/subtensor/src/coinbase/root.rs @@ -322,6 +322,7 @@ impl Pallet { PendingServerEmission::::remove(netuid); PendingRootAlphaDivs::::remove(netuid); PendingOwnerCut::::remove(netuid); + MinerBurned::::remove(netuid); BlocksSinceLastStep::::remove(netuid); LastMechansimStepBlock::::remove(netuid); LastAdjustmentBlock::::remove(netuid); diff --git a/pallets/subtensor/src/coinbase/run_coinbase.rs b/pallets/subtensor/src/coinbase/run_coinbase.rs index 1d075a313c..60f6253643 100644 --- a/pallets/subtensor/src/coinbase/run_coinbase.rs +++ b/pallets/subtensor/src/coinbase/run_coinbase.rs @@ -613,9 +613,10 @@ impl Pallet { let subnet_owner_coldkey = SubnetOwner::::get(netuid); let owner_hotkeys = Self::get_owner_hotkeys(netuid, &subnet_owner_coldkey); log::debug!("incentives: owner hotkeys: {owner_hotkeys:?}"); - // Track total vs burned miner emission this tempo to record the burned proportion. + // Track total miner emission vs the portion withheld from miners this tempo + // (directed to an owner/immune hotkey) to record the withheld proportion. let mut total_incentive: AlphaBalance = AlphaBalance::ZERO; - let mut burned_incentive: AlphaBalance = AlphaBalance::ZERO; + let mut withheld_incentive: AlphaBalance = AlphaBalance::ZERO; for (hotkey, incentive) in incentives { log::debug!("incentives: hotkey: {incentive:?}"); total_incentive = total_incentive.saturating_add(incentive); @@ -625,6 +626,11 @@ impl Pallet { log::debug!( "incentives: hotkey: {hotkey:?} is SN owner hotkey or associated hotkey, skipping {incentive:?}" ); + // Miner emission directed to an owner (immune) hotkey is withheld from + // miners whether it is recycled or burned. Count both toward the withheld + // proportion so the emission penalty cannot be dodged by choosing Recycle + // and an unset RecycleOrBurn config is not uniquely penalized. + withheld_incentive = withheld_incentive.saturating_add(incentive); // Check if we should recycle or burn the incentive match RecycleOrBurn::::try_get(netuid) { Ok(RecycleOrBurnEnum::Recycle) => { @@ -634,7 +640,6 @@ impl Pallet { Ok(RecycleOrBurnEnum::Burn) | Err(_) => { log::debug!("burning {incentive:?}"); Self::burn_subnet_alpha(netuid, incentive); - burned_incentive = burned_incentive.saturating_add(incentive); } } continue; @@ -665,11 +670,12 @@ impl Pallet { ); } - // Record the proportion of this tempo's miner emission that was burned. - let burned_proportion: U96F32 = U96F32::saturating_from_num(burned_incentive.to_u64()) + // Record the proportion of this tempo's miner emission that was withheld from + // miners (directed to owner/immune hotkeys, whether recycled or burned). + let withheld_proportion: U96F32 = U96F32::saturating_from_num(withheld_incentive.to_u64()) .checked_div(U96F32::saturating_from_num(total_incentive.to_u64())) .unwrap_or_else(|| U96F32::saturating_from_num(0)); - MinerBurned::::insert(netuid, burned_proportion); + MinerBurned::::insert(netuid, withheld_proportion); // Distribute alpha divs. let _ = AlphaDividendsPerSubnet::::clear_prefix(netuid, u32::MAX, None); diff --git a/pallets/subtensor/src/lib.rs b/pallets/subtensor/src/lib.rs index dddfa8fd09..828b8e6fb8 100644 --- a/pallets/subtensor/src/lib.rs +++ b/pallets/subtensor/src/lib.rs @@ -1889,8 +1889,10 @@ pub mod pallet { U96F32::saturating_from_num(0.0) } /// --- MAP ( netuid ) --> miner_burned | Proportion (0..1) of this tempo's miner - /// (incentive) emission that was burned during emission distribution because the - /// recipient hotkey is owned by the subnet owner (immune key). + /// (incentive) emission that was withheld from miners during emission distribution + /// because the recipient hotkey is owned by the subnet owner (immune key). Counts + /// emission that is either recycled or burned, so the value is independent of the + /// subnet's RecycleOrBurn configuration. #[pallet::storage] pub type MinerBurned = StorageMap<_, Identity, NetUid, U96F32, ValueQuery, DefaultMinerBurned>; diff --git a/pallets/subtensor/src/tests/networks.rs b/pallets/subtensor/src/tests/networks.rs index 4bd1a9cb19..d1be5f13f4 100644 --- a/pallets/subtensor/src/tests/networks.rs +++ b/pallets/subtensor/src/tests/networks.rs @@ -405,6 +405,7 @@ fn dissolve_clears_all_per_subnet_storages() { PendingValidatorEmission::::insert(net, AlphaBalance::from(1)); PendingRootAlphaDivs::::insert(net, AlphaBalance::from(1)); PendingOwnerCut::::insert(net, AlphaBalance::from(1)); + MinerBurned::::insert(net, substrate_fixed::types::U96F32::from_num(1)); BlocksSinceLastStep::::insert(net, 1u64); LastMechansimStepBlock::::insert(net, 1u64); ServingRateLimit::::insert(net, 1u64); @@ -564,6 +565,7 @@ fn dissolve_clears_all_per_subnet_storages() { assert!(!PendingValidatorEmission::::contains_key(net)); assert!(!PendingRootAlphaDivs::::contains_key(net)); assert!(!PendingOwnerCut::::contains_key(net)); + assert!(!MinerBurned::::contains_key(net)); assert!(!BlocksSinceLastStep::::contains_key(net)); assert!(!LastMechansimStepBlock::::contains_key(net)); assert!(!ServingRateLimit::::contains_key(net)); diff --git a/pallets/subtensor/src/tests/subnet_emissions.rs b/pallets/subtensor/src/tests/subnet_emissions.rs index 4bb1aa4c75..b18a1163c1 100644 --- a/pallets/subtensor/src/tests/subnet_emissions.rs +++ b/pallets/subtensor/src/tests/subnet_emissions.rs @@ -151,6 +151,105 @@ fn inplace_pow_normalize_fractional_exponent() { }) } +/// Configure a dynamic subnet with a given EMA price and miner-burned proportion so +/// `get_shares` (price-based, reweighted by `1 - miner_burned`) can be exercised. +fn set_price_and_burn(netuid: NetUid, price: f64, burned: f64) { + SubnetMechanism::::insert(netuid, 1); + SubnetMovingPrice::::insert(netuid, i96f32(price)); + MinerBurned::::insert(netuid, U96F32::from_num(burned)); +} + +/// With no miner emission burned anywhere, `get_shares` is exactly the price-based +/// share: e_i = p_i / sum(p_j). +#[test] +fn get_shares_no_burn_matches_price_shares() { + new_test_ext(1).execute_with(|| { + let n1 = NetUid::from(1); + let n2 = NetUid::from(2); + let n3 = NetUid::from(3); + set_price_and_burn(n1, 1.0, 0.0); + set_price_and_burn(n2, 2.0, 0.0); + set_price_and_burn(n3, 3.0, 0.0); + + let shares = SubtensorModule::get_shares(&[n1, n2, n3]); + let s1 = shares.get(&n1).unwrap().to_num::(); + let s2 = shares.get(&n2).unwrap().to_num::(); + let s3 = shares.get(&n3).unwrap().to_num::(); + + assert_abs_diff_eq!(s1, 1.0 / 6.0, epsilon = 1e-9); + assert_abs_diff_eq!(s2, 2.0 / 6.0, epsilon = 1e-9); + assert_abs_diff_eq!(s3, 3.0 / 6.0, epsilon = 1e-9); + assert_abs_diff_eq!(s1 + s2 + s3, 1.0, epsilon = 1e-9); + }); +} + +/// A partial burn reallocates emission away from the burning subnet and toward the +/// non-burning one, while shares still sum to 1. +#[test] +fn get_shares_partial_burn_reallocates_away_from_burner() { + new_test_ext(1).execute_with(|| { + let n1 = NetUid::from(1); + let n2 = NetUid::from(2); + // Equal prices so the price side is neutral; n1 burns 50% of its miner emission. + set_price_and_burn(n1, 1.0, 0.5); + set_price_and_burn(n2, 1.0, 0.0); + + // weighted: n1 = 0.5 * (1 - 0.5) = 0.25, n2 = 0.5 * 1 = 0.5; total = 0.75 + let shares = SubtensorModule::get_shares(&[n1, n2]); + let s1 = shares.get(&n1).unwrap().to_num::(); + let s2 = shares.get(&n2).unwrap().to_num::(); + + assert_abs_diff_eq!(s1, 1.0 / 3.0, epsilon = 1e-9); + assert_abs_diff_eq!(s2, 2.0 / 3.0, epsilon = 1e-9); + assert_abs_diff_eq!(s1 + s2, 1.0, epsilon = 1e-9); + assert!( + s2 > s1, + "non-burning subnet should receive more: s1={s1}, s2={s2}" + ); + }); +} + +/// A subnet burning 100% of its miner emission receives zero chain emission; the rest +/// goes entirely to the non-burning subnet. +#[test] +fn get_shares_full_burn_gets_zero_emission() { + new_test_ext(1).execute_with(|| { + let n1 = NetUid::from(1); + let n2 = NetUid::from(2); + set_price_and_burn(n1, 1.0, 1.0); + set_price_and_burn(n2, 1.0, 0.0); + + let shares = SubtensorModule::get_shares(&[n1, n2]); + let s1 = shares.get(&n1).unwrap().to_num::(); + let s2 = shares.get(&n2).unwrap().to_num::(); + + assert_abs_diff_eq!(s1, 0.0, epsilon = 1e-9); + assert_abs_diff_eq!(s2, 1.0, epsilon = 1e-9); + }); +} + +/// When every subnet burns all of its miner emission, the reweighting would zero the +/// total, so `get_shares` falls back to unweighted price shares (emission is not +/// stranded). +#[test] +fn get_shares_all_full_burn_falls_back_to_price_shares() { + new_test_ext(1).execute_with(|| { + let n1 = NetUid::from(1); + let n2 = NetUid::from(2); + set_price_and_burn(n1, 1.0, 1.0); + set_price_and_burn(n2, 3.0, 1.0); + + let shares = SubtensorModule::get_shares(&[n1, n2]); + let s1 = shares.get(&n1).unwrap().to_num::(); + let s2 = shares.get(&n2).unwrap().to_num::(); + + // Fallback: price-proportional (1:3), not zeroed. + assert_abs_diff_eq!(s1, 1.0 / 4.0, epsilon = 1e-9); + assert_abs_diff_eq!(s2, 3.0 / 4.0, epsilon = 1e-9); + assert_abs_diff_eq!(s1 + s2, 1.0, epsilon = 1e-9); + }); +} + // /// Normal (moderate, non-zero) EMA flows across 3 subnets. // /// Expect: shares sum to ~1 and are monotonic with flows. // #[test] From eaadb745a0c007b8fc1db534d2318dca0452da53 Mon Sep 17 00:00:00 2001 From: unconst Date: Mon, 22 Jun 2026 14:46:03 -0600 Subject: [PATCH 04/13] Weight emission shares by root_proportion (favor newer subnets) Emission share is now proportional to root_proportion * price * (1 - miner_burned), renormalized. Multiplying by root_proportion (which shrinks as a subnet's alpha issuance grows) reallocates chain emission away from older subnets toward newer ones, easing entrance for new subnets. Falls back to unweighted price shares when the combined weight is zero (e.g. no root stake). Adds get_shares tests: no-burn, partial/full burn, all-full-burn fallback, and root_proportion favoring newer subnets. Co-authored-by: Cursor --- .../src/coinbase/subnet_emissions.rs | 19 +++++--- .../subtensor/src/tests/subnet_emissions.rs | 46 ++++++++++++++++++- 2 files changed, 56 insertions(+), 9 deletions(-) diff --git a/pallets/subtensor/src/coinbase/subnet_emissions.rs b/pallets/subtensor/src/coinbase/subnet_emissions.rs index d59a8d1a9d..d7b35166d2 100644 --- a/pallets/subtensor/src/coinbase/subnet_emissions.rs +++ b/pallets/subtensor/src/coinbase/subnet_emissions.rs @@ -336,17 +336,21 @@ impl Pallet { pub(crate) fn get_shares(subnets_to_emit_to: &[NetUid]) -> BTreeMap { let price_shares = Self::get_shares_price_ema(subnets_to_emit_to); - // Reallocate emission away from subnets that burn miner emission: weight each - // subnet's price share by (1 - miner_burned_proportion), then renormalize so the - // block's total emission is preserved and redistributed toward subnets that are - // not burning their miner emission. + // Weight each subnet's price share by root_proportion * (1 - miner_burned), then + // renormalize. The effective emission is therefore proportional to + // root_proportion_i * price_i * (1 - miner_burned_i). + // - root_proportion shrinks as a subnet's alpha issuance grows, so emission is + // reallocated away from older subnets toward newer ones (easier entrance). + // - (1 - miner_burned) reallocates away from subnets that withhold miner emission. let zero = U64F64::saturating_from_num(0); let one = U64F64::saturating_from_num(1); let weighted: BTreeMap = price_shares .iter() .map(|(netuid, share)| { let burned = U64F64::saturating_from_num(MinerBurned::::get(netuid)).min(one); - (*netuid, share.saturating_mul(one.saturating_sub(burned))) + let root_prop = U64F64::saturating_from_num(Self::root_proportion(*netuid)); + let factor = root_prop.saturating_mul(one.saturating_sub(burned)); + (*netuid, share.saturating_mul(factor)) }) .collect(); @@ -361,8 +365,9 @@ impl Pallet { .map(|(netuid, w)| (netuid, w.safe_div(total_weight))) .collect() } else { - // Every eligible subnet is burning all of its miner emission; fall back to - // the unweighted price shares so the block's emission is not stranded. + // The combined weight zeroes out for every subnet (e.g. no root stake, or + // every subnet burning all of its miner emission); fall back to the + // unweighted price shares so the block's emission is not stranded. price_shares } } diff --git a/pallets/subtensor/src/tests/subnet_emissions.rs b/pallets/subtensor/src/tests/subnet_emissions.rs index b18a1163c1..61af8b0cc7 100644 --- a/pallets/subtensor/src/tests/subnet_emissions.rs +++ b/pallets/subtensor/src/tests/subnet_emissions.rs @@ -5,7 +5,7 @@ use alloc::{collections::BTreeMap, vec::Vec}; use approx::assert_abs_diff_eq; use sp_core::U256; use substrate_fixed::types::{I64F64, I96F32, U64F64, U96F32}; -use subtensor_runtime_common::{NetUid, TaoBalance}; +use subtensor_runtime_common::{AlphaBalance, NetUid, TaoBalance}; fn u64f64(x: f64) -> U64F64 { U64F64::from_num(x) @@ -152,8 +152,15 @@ fn inplace_pow_normalize_fractional_exponent() { } /// Configure a dynamic subnet with a given EMA price and miner-burned proportion so -/// `get_shares` (price-based, reweighted by `1 - miner_burned`) can be exercised. +/// `get_shares` can be exercised. Also seeds a large root stake with full TAO weight so +/// that, with zero alpha issuance on the test subnets, `root_proportion` is 1 and the +/// root-proportion factor in `get_shares` is neutral (isolating the price/burn weighting). fn set_price_and_burn(netuid: NetUid, price: f64, burned: f64) { + SubnetTAO::::insert( + NetUid::ROOT, + TaoBalance::from(1_000_000_000_000_000_000_u64), + ); + SubtensorModule::set_tao_weight(u64::MAX); SubnetMechanism::::insert(netuid, 1); SubnetMovingPrice::::insert(netuid, i96f32(price)); MinerBurned::::insert(netuid, U96F32::from_num(burned)); @@ -250,6 +257,41 @@ fn get_shares_all_full_burn_falls_back_to_price_shares() { }); } +/// With equal price and no burn, the root_proportion factor reallocates emission toward +/// the newer subnet (lower alpha issuance => higher root_proportion) and away from the +/// older one (higher alpha issuance => lower root_proportion). +#[test] +fn get_shares_root_proportion_favors_newer_subnets() { + new_test_ext(1).execute_with(|| { + let n1 = NetUid::from(1); + let n2 = NetUid::from(2); + // Equal price, no burn; root proportion factor is the only differentiator. + set_price_and_burn(n1, 1.0, 0.0); + set_price_and_burn(n2, 1.0, 0.0); + + // tao_weight = 1.0 (u64::MAX), so tao_weight term = root_tao. Set root_tao = 1000 + // and per-subnet alpha issuance to make root_proportion deterministic: + // n1: issuance 1000 => root_prop = 1000 / (1000 + 1000) = 0.5 + // n2: issuance 3000 => root_prop = 1000 / (1000 + 3000) = 0.25 + SubnetTAO::::insert(NetUid::ROOT, TaoBalance::from(1_000_u64)); + SubnetAlphaOut::::insert(n1, AlphaBalance::from(1_000_u64)); + SubnetAlphaOut::::insert(n2, AlphaBalance::from(3_000_u64)); + + // weighted: n1 = 0.5(price) * 0.5(root) = 0.25, n2 = 0.5 * 0.25 = 0.125; total 0.375 + let shares = SubtensorModule::get_shares(&[n1, n2]); + let s1 = shares.get(&n1).unwrap().to_num::(); + let s2 = shares.get(&n2).unwrap().to_num::(); + + assert_abs_diff_eq!(s1, 2.0 / 3.0, epsilon = 1e-6); + assert_abs_diff_eq!(s2, 1.0 / 3.0, epsilon = 1e-6); + assert_abs_diff_eq!(s1 + s2, 1.0, epsilon = 1e-9); + assert!( + s1 > s2, + "newer subnet (higher root_prop) should get more: s1={s1}, s2={s2}" + ); + }); +} + // /// Normal (moderate, non-zero) EMA flows across 3 subnets. // /// Expect: shares sum to ~1 and are monotonic with flows. // #[test] From 38c9e763f7c50dfbdc645995e783c9b744e75289 Mon Sep 17 00:00:00 2001 From: Greg Zaitsev Date: Mon, 22 Jun 2026 23:55:36 +0300 Subject: [PATCH 05/13] address ai review --- pallets/subtensor/src/staking/lock.rs | 34 +++++++++++++++++---------- pallets/subtensor/src/tests/locks.rs | 6 +++++ 2 files changed, 27 insertions(+), 13 deletions(-) diff --git a/pallets/subtensor/src/staking/lock.rs b/pallets/subtensor/src/staking/lock.rs index ae27614f14..3e2f3c54e3 100644 --- a/pallets/subtensor/src/staking/lock.rs +++ b/pallets/subtensor/src/staking/lock.rs @@ -1366,10 +1366,6 @@ impl Pallet { locks_to_transfer.push((netuid, hotkey, lock)); } - for (netuid, decaying) in decaying_locks_to_transfer.iter() { - DecayingLock::::insert(new_coldkey, *netuid, *decaying); - } - let mut rolled_locks_to_transfer: Vec<(NetUid, T::AccountId, LockState, bool)> = Vec::new(); for (netuid, hotkey, lock) in locks_to_transfer { let perpetual_lock = decaying_locks_to_transfer @@ -1390,7 +1386,27 @@ impl Pallet { rolled_locks_to_transfer.push((netuid, hotkey, old_lock, perpetual_lock)); } - // Remove locks for old coldkey and insert for new + // Remove old locks and reduce old aggregate buckets before moving the + // perpetual-lock flags; aggregate selection depends on the old flag. + for (netuid, hotkey, old_lock, _) in rolled_locks_to_transfer.iter() { + Lock::::remove((old_coldkey.clone(), *netuid, hotkey.clone())); + Self::reduce_aggregate_lock( + old_coldkey, + hotkey, + *netuid, + old_lock.locked_mass, + old_lock.conviction, + ); + } + + for (netuid, _) in decaying_locks_to_transfer { + if let Some(decaying) = DecayingLock::::take(old_coldkey, netuid) { + DecayingLock::::insert(new_coldkey, netuid, decaying); + } + } + + // Insert locks for the new coldkey and add to the destination aggregate + // buckets after the flags have moved. for (netuid, hotkey, old_lock, perpetual_lock) in rolled_locks_to_transfer { let new_lock = ConvictionModel::roll_forward_lock( old_lock.clone(), @@ -1400,14 +1416,6 @@ impl Pallet { Self::is_subnet_owner_hotkey(netuid, &hotkey), perpetual_lock, ); - Lock::::remove((old_coldkey.clone(), netuid, hotkey.clone())); - Self::reduce_aggregate_lock( - old_coldkey, - &hotkey, - netuid, - old_lock.locked_mass, - old_lock.conviction, - ); Self::insert_lock_state(new_coldkey, netuid, &hotkey, new_lock.clone()); Self::add_aggregate_lock(new_coldkey, &hotkey, netuid, new_lock); } diff --git a/pallets/subtensor/src/tests/locks.rs b/pallets/subtensor/src/tests/locks.rs index 78573eac3b..fc3e50f020 100644 --- a/pallets/subtensor/src/tests/locks.rs +++ b/pallets/subtensor/src/tests/locks.rs @@ -2940,6 +2940,7 @@ fn test_coldkey_swap_allows_destination_conviction_only_lock() { last_update: SubtensorModule::get_current_block_as_u64(), }, ); + DecayingLock::::insert(old_coldkey, netuid, false); SubtensorModule::insert_lock_state( &new_coldkey, netuid, @@ -2968,6 +2969,8 @@ fn test_coldkey_swap_allows_destination_conviction_only_lock() { assert_eq!(swapped_lock.locked_mass, AlphaBalance::ZERO); assert_eq!(swapped_lock.conviction, old_conviction); assert_eq!(Lock::::iter_prefix((new_coldkey, netuid)).count(), 2); + assert!(DecayingLock::::get(old_coldkey, netuid).is_none()); + assert_eq!(DecayingLock::::get(new_coldkey, netuid), Some(false)); }); } @@ -3051,6 +3054,7 @@ fn test_coldkey_swap_rejects_locked_alpha_to_flagged_destination() { last_update: SubtensorModule::get_current_block_as_u64(), }, ); + DecayingLock::::insert(old_coldkey, netuid, false); assert_ok!(SubtensorModule::set_reject_locked_alpha( RuntimeOrigin::signed(new_coldkey), true, @@ -3070,6 +3074,8 @@ fn test_coldkey_swap_rejects_locked_alpha_to_flagged_destination() { .next() .is_none() ); + assert_eq!(DecayingLock::::get(old_coldkey, netuid), Some(false)); + assert!(DecayingLock::::get(new_coldkey, netuid).is_none()); }); } From dc2d06c5054e1d3ef107bf8b5731d9f8e517f71b Mon Sep 17 00:00:00 2001 From: Greg Zaitsev Date: Tue, 23 Jun 2026 00:10:30 +0300 Subject: [PATCH 06/13] spec bump --- runtime/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index 32d629a761..935a364ad3 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -277,7 +277,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { // `spec_version`, and `authoring_version` are the same between Wasm and native. // This value is set to 100 to notify Polkadot-JS App (https://polkadot.js.org/apps) to use // the compatible custom types. - spec_version: 419, + spec_version: 421, impl_version: 1, apis: RUNTIME_API_VERSIONS, transaction_version: 1, From 88b504fe0e9f74d3ff6918882c7a4974586f5401 Mon Sep 17 00:00:00 2001 From: Greg Zaitsev Date: Mon, 22 Jun 2026 22:02:35 +0300 Subject: [PATCH 07/13] Trim account flags PR to main changes --- pallets/subtensor/src/lib.rs | 8 + pallets/subtensor/src/macros/dispatches.rs | 26 +++ pallets/subtensor/src/macros/errors.rs | 2 + pallets/subtensor/src/macros/events.rs | 8 + pallets/subtensor/src/staking/lock.rs | 82 ++++++--- pallets/subtensor/src/tests/coinbase.rs | 40 +++++ pallets/subtensor/src/tests/locks.rs | 185 +++++++++++++++++++++ pallets/subtensor/src/weights.rs | 24 +-- 8 files changed, 343 insertions(+), 32 deletions(-) diff --git a/pallets/subtensor/src/lib.rs b/pallets/subtensor/src/lib.rs index 39fe375e6b..c26d15ee37 100644 --- a/pallets/subtensor/src/lib.rs +++ b/pallets/subtensor/src/lib.rs @@ -67,6 +67,9 @@ pub const MAX_SUBNET_CLAIMS: usize = 5; pub const MAX_ROOT_CLAIM_THRESHOLD: u64 = 10_000_000; +/// Account flag bit that opts into receiving locked alpha transfers. +pub const ACCOUNT_FLAGS_ACCEPT_LOCKED_ALPHA: u128 = 1u128 << 0; + #[allow(deprecated)] #[deny(missing_docs)] #[import_section(errors::errors)] @@ -1190,6 +1193,11 @@ pub mod pallet { pub type Owner = StorageMap<_, Blake2_128Concat, T::AccountId, T::AccountId, ValueQuery, DefaultAccount>; + /// MAP ( coldkey ) --> flags | Account-level flags. Defaults to zero. + #[pallet::storage] + pub type AccountFlags = + StorageMap<_, Blake2_128Concat, T::AccountId, u128, ValueQuery>; + /// MAP ( hot ) --> take | Returns the hotkey delegation take. And signals that this key is open for delegation #[pallet::storage] pub type Delegates = diff --git a/pallets/subtensor/src/macros/dispatches.rs b/pallets/subtensor/src/macros/dispatches.rs index 2a22915ee9..08e5bb8fdf 100644 --- a/pallets/subtensor/src/macros/dispatches.rs +++ b/pallets/subtensor/src/macros/dispatches.rs @@ -2625,5 +2625,31 @@ mod dispatches { pub fn trigger_epoch(origin: OriginFor, netuid: NetUid) -> DispatchResult { Self::do_trigger_epoch(origin, netuid) } + + /// Sets or clears whether the caller rejects incoming locked alpha. + /// + /// Coldkeys reject locked alpha by default. Passing `false` opts the + /// caller into receiving locked alpha from stake transfers or coldkey + /// swaps. + #[pallet::call_index(142)] + #[pallet::weight(( + ::DbWeight::get().reads_writes(1, 1), + DispatchClass::Normal, + Pays::Yes + ))] + pub fn set_reject_locked_alpha(origin: OriginFor, enabled: bool) -> DispatchResult { + let coldkey = ensure_signed(origin)?; + AccountFlags::::mutate_exists(&coldkey, |maybe_flags| { + let mut flags = maybe_flags.unwrap_or_default(); + if enabled { + flags &= !crate::ACCOUNT_FLAGS_ACCEPT_LOCKED_ALPHA; + } else { + flags |= crate::ACCOUNT_FLAGS_ACCEPT_LOCKED_ALPHA; + } + *maybe_flags = if flags == 0 { None } else { Some(flags) }; + }); + Self::deposit_event(Event::RejectLockedAlphaUpdated { coldkey, enabled }); + Ok(()) + } } } diff --git a/pallets/subtensor/src/macros/errors.rs b/pallets/subtensor/src/macros/errors.rs index 32e0fbcbd6..6401b5846d 100644 --- a/pallets/subtensor/src/macros/errors.rs +++ b/pallets/subtensor/src/macros/errors.rs @@ -317,5 +317,7 @@ mod errors { /// an out-of-band epoch would desync the CRv3 reveal window from the wall-clock /// Drand schedule and silently drop committed weights. DynamicTempoBlockedByCommitReveal, + /// The destination coldkey rejects incoming locked alpha. + AccountRejectsLockedAlpha, } } diff --git a/pallets/subtensor/src/macros/events.rs b/pallets/subtensor/src/macros/events.rs index adcd97e0cf..7bc9bf450a 100644 --- a/pallets/subtensor/src/macros/events.rs +++ b/pallets/subtensor/src/macros/events.rs @@ -669,5 +669,13 @@ mod events { /// Whether this coldkey's locks are now perpetual. enabled: bool, }, + + /// A coldkey's reject locked alpha account flag was updated. + RejectLockedAlphaUpdated { + /// The coldkey whose flag changed. + coldkey: T::AccountId, + /// Whether this coldkey rejects incoming locked alpha. + enabled: bool, + }, } } diff --git a/pallets/subtensor/src/staking/lock.rs b/pallets/subtensor/src/staking/lock.rs index 78e2734c5b..05746c753d 100644 --- a/pallets/subtensor/src/staking/lock.rs +++ b/pallets/subtensor/src/staking/lock.rs @@ -467,6 +467,29 @@ impl Pallet { LockingColdkeys::::remove((netuid, hotkey, coldkey)); } + pub fn account_rejects_locked_alpha(coldkey: &T::AccountId) -> bool { + AccountFlags::::get(coldkey) & crate::ACCOUNT_FLAGS_ACCEPT_LOCKED_ALPHA != 1 + } + + pub fn ensure_can_receive_locked_alpha( + coldkey: &T::AccountId, + amount: AlphaBalance, + ) -> DispatchResult { + let rejects_locked_alpha = Self::account_rejects_locked_alpha(coldkey); + Self::ensure_can_receive_locked_alpha_with_flag(rejects_locked_alpha, amount) + } + + fn ensure_can_receive_locked_alpha_with_flag( + rejects_locked_alpha: bool, + amount: AlphaBalance, + ) -> DispatchResult { + if amount.is_zero() { + return Ok(()); + } + ensure!(!rejects_locked_alpha, Error::::AccountRejectsLockedAlpha); + Ok(()) + } + pub fn insert_lock_state( coldkey: &T::AccountId, netuid: NetUid, @@ -1359,6 +1382,10 @@ impl Pallet { Self::ensure_no_active_locks(new_coldkey)?; let mut locks_to_transfer: Vec<(NetUid, T::AccountId, LockState)> = Vec::new(); + let now = Self::get_current_block_as_u64(); + let unlock_rate = UnlockRate::::get(); + let maturity_rate = MaturityRate::::get(); + let new_coldkey_rejects_locked_alpha = Self::account_rejects_locked_alpha(new_coldkey); let decaying_locks_to_transfer: Vec<(NetUid, bool)> = DecayingLock::::iter_prefix(old_coldkey).collect(); @@ -1367,15 +1394,8 @@ impl Pallet { locks_to_transfer.push((netuid, hotkey, lock)); } - for (netuid, decaying) in decaying_locks_to_transfer.iter() { - DecayingLock::::insert(new_coldkey, *netuid, *decaying); - } - - // Remove locks for old coldkey and insert for new + let mut rolled_locks_to_transfer: Vec<(NetUid, T::AccountId, LockState, bool)> = Vec::new(); for (netuid, hotkey, lock) in locks_to_transfer { - let now = Self::get_current_block_as_u64(); - let unlock_rate = UnlockRate::::get(); - let maturity_rate = MaturityRate::::get(); let perpetual_lock = decaying_locks_to_transfer .iter() .any(|(decaying_netuid, decaying)| *decaying_netuid == netuid && !*decaying); @@ -1387,8 +1407,38 @@ impl Pallet { Self::is_subnet_owner_hotkey(netuid, &hotkey), perpetual_lock, ); + Self::ensure_can_receive_locked_alpha_with_flag( + new_coldkey_rejects_locked_alpha, + old_lock.0.locked_mass, + )?; + rolled_locks_to_transfer.push((netuid, hotkey, old_lock.0, perpetual_lock)); + } + + // Remove old locks and reduce old aggregate buckets before moving the + // perpetual-lock flags; aggregate selection depends on the old flag. + for (netuid, hotkey, old_lock, _) in rolled_locks_to_transfer.iter() { + Lock::::remove((old_coldkey.clone(), *netuid, hotkey.clone())); + Self::maybe_remove_locking_coldkey(hotkey, *netuid, old_coldkey); + Self::reduce_aggregate_lock( + old_coldkey, + hotkey, + *netuid, + old_lock.locked_mass, + old_lock.conviction, + ); + } + + for (netuid, _) in decaying_locks_to_transfer { + if let Some(decaying) = DecayingLock::::take(old_coldkey, netuid) { + DecayingLock::::insert(new_coldkey, netuid, decaying); + } + } + + // Insert locks for the new coldkey and add to the destination aggregate + // buckets after the flags have moved. + for (netuid, hotkey, old_lock, perpetual_lock) in rolled_locks_to_transfer { let new_lock = ConvictionModel::roll_forward_lock( - old_lock.0.clone(), + old_lock.clone(), now, unlock_rate, maturity_rate, @@ -1396,23 +1446,10 @@ impl Pallet { perpetual_lock, ) .0; - Lock::::remove((old_coldkey.clone(), netuid, hotkey.clone())); - Self::maybe_remove_locking_coldkey(&hotkey, netuid, old_coldkey); - Self::reduce_aggregate_lock( - old_coldkey, - &hotkey, - netuid, - old_lock.0.locked_mass, - old_lock.0.conviction, - ); Self::insert_lock_state(new_coldkey, netuid, &hotkey, new_lock.clone()); Self::add_aggregate_lock(new_coldkey, &hotkey, netuid, new_lock); } - for (netuid, _) in decaying_locks_to_transfer { - DecayingLock::::remove(old_coldkey, netuid); - } - Ok(()) } @@ -1838,6 +1875,7 @@ impl Pallet { .conviction .saturating_add(conviction_transfer); } + Self::ensure_can_receive_locked_alpha(destination_coldkey, locked_transfer)?; source_lock = ConvictionModel::roll_forward_lock( source_lock, diff --git a/pallets/subtensor/src/tests/coinbase.rs b/pallets/subtensor/src/tests/coinbase.rs index 52a9981dfd..3ac421ac50 100644 --- a/pallets/subtensor/src/tests/coinbase.rs +++ b/pallets/subtensor/src/tests/coinbase.rs @@ -2894,6 +2894,46 @@ fn test_run_coinbase_not_started_start_after() { }); } +/// Test that coinbase updates protocol liquidity accounting. +/// cargo test --package pallet-subtensor --lib -- tests::coinbase::test_coinbase_v3_liquidity_update --exact --show-output +#[test] +fn test_coinbase_v3_liquidity_update() { + new_test_ext(1).execute_with(|| { + let owner_hotkey = U256::from(1); + let owner_coldkey = U256::from(2); + + // add network + let netuid = add_dynamic_network(&owner_hotkey, &owner_coldkey); + + // Force the swap to initialize + SubtensorModule::swap_tao_for_alpha( + netuid, + TaoBalance::ZERO, + 1_000_000_000_000_u64.into(), + false, + ) + .unwrap(); + + let tao_before = SubnetTAO::::get(netuid); + let alpha_in_before = SubnetAlphaIn::::get(netuid); + + // Enable emissions and run coinbase (which will adjust protocol liquidity) + let emission: u64 = 1_234_567; + let emission_credit = SubtensorModule::mint_tao(emission.into()); + // Price-based emission shares require a non-zero moving price. + SubnetMovingPrice::::insert(netuid, I96F32::from_num(1)); + // Keep root_proportion ~1 so the injection cap does not bind. + set_full_injection_root_stake(); + FirstEmissionBlockNumber::::insert(netuid, 0); + SubtensorModule::run_coinbase(emission_credit); + + assert!(!SubnetTaoInEmission::::get(netuid).is_zero()); + assert!(!SubnetAlphaInEmission::::get(netuid).is_zero()); + assert!(SubnetTAO::::get(netuid) > tao_before); + assert!(SubnetAlphaIn::::get(netuid) > alpha_in_before); + }); +} + // SKIP_WASM_BUILD=1 RUST_LOG=debug cargo test --package pallet-subtensor --lib -- tests::coinbase::test_drain_alpha_childkey_parentkey_with_burn --exact --show-output --nocapture #[test] fn test_drain_alpha_childkey_parentkey_with_burn() { diff --git a/pallets/subtensor/src/tests/locks.rs b/pallets/subtensor/src/tests/locks.rs index 4eaf01668c..2136777cd7 100644 --- a/pallets/subtensor/src/tests/locks.rs +++ b/pallets/subtensor/src/tests/locks.rs @@ -6,6 +6,7 @@ )] use approx::assert_abs_diff_eq; +use frame_support::dispatch::{GetDispatchInfo, Pays}; use frame_support::weights::Weight; use frame_support::{assert_noop, assert_ok}; use safe_math::FixedExt; @@ -96,6 +97,40 @@ fn roll_forward_individual_lock( ) } +#[test] +fn test_account_flags_default_to_zero_and_reject_locked_alpha_setter_pays_fee() { + new_test_ext(1).execute_with(|| { + let coldkey = U256::from(1); + + assert_eq!(AccountFlags::::get(coldkey), 0); + assert!(!AccountFlags::::contains_key(coldkey)); + assert!(SubtensorModule::account_rejects_locked_alpha(&coldkey)); + + let call = + RuntimeCall::SubtensorModule(crate::Call::set_reject_locked_alpha { enabled: true }); + assert_eq!(call.get_dispatch_info().pays_fee, Pays::Yes); + + assert_ok!(SubtensorModule::set_reject_locked_alpha( + RuntimeOrigin::signed(coldkey), + false, + )); + assert_eq!( + AccountFlags::::get(coldkey), + ACCOUNT_FLAGS_ACCEPT_LOCKED_ALPHA + ); + assert!(AccountFlags::::contains_key(coldkey)); + assert!(!SubtensorModule::account_rejects_locked_alpha(&coldkey)); + + assert_ok!(SubtensorModule::set_reject_locked_alpha( + RuntimeOrigin::signed(coldkey), + true, + )); + assert_eq!(AccountFlags::::get(coldkey), 0); + assert!(!AccountFlags::::contains_key(coldkey)); + assert!(SubtensorModule::account_rejects_locked_alpha(&coldkey)); + }); +} + fn roll_forward_hotkey_lock(lock: LockState, now: u64) -> LockState { roll_forward_lock(lock, now, false, true) } @@ -2152,6 +2187,10 @@ fn test_do_transfer_stake_same_subnet_transfers_lock_to_destination_coldkey() { let hotkey = U256::from(2); let netuid = setup_subnet_with_stake(coldkey_sender, hotkey, 100_000_000_000); DecayingLock::::insert(coldkey_receiver, netuid, false); + assert_ok!(SubtensorModule::set_reject_locked_alpha( + RuntimeOrigin::signed(coldkey_receiver), + false, + )); let total = SubtensorModule::total_coldkey_alpha_on_subnet(&coldkey_sender, netuid); let lock_half = total / 2.into(); @@ -2247,6 +2286,101 @@ fn test_move_stake_cross_subnet_blocked_by_lock() { }); } +#[test] +fn test_do_transfer_stake_rejects_locked_alpha_to_flagged_destination() { + new_test_ext(1).execute_with(|| { + let coldkey_sender = U256::from(1); + let coldkey_receiver = U256::from(5); + let hotkey = U256::from(2); + let netuid = setup_subnet_with_stake(coldkey_sender, hotkey, 100_000_000_000); + + let total = SubtensorModule::total_coldkey_alpha_on_subnet(&coldkey_sender, netuid); + let lock_half = total / 2.into(); + assert_ok!(SubtensorModule::do_lock_stake( + &coldkey_sender, + netuid, + &hotkey, + lock_half, + )); + assert_ok!(SubtensorModule::set_reject_locked_alpha( + RuntimeOrigin::signed(coldkey_receiver), + true, + )); + + let sender_lock_before = + Lock::::get((coldkey_sender, netuid, hotkey)).expect("sender lock should exist"); + let sender_alpha_before = + SubtensorModule::total_coldkey_alpha_on_subnet(&coldkey_sender, netuid); + let receiver_alpha_before = + SubtensorModule::total_coldkey_alpha_on_subnet(&coldkey_receiver, netuid); + + assert_noop!( + SubtensorModule::do_transfer_stake( + RuntimeOrigin::signed(coldkey_sender), + coldkey_receiver, + hotkey, + netuid, + netuid, + total, + ), + Error::::AccountRejectsLockedAlpha + ); + + assert_eq!( + Lock::::get((coldkey_sender, netuid, hotkey)), + Some(sender_lock_before) + ); + assert!(Lock::::get((coldkey_receiver, netuid, hotkey)).is_none()); + assert_eq!( + SubtensorModule::total_coldkey_alpha_on_subnet(&coldkey_sender, netuid), + sender_alpha_before + ); + assert_eq!( + SubtensorModule::total_coldkey_alpha_on_subnet(&coldkey_receiver, netuid), + receiver_alpha_before + ); + }); +} + +#[test] +fn test_do_transfer_stake_allows_unlocked_alpha_to_flagged_destination() { + new_test_ext(1).execute_with(|| { + let coldkey_sender = U256::from(1); + let coldkey_receiver = U256::from(5); + let hotkey = U256::from(2); + let netuid = setup_subnet_with_stake(coldkey_sender, hotkey, 100_000_000_000); + + let total = SubtensorModule::total_coldkey_alpha_on_subnet(&coldkey_sender, netuid); + let lock_half = total / 2.into(); + assert_ok!(SubtensorModule::do_lock_stake( + &coldkey_sender, + netuid, + &hotkey, + lock_half, + )); + assert_ok!(SubtensorModule::set_reject_locked_alpha( + RuntimeOrigin::signed(coldkey_receiver), + true, + )); + + let unlocked_transfer = lock_half / 2.into(); + assert_ok!(SubtensorModule::do_transfer_stake( + RuntimeOrigin::signed(coldkey_sender), + coldkey_receiver, + hotkey, + netuid, + netuid, + unlocked_transfer, + )); + + assert!(Lock::::get((coldkey_receiver, netuid, hotkey)).is_none()); + assert_eq!( + SubtensorModule::total_coldkey_alpha_on_subnet(&coldkey_receiver, netuid), + unlocked_transfer + ); + }); +} + #[test] fn test_transfer_stake_cross_coldkey_allowed_partial() { new_test_ext(1).execute_with(|| { @@ -3284,6 +3418,10 @@ fn test_coldkey_swap_swaps_lock() { &hotkey, 5000u64.into(), )); + assert_ok!(SubtensorModule::set_reject_locked_alpha( + RuntimeOrigin::signed(new_coldkey), + false, + )); // Perform coldkey swap assert_ok!(SubtensorModule::do_swap_coldkey(&old_coldkey, &new_coldkey)); @@ -3318,6 +3456,10 @@ fn test_coldkey_swap_lock_blocks_unstake() { &hotkey, total, )); + assert_ok!(SubtensorModule::set_reject_locked_alpha( + RuntimeOrigin::signed(new_coldkey), + false, + )); // Swap coldkey assert_ok!(SubtensorModule::do_swap_coldkey(&old_coldkey, &new_coldkey)); @@ -3452,6 +3594,49 @@ fn test_coldkey_swap_rejects_destination_lock() { }); } +#[test] +fn test_coldkey_swap_rejects_locked_alpha_to_flagged_destination() { + new_test_ext(1).execute_with(|| { + let old_coldkey = U256::from(1); + let new_coldkey = U256::from(10); + let old_hotkey = U256::from(2); + let netuid = subtensor_runtime_common::NetUid::from(1); + + let old_locked = AlphaBalance::from(7_000u64); + let old_conviction = U64F64::from_num(77); + + SubtensorModule::insert_lock_state( + &old_coldkey, + netuid, + &old_hotkey, + LockState { + locked_mass: old_locked, + conviction: old_conviction, + last_update: SubtensorModule::get_current_block_as_u64(), + }, + ); + assert_ok!(SubtensorModule::set_reject_locked_alpha( + RuntimeOrigin::signed(new_coldkey), + true, + )); + + assert_noop!( + SubtensorModule::swap_coldkey_locks(&old_coldkey, &new_coldkey), + Error::::AccountRejectsLockedAlpha + ); + + let source_lock = Lock::::get((old_coldkey, netuid, old_hotkey)) + .expect("source lock should remain after failed transfer"); + assert_eq!(source_lock.locked_mass, old_locked); + assert_eq!(source_lock.conviction, old_conviction); + assert!( + Lock::::iter_prefix((new_coldkey, netuid)) + .next() + .is_none() + ); + }); +} + #[test] // The public coldkey swap extrinsic runs inside a storage layer, so a late failure rolls back the earlier writes. fn test_failed_coldkey_swap_extrinsic_rolls_back_state_changes() { diff --git a/pallets/subtensor/src/weights.rs b/pallets/subtensor/src/weights.rs index 84cb42ae8c..4b5806aaf5 100644 --- a/pallets/subtensor/src/weights.rs +++ b/pallets/subtensor/src/weights.rs @@ -1314,6 +1314,8 @@ impl WeightInfo for SubstrateWeight { /// 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::AccountFlags` (r:1 w:0) + /// Proof: `SubtensorModule::AccountFlags` (`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:0) @@ -1326,11 +1328,11 @@ 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: `1988` - // Estimated: `7928` - // Minimum execution time: 108_000_000 picoseconds. - Weight::from_parts(109_000_000, 7928) - .saturating_add(T::DbWeight::get().reads(18_u64)) + // Measured: `2054` + // Estimated: `7994` + // Minimum execution time: 254_636_000 picoseconds. + Weight::from_parts(258_541_000, 7994) + .saturating_add(T::DbWeight::get().reads(19_u64)) .saturating_add(T::DbWeight::get().writes(6_u64)) } /// Storage: `SubtensorModule::Alpha` (r:2 w:0) @@ -3800,6 +3802,8 @@ impl WeightInfo for () { /// 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::AccountFlags` (r:1 w:0) + /// Proof: `SubtensorModule::AccountFlags` (`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:0) @@ -3812,11 +3816,11 @@ impl WeightInfo for () { /// Proof: `SubtensorModule::LastColdkeyHotkeyStakeBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) fn transfer_stake() -> Weight { // Proof Size summary in bytes: - // Measured: `1988` - // Estimated: `7928` - // Minimum execution time: 108_000_000 picoseconds. - Weight::from_parts(109_000_000, 7928) - .saturating_add(RocksDbWeight::get().reads(18_u64)) + // Measured: `2054` + // Estimated: `7994` + // Minimum execution time: 254_636_000 picoseconds. + Weight::from_parts(258_541_000, 7994) + .saturating_add(RocksDbWeight::get().reads(19_u64)) .saturating_add(RocksDbWeight::get().writes(6_u64)) } /// Storage: `SubtensorModule::Alpha` (r:2 w:0) From 0f1b015027e5c40bc9c11d2a0f2c5c0491c1fb85 Mon Sep 17 00:00:00 2001 From: unconst Date: Mon, 22 Jun 2026 14:02:16 -0600 Subject: [PATCH 08/13] Scale chain emission away from subnets burning miner emission - Add a per-subnet MinerBurned storage holding the proportion (0..1) of each tempo's miner (incentive) emission that was burned during emission distribution because the recipient hotkey is owned by the subnet owner. - Weight price-based emission shares by (1 - miner_burned) and renormalize, so subnets that burn more of their miner emission receive proportionally less chain emission (reallocated toward non-burning subnets). Co-authored-by: Cursor --- .../subtensor/src/coinbase/run_coinbase.rs | 11 +++++++ .../src/coinbase/subnet_emissions.rs | 32 ++++++++++++++++++- pallets/subtensor/src/lib.rs | 12 +++++++ 3 files changed, 54 insertions(+), 1 deletion(-) diff --git a/pallets/subtensor/src/coinbase/run_coinbase.rs b/pallets/subtensor/src/coinbase/run_coinbase.rs index 6b2ea6de0b..f1b3df0a9b 100644 --- a/pallets/subtensor/src/coinbase/run_coinbase.rs +++ b/pallets/subtensor/src/coinbase/run_coinbase.rs @@ -669,8 +669,12 @@ impl Pallet { let subnet_owner_coldkey = SubnetOwner::::get(netuid); let owner_hotkeys = Self::get_owner_hotkeys(netuid, &subnet_owner_coldkey); log::debug!("incentives: owner hotkeys: {owner_hotkeys:?}"); + // Track total vs burned miner emission this tempo to record the burned proportion. + let mut total_incentive: AlphaBalance = AlphaBalance::ZERO; + let mut burned_incentive: AlphaBalance = AlphaBalance::ZERO; for (hotkey, incentive) in incentives { log::debug!("incentives: hotkey: {incentive:?}"); + total_incentive = total_incentive.saturating_add(incentive); // Skip/burn miner-emission for immune keys if owner_hotkeys.contains(&hotkey) { @@ -686,6 +690,7 @@ impl Pallet { Ok(RecycleOrBurnEnum::Burn) | Err(_) => { log::debug!("burning {incentive:?}"); Self::burn_subnet_alpha(netuid, incentive); + burned_incentive = burned_incentive.saturating_add(incentive); } } continue; @@ -716,6 +721,12 @@ impl Pallet { ); } + // Record the proportion of this tempo's miner emission that was burned. + let burned_proportion: U96F32 = U96F32::saturating_from_num(burned_incentive.to_u64()) + .checked_div(U96F32::saturating_from_num(total_incentive.to_u64())) + .unwrap_or_else(|| U96F32::saturating_from_num(0)); + MinerBurned::::insert(netuid, burned_proportion); + // Distribute alpha divs. let _ = AlphaDividendsPerSubnet::::clear_prefix(netuid, u32::MAX, None); for (hotkey, mut alpha_divs) in alpha_dividends { diff --git a/pallets/subtensor/src/coinbase/subnet_emissions.rs b/pallets/subtensor/src/coinbase/subnet_emissions.rs index caab671ed4..99188eb1f9 100644 --- a/pallets/subtensor/src/coinbase/subnet_emissions.rs +++ b/pallets/subtensor/src/coinbase/subnet_emissions.rs @@ -352,7 +352,37 @@ impl Pallet { // redistributed to enabled subnets in `get_subnet_block_emissions`, so the // effective emission is e_i = p_i / sum(p_j) over emit-enabled subnets. pub(crate) fn get_shares(subnets_to_emit_to: &[NetUid]) -> BTreeMap { - Self::get_shares_price_ema(subnets_to_emit_to) + let price_shares = Self::get_shares_price_ema(subnets_to_emit_to); + + // Reallocate emission away from subnets that burn miner emission: weight each + // subnet's price share by (1 - miner_burned_proportion), then renormalize so the + // block's total emission is preserved and redistributed toward subnets that are + // not burning their miner emission. + let zero = U64F64::saturating_from_num(0); + let one = U64F64::saturating_from_num(1); + let weighted: BTreeMap = price_shares + .iter() + .map(|(netuid, share)| { + let burned = U64F64::saturating_from_num(MinerBurned::::get(netuid)).min(one); + (*netuid, share.saturating_mul(one.saturating_sub(burned))) + }) + .collect(); + + let total_weight = weighted + .values() + .copied() + .fold(zero, |acc, w| acc.saturating_add(w)); + + if total_weight > zero { + weighted + .into_iter() + .map(|(netuid, w)| (netuid, w.safe_div(total_weight))) + .collect() + } else { + // Every eligible subnet is burning all of its miner emission; fall back to + // the unweighted price shares so the block's emission is not stranded. + price_shares + } } // Implementation of shares that uses subnet EMA prices (SubnetMovingPrice), diff --git a/pallets/subtensor/src/lib.rs b/pallets/subtensor/src/lib.rs index c26d15ee37..894fa2e840 100644 --- a/pallets/subtensor/src/lib.rs +++ b/pallets/subtensor/src/lib.rs @@ -1934,6 +1934,18 @@ pub mod pallet { pub type PendingOwnerCut = StorageMap<_, Identity, NetUid, AlphaBalance, ValueQuery, DefaultZeroAlpha>; + /// Default miner-burned proportion. + #[pallet::type_value] + pub fn DefaultMinerBurned() -> U96F32 { + U96F32::saturating_from_num(0.0) + } + /// --- MAP ( netuid ) --> miner_burned | Proportion (0..1) of this tempo's miner + /// (incentive) emission that was burned during emission distribution because the + /// recipient hotkey is owned by the subnet owner (immune key). + #[pallet::storage] + pub type MinerBurned = + StorageMap<_, Identity, NetUid, U96F32, ValueQuery, DefaultMinerBurned>; + /// --- MAP ( netuid ) --> blocks_since_last_step #[pallet::storage] pub type BlocksSinceLastStep = From bd12953fd5b9989758949ec3939e90acb25feb7c Mon Sep 17 00:00:00 2001 From: unconst Date: Mon, 22 Jun 2026 14:13:55 -0600 Subject: [PATCH 09/13] Address review of miner-burn emission scaling - Count miner emission withheld via an owner/immune hotkey toward the burned proportion whether it is recycled or burned, so the emission penalty is independent of a subnet's RecycleOrBurn config (no Recycle bypass, no unique penalty for the unset default). - Clear MinerBurned on subnet removal so a deregistered subnet leaves no stale proportion; extend dissolve cleanup test to cover it. - Add active tests for the price-share reweight by (1 - miner_burned): no-burn, partial burn, full burn, and all-full-burn fallback to price shares. Co-authored-by: Cursor --- pallets/subtensor/src/coinbase/root.rs | 1 + .../subtensor/src/coinbase/run_coinbase.rs | 18 ++-- pallets/subtensor/src/lib.rs | 6 +- pallets/subtensor/src/tests/networks.rs | 2 + .../subtensor/src/tests/subnet_emissions.rs | 99 +++++++++++++++++++ 5 files changed, 118 insertions(+), 8 deletions(-) diff --git a/pallets/subtensor/src/coinbase/root.rs b/pallets/subtensor/src/coinbase/root.rs index d339e0ec83..b4db388621 100644 --- a/pallets/subtensor/src/coinbase/root.rs +++ b/pallets/subtensor/src/coinbase/root.rs @@ -323,6 +323,7 @@ impl Pallet { PendingServerEmission::::remove(netuid); PendingRootAlphaDivs::::remove(netuid); PendingOwnerCut::::remove(netuid); + MinerBurned::::remove(netuid); BlocksSinceLastStep::::remove(netuid); LastMechansimStepBlock::::remove(netuid); LastAdjustmentBlock::::remove(netuid); diff --git a/pallets/subtensor/src/coinbase/run_coinbase.rs b/pallets/subtensor/src/coinbase/run_coinbase.rs index f1b3df0a9b..d7c75964b2 100644 --- a/pallets/subtensor/src/coinbase/run_coinbase.rs +++ b/pallets/subtensor/src/coinbase/run_coinbase.rs @@ -669,9 +669,10 @@ impl Pallet { let subnet_owner_coldkey = SubnetOwner::::get(netuid); let owner_hotkeys = Self::get_owner_hotkeys(netuid, &subnet_owner_coldkey); log::debug!("incentives: owner hotkeys: {owner_hotkeys:?}"); - // Track total vs burned miner emission this tempo to record the burned proportion. + // Track total miner emission vs the portion withheld from miners this tempo + // (directed to an owner/immune hotkey) to record the withheld proportion. let mut total_incentive: AlphaBalance = AlphaBalance::ZERO; - let mut burned_incentive: AlphaBalance = AlphaBalance::ZERO; + let mut withheld_incentive: AlphaBalance = AlphaBalance::ZERO; for (hotkey, incentive) in incentives { log::debug!("incentives: hotkey: {incentive:?}"); total_incentive = total_incentive.saturating_add(incentive); @@ -681,6 +682,11 @@ impl Pallet { log::debug!( "incentives: hotkey: {hotkey:?} is SN owner hotkey or associated hotkey, skipping {incentive:?}" ); + // Miner emission directed to an owner (immune) hotkey is withheld from + // miners whether it is recycled or burned. Count both toward the withheld + // proportion so the emission penalty cannot be dodged by choosing Recycle + // and an unset RecycleOrBurn config is not uniquely penalized. + withheld_incentive = withheld_incentive.saturating_add(incentive); // Check if we should recycle or burn the incentive match RecycleOrBurn::::try_get(netuid) { Ok(RecycleOrBurnEnum::Recycle) => { @@ -690,7 +696,6 @@ impl Pallet { Ok(RecycleOrBurnEnum::Burn) | Err(_) => { log::debug!("burning {incentive:?}"); Self::burn_subnet_alpha(netuid, incentive); - burned_incentive = burned_incentive.saturating_add(incentive); } } continue; @@ -721,11 +726,12 @@ impl Pallet { ); } - // Record the proportion of this tempo's miner emission that was burned. - let burned_proportion: U96F32 = U96F32::saturating_from_num(burned_incentive.to_u64()) + // Record the proportion of this tempo's miner emission that was withheld from + // miners (directed to owner/immune hotkeys, whether recycled or burned). + let withheld_proportion: U96F32 = U96F32::saturating_from_num(withheld_incentive.to_u64()) .checked_div(U96F32::saturating_from_num(total_incentive.to_u64())) .unwrap_or_else(|| U96F32::saturating_from_num(0)); - MinerBurned::::insert(netuid, burned_proportion); + MinerBurned::::insert(netuid, withheld_proportion); // Distribute alpha divs. let _ = AlphaDividendsPerSubnet::::clear_prefix(netuid, u32::MAX, None); diff --git a/pallets/subtensor/src/lib.rs b/pallets/subtensor/src/lib.rs index 894fa2e840..b1afef3401 100644 --- a/pallets/subtensor/src/lib.rs +++ b/pallets/subtensor/src/lib.rs @@ -1940,8 +1940,10 @@ pub mod pallet { U96F32::saturating_from_num(0.0) } /// --- MAP ( netuid ) --> miner_burned | Proportion (0..1) of this tempo's miner - /// (incentive) emission that was burned during emission distribution because the - /// recipient hotkey is owned by the subnet owner (immune key). + /// (incentive) emission that was withheld from miners during emission distribution + /// because the recipient hotkey is owned by the subnet owner (immune key). Counts + /// emission that is either recycled or burned, so the value is independent of the + /// subnet's RecycleOrBurn configuration. #[pallet::storage] pub type MinerBurned = StorageMap<_, Identity, NetUid, U96F32, ValueQuery, DefaultMinerBurned>; diff --git a/pallets/subtensor/src/tests/networks.rs b/pallets/subtensor/src/tests/networks.rs index 4696507e2e..a967761ef5 100644 --- a/pallets/subtensor/src/tests/networks.rs +++ b/pallets/subtensor/src/tests/networks.rs @@ -406,6 +406,7 @@ fn dissolve_clears_all_per_subnet_storages() { PendingValidatorEmission::::insert(net, AlphaBalance::from(1)); PendingRootAlphaDivs::::insert(net, AlphaBalance::from(1)); PendingOwnerCut::::insert(net, AlphaBalance::from(1)); + MinerBurned::::insert(net, substrate_fixed::types::U96F32::from_num(1)); BlocksSinceLastStep::::insert(net, 1u64); LastMechansimStepBlock::::insert(net, 1u64); ServingRateLimit::::insert(net, 1u64); @@ -563,6 +564,7 @@ fn dissolve_clears_all_per_subnet_storages() { assert!(!PendingValidatorEmission::::contains_key(net)); assert!(!PendingRootAlphaDivs::::contains_key(net)); assert!(!PendingOwnerCut::::contains_key(net)); + assert!(!MinerBurned::::contains_key(net)); assert!(!BlocksSinceLastStep::::contains_key(net)); assert!(!LastMechansimStepBlock::::contains_key(net)); assert!(!ServingRateLimit::::contains_key(net)); diff --git a/pallets/subtensor/src/tests/subnet_emissions.rs b/pallets/subtensor/src/tests/subnet_emissions.rs index 4bb1aa4c75..b18a1163c1 100644 --- a/pallets/subtensor/src/tests/subnet_emissions.rs +++ b/pallets/subtensor/src/tests/subnet_emissions.rs @@ -151,6 +151,105 @@ fn inplace_pow_normalize_fractional_exponent() { }) } +/// Configure a dynamic subnet with a given EMA price and miner-burned proportion so +/// `get_shares` (price-based, reweighted by `1 - miner_burned`) can be exercised. +fn set_price_and_burn(netuid: NetUid, price: f64, burned: f64) { + SubnetMechanism::::insert(netuid, 1); + SubnetMovingPrice::::insert(netuid, i96f32(price)); + MinerBurned::::insert(netuid, U96F32::from_num(burned)); +} + +/// With no miner emission burned anywhere, `get_shares` is exactly the price-based +/// share: e_i = p_i / sum(p_j). +#[test] +fn get_shares_no_burn_matches_price_shares() { + new_test_ext(1).execute_with(|| { + let n1 = NetUid::from(1); + let n2 = NetUid::from(2); + let n3 = NetUid::from(3); + set_price_and_burn(n1, 1.0, 0.0); + set_price_and_burn(n2, 2.0, 0.0); + set_price_and_burn(n3, 3.0, 0.0); + + let shares = SubtensorModule::get_shares(&[n1, n2, n3]); + let s1 = shares.get(&n1).unwrap().to_num::(); + let s2 = shares.get(&n2).unwrap().to_num::(); + let s3 = shares.get(&n3).unwrap().to_num::(); + + assert_abs_diff_eq!(s1, 1.0 / 6.0, epsilon = 1e-9); + assert_abs_diff_eq!(s2, 2.0 / 6.0, epsilon = 1e-9); + assert_abs_diff_eq!(s3, 3.0 / 6.0, epsilon = 1e-9); + assert_abs_diff_eq!(s1 + s2 + s3, 1.0, epsilon = 1e-9); + }); +} + +/// A partial burn reallocates emission away from the burning subnet and toward the +/// non-burning one, while shares still sum to 1. +#[test] +fn get_shares_partial_burn_reallocates_away_from_burner() { + new_test_ext(1).execute_with(|| { + let n1 = NetUid::from(1); + let n2 = NetUid::from(2); + // Equal prices so the price side is neutral; n1 burns 50% of its miner emission. + set_price_and_burn(n1, 1.0, 0.5); + set_price_and_burn(n2, 1.0, 0.0); + + // weighted: n1 = 0.5 * (1 - 0.5) = 0.25, n2 = 0.5 * 1 = 0.5; total = 0.75 + let shares = SubtensorModule::get_shares(&[n1, n2]); + let s1 = shares.get(&n1).unwrap().to_num::(); + let s2 = shares.get(&n2).unwrap().to_num::(); + + assert_abs_diff_eq!(s1, 1.0 / 3.0, epsilon = 1e-9); + assert_abs_diff_eq!(s2, 2.0 / 3.0, epsilon = 1e-9); + assert_abs_diff_eq!(s1 + s2, 1.0, epsilon = 1e-9); + assert!( + s2 > s1, + "non-burning subnet should receive more: s1={s1}, s2={s2}" + ); + }); +} + +/// A subnet burning 100% of its miner emission receives zero chain emission; the rest +/// goes entirely to the non-burning subnet. +#[test] +fn get_shares_full_burn_gets_zero_emission() { + new_test_ext(1).execute_with(|| { + let n1 = NetUid::from(1); + let n2 = NetUid::from(2); + set_price_and_burn(n1, 1.0, 1.0); + set_price_and_burn(n2, 1.0, 0.0); + + let shares = SubtensorModule::get_shares(&[n1, n2]); + let s1 = shares.get(&n1).unwrap().to_num::(); + let s2 = shares.get(&n2).unwrap().to_num::(); + + assert_abs_diff_eq!(s1, 0.0, epsilon = 1e-9); + assert_abs_diff_eq!(s2, 1.0, epsilon = 1e-9); + }); +} + +/// When every subnet burns all of its miner emission, the reweighting would zero the +/// total, so `get_shares` falls back to unweighted price shares (emission is not +/// stranded). +#[test] +fn get_shares_all_full_burn_falls_back_to_price_shares() { + new_test_ext(1).execute_with(|| { + let n1 = NetUid::from(1); + let n2 = NetUid::from(2); + set_price_and_burn(n1, 1.0, 1.0); + set_price_and_burn(n2, 3.0, 1.0); + + let shares = SubtensorModule::get_shares(&[n1, n2]); + let s1 = shares.get(&n1).unwrap().to_num::(); + let s2 = shares.get(&n2).unwrap().to_num::(); + + // Fallback: price-proportional (1:3), not zeroed. + assert_abs_diff_eq!(s1, 1.0 / 4.0, epsilon = 1e-9); + assert_abs_diff_eq!(s2, 3.0 / 4.0, epsilon = 1e-9); + assert_abs_diff_eq!(s1 + s2, 1.0, epsilon = 1e-9); + }); +} + // /// Normal (moderate, non-zero) EMA flows across 3 subnets. // /// Expect: shares sum to ~1 and are monotonic with flows. // #[test] From 9562a82fc0e9cc90e51d1031e6ba1835b718efa8 Mon Sep 17 00:00:00 2001 From: unconst Date: Mon, 22 Jun 2026 14:46:03 -0600 Subject: [PATCH 10/13] Weight emission shares by root_proportion (favor newer subnets) Emission share is now proportional to root_proportion * price * (1 - miner_burned), renormalized. Multiplying by root_proportion (which shrinks as a subnet's alpha issuance grows) reallocates chain emission away from older subnets toward newer ones, easing entrance for new subnets. Falls back to unweighted price shares when the combined weight is zero (e.g. no root stake). Adds get_shares tests: no-burn, partial/full burn, all-full-burn fallback, and root_proportion favoring newer subnets. Co-authored-by: Cursor --- .../src/coinbase/subnet_emissions.rs | 19 +++++--- .../subtensor/src/tests/subnet_emissions.rs | 46 ++++++++++++++++++- 2 files changed, 56 insertions(+), 9 deletions(-) diff --git a/pallets/subtensor/src/coinbase/subnet_emissions.rs b/pallets/subtensor/src/coinbase/subnet_emissions.rs index 99188eb1f9..f378e3e930 100644 --- a/pallets/subtensor/src/coinbase/subnet_emissions.rs +++ b/pallets/subtensor/src/coinbase/subnet_emissions.rs @@ -354,17 +354,21 @@ impl Pallet { pub(crate) fn get_shares(subnets_to_emit_to: &[NetUid]) -> BTreeMap { let price_shares = Self::get_shares_price_ema(subnets_to_emit_to); - // Reallocate emission away from subnets that burn miner emission: weight each - // subnet's price share by (1 - miner_burned_proportion), then renormalize so the - // block's total emission is preserved and redistributed toward subnets that are - // not burning their miner emission. + // Weight each subnet's price share by root_proportion * (1 - miner_burned), then + // renormalize. The effective emission is therefore proportional to + // root_proportion_i * price_i * (1 - miner_burned_i). + // - root_proportion shrinks as a subnet's alpha issuance grows, so emission is + // reallocated away from older subnets toward newer ones (easier entrance). + // - (1 - miner_burned) reallocates away from subnets that withhold miner emission. let zero = U64F64::saturating_from_num(0); let one = U64F64::saturating_from_num(1); let weighted: BTreeMap = price_shares .iter() .map(|(netuid, share)| { let burned = U64F64::saturating_from_num(MinerBurned::::get(netuid)).min(one); - (*netuid, share.saturating_mul(one.saturating_sub(burned))) + let root_prop = U64F64::saturating_from_num(Self::root_proportion(*netuid)); + let factor = root_prop.saturating_mul(one.saturating_sub(burned)); + (*netuid, share.saturating_mul(factor)) }) .collect(); @@ -379,8 +383,9 @@ impl Pallet { .map(|(netuid, w)| (netuid, w.safe_div(total_weight))) .collect() } else { - // Every eligible subnet is burning all of its miner emission; fall back to - // the unweighted price shares so the block's emission is not stranded. + // The combined weight zeroes out for every subnet (e.g. no root stake, or + // every subnet burning all of its miner emission); fall back to the + // unweighted price shares so the block's emission is not stranded. price_shares } } diff --git a/pallets/subtensor/src/tests/subnet_emissions.rs b/pallets/subtensor/src/tests/subnet_emissions.rs index b18a1163c1..61af8b0cc7 100644 --- a/pallets/subtensor/src/tests/subnet_emissions.rs +++ b/pallets/subtensor/src/tests/subnet_emissions.rs @@ -5,7 +5,7 @@ use alloc::{collections::BTreeMap, vec::Vec}; use approx::assert_abs_diff_eq; use sp_core::U256; use substrate_fixed::types::{I64F64, I96F32, U64F64, U96F32}; -use subtensor_runtime_common::{NetUid, TaoBalance}; +use subtensor_runtime_common::{AlphaBalance, NetUid, TaoBalance}; fn u64f64(x: f64) -> U64F64 { U64F64::from_num(x) @@ -152,8 +152,15 @@ fn inplace_pow_normalize_fractional_exponent() { } /// Configure a dynamic subnet with a given EMA price and miner-burned proportion so -/// `get_shares` (price-based, reweighted by `1 - miner_burned`) can be exercised. +/// `get_shares` can be exercised. Also seeds a large root stake with full TAO weight so +/// that, with zero alpha issuance on the test subnets, `root_proportion` is 1 and the +/// root-proportion factor in `get_shares` is neutral (isolating the price/burn weighting). fn set_price_and_burn(netuid: NetUid, price: f64, burned: f64) { + SubnetTAO::::insert( + NetUid::ROOT, + TaoBalance::from(1_000_000_000_000_000_000_u64), + ); + SubtensorModule::set_tao_weight(u64::MAX); SubnetMechanism::::insert(netuid, 1); SubnetMovingPrice::::insert(netuid, i96f32(price)); MinerBurned::::insert(netuid, U96F32::from_num(burned)); @@ -250,6 +257,41 @@ fn get_shares_all_full_burn_falls_back_to_price_shares() { }); } +/// With equal price and no burn, the root_proportion factor reallocates emission toward +/// the newer subnet (lower alpha issuance => higher root_proportion) and away from the +/// older one (higher alpha issuance => lower root_proportion). +#[test] +fn get_shares_root_proportion_favors_newer_subnets() { + new_test_ext(1).execute_with(|| { + let n1 = NetUid::from(1); + let n2 = NetUid::from(2); + // Equal price, no burn; root proportion factor is the only differentiator. + set_price_and_burn(n1, 1.0, 0.0); + set_price_and_burn(n2, 1.0, 0.0); + + // tao_weight = 1.0 (u64::MAX), so tao_weight term = root_tao. Set root_tao = 1000 + // and per-subnet alpha issuance to make root_proportion deterministic: + // n1: issuance 1000 => root_prop = 1000 / (1000 + 1000) = 0.5 + // n2: issuance 3000 => root_prop = 1000 / (1000 + 3000) = 0.25 + SubnetTAO::::insert(NetUid::ROOT, TaoBalance::from(1_000_u64)); + SubnetAlphaOut::::insert(n1, AlphaBalance::from(1_000_u64)); + SubnetAlphaOut::::insert(n2, AlphaBalance::from(3_000_u64)); + + // weighted: n1 = 0.5(price) * 0.5(root) = 0.25, n2 = 0.5 * 0.25 = 0.125; total 0.375 + let shares = SubtensorModule::get_shares(&[n1, n2]); + let s1 = shares.get(&n1).unwrap().to_num::(); + let s2 = shares.get(&n2).unwrap().to_num::(); + + assert_abs_diff_eq!(s1, 2.0 / 3.0, epsilon = 1e-6); + assert_abs_diff_eq!(s2, 1.0 / 3.0, epsilon = 1e-6); + assert_abs_diff_eq!(s1 + s2, 1.0, epsilon = 1e-9); + assert!( + s1 > s2, + "newer subnet (higher root_prop) should get more: s1={s1}, s2={s2}" + ); + }); +} + // /// Normal (moderate, non-zero) EMA flows across 3 subnets. // /// Expect: shares sum to ~1 and are monotonic with flows. // #[test] From 9818f45587acb81652c9149f63bda967abe37fe6 Mon Sep 17 00:00:00 2001 From: Greg Zaitsev Date: Mon, 22 Jun 2026 23:55:36 +0300 Subject: [PATCH 11/13] address ai review --- pallets/subtensor/src/tests/locks.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pallets/subtensor/src/tests/locks.rs b/pallets/subtensor/src/tests/locks.rs index 2136777cd7..91b48b7881 100644 --- a/pallets/subtensor/src/tests/locks.rs +++ b/pallets/subtensor/src/tests/locks.rs @@ -3504,6 +3504,7 @@ fn test_coldkey_swap_allows_destination_conviction_only_lock() { last_update: SubtensorModule::get_current_block_as_u64(), }, ); + DecayingLock::::insert(old_coldkey, netuid, false); SubtensorModule::insert_lock_state( &new_coldkey, netuid, @@ -3532,6 +3533,8 @@ fn test_coldkey_swap_allows_destination_conviction_only_lock() { assert_eq!(swapped_lock.locked_mass, AlphaBalance::ZERO); assert_eq!(swapped_lock.conviction, old_conviction); assert_eq!(Lock::::iter_prefix((new_coldkey, netuid)).count(), 2); + assert!(DecayingLock::::get(old_coldkey, netuid).is_none()); + assert_eq!(DecayingLock::::get(new_coldkey, netuid), Some(false)); }); } @@ -3615,6 +3618,7 @@ fn test_coldkey_swap_rejects_locked_alpha_to_flagged_destination() { last_update: SubtensorModule::get_current_block_as_u64(), }, ); + DecayingLock::::insert(old_coldkey, netuid, false); assert_ok!(SubtensorModule::set_reject_locked_alpha( RuntimeOrigin::signed(new_coldkey), true, @@ -3634,6 +3638,8 @@ fn test_coldkey_swap_rejects_locked_alpha_to_flagged_destination() { .next() .is_none() ); + assert_eq!(DecayingLock::::get(old_coldkey, netuid), Some(false)); + assert!(DecayingLock::::get(new_coldkey, netuid).is_none()); }); } From eaf54112751f8627137a867e3329d9a6c1baf12f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 23 Jun 2026 15:30:27 +0000 Subject: [PATCH 12/13] auto-update benchmark weights --- pallets/admin-utils/src/weights.rs | 1148 +++++++++++++++++----------- pallets/proxy/src/weights.rs | 222 +++--- pallets/subtensor/src/weights.rs | 596 ++++++++------- pallets/utility/src/weights.rs | 86 +-- 4 files changed, 1152 insertions(+), 900 deletions(-) diff --git a/pallets/admin-utils/src/weights.rs b/pallets/admin-utils/src/weights.rs index c248b2eb57..e151dae789 100644 --- a/pallets/admin-utils/src/weights.rs +++ b/pallets/admin-utils/src/weights.rs @@ -2,9 +2,9 @@ //! Autogenerated weights for `pallet_admin_utils` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 49.1.0 -//! DATE: 2026-05-25, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2026-06-23, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `runnervmg397c`, CPU: `AMD EPYC 7763 64-Core Processor` +//! HOSTNAME: `runnervm7b5n9`, CPU: `AMD EPYC 7763 64-Core Processor` //! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: `1024` // Executed Command: @@ -22,7 +22,7 @@ // --no-storage-info // --no-min-squares // --no-median-slopes -// --output=/tmp/tmp.JEdED8lJZP +// --output=/tmp/tmp.XvrYLS0ksa // --template=/home/runner/work/subtensor/subtensor/.maintain/frame-weight-template.hbs #![cfg_attr(rustfmt, rustfmt_skip)] @@ -66,7 +66,6 @@ pub trait WeightInfo { fn sudo_set_commit_reveal_weights_enabled() -> Weight; fn sudo_set_commit_reveal_version() -> Weight; fn sudo_set_tx_rate_limit() -> Weight; - fn sudo_set_max_epochs_per_block() -> Weight; fn sudo_set_total_issuance() -> Weight; fn sudo_set_rao_recycled() -> Weight; fn sudo_set_stake_threshold() -> Weight; @@ -94,6 +93,7 @@ pub trait WeightInfo { fn sudo_set_owner_immune_neuron_limit() -> Weight; fn sudo_trim_to_max_allowed_uids() -> Weight; fn sudo_set_min_non_immune_uids() -> Weight; + fn sudo_set_max_epochs_per_block() -> Weight; } /// Weights for `pallet_admin_utils` using the Substrate node and recommended hardware. @@ -106,10 +106,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_037_000 picoseconds. - Weight::from_parts(4_538_772, 0) - // Standard Error: 736 - .saturating_add(Weight::from_parts(25_351, 0).saturating_mul(a.into())) + // Minimum execution time: 3_918_000 picoseconds. + Weight::from_parts(4_664_367, 0) + // Standard Error: 744 + .saturating_add(Weight::from_parts(22_586, 0).saturating_mul(a.into())) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `Grandpa::PendingChange` (r:1 w:1) @@ -119,10 +119,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `174` // Estimated: `2779` - // Minimum execution time: 7_294_000 picoseconds. - Weight::from_parts(7_890_823, 2779) - // Standard Error: 864 - .saturating_add(Weight::from_parts(17_669, 0).saturating_mul(a.into())) + // Minimum execution time: 7_174_000 picoseconds. + Weight::from_parts(7_893_458, 2779) + // Standard Error: 896 + .saturating_add(Weight::from_parts(18_950, 0).saturating_mul(a.into())) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -132,27 +132,35 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_250_000 picoseconds. - Weight::from_parts(5_640_000, 0) + // Minimum execution time: 5_319_000 picoseconds. + Weight::from_parts(5_791_000, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::Tempo` (r:1 w:0) /// Proof: `SubtensorModule::Tempo` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::PendingEpochAt` (r:1 w:0) + /// Proof: `SubtensorModule::PendingEpochAt` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::LastEpochBlock` (r:1 w:0) + /// Proof: `SubtensorModule::LastEpochBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::AdminFreezeWindow` (r:1 w:0) /// Proof: `SubtensorModule::AdminFreezeWindow` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::ServingRateLimit` (r:0 w:1) /// Proof: `SubtensorModule::ServingRateLimit` (`max_values`: None, `max_size`: None, mode: `Measured`) fn sudo_set_serving_rate_limit() -> Weight { // Proof Size summary in bytes: - // Measured: `627` - // Estimated: `4092` - // Minimum execution time: 20_679_000 picoseconds. - Weight::from_parts(21_500_000, 4092) - .saturating_add(T::DbWeight::get().reads(2_u64)) + // Measured: `747` + // Estimated: `4212` + // Minimum execution time: 26_990_000 picoseconds. + Weight::from_parts(28_343_000, 4212) + .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::Tempo` (r:1 w:0) /// Proof: `SubtensorModule::Tempo` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::PendingEpochAt` (r:1 w:0) + /// Proof: `SubtensorModule::PendingEpochAt` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::LastEpochBlock` (r:1 w:0) + /// Proof: `SubtensorModule::LastEpochBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::AdminFreezeWindow` (r:1 w:0) /// Proof: `SubtensorModule::AdminFreezeWindow` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::NetworksAdded` (r:1 w:0) @@ -161,15 +169,19 @@ impl WeightInfo for SubstrateWeight { /// Proof: `SubtensorModule::MaxDifficulty` (`max_values`: None, `max_size`: None, mode: `Measured`) fn sudo_set_max_difficulty() -> Weight { // Proof Size summary in bytes: - // Measured: `770` - // Estimated: `4235` - // Minimum execution time: 26_119_000 picoseconds. - Weight::from_parts(26_870_000, 4235) - .saturating_add(T::DbWeight::get().reads(3_u64)) + // Measured: `918` + // Estimated: `4383` + // Minimum execution time: 32_811_000 picoseconds. + Weight::from_parts(33_703_000, 4383) + .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::Tempo` (r:1 w:0) /// Proof: `SubtensorModule::Tempo` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::PendingEpochAt` (r:1 w:0) + /// Proof: `SubtensorModule::PendingEpochAt` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::LastEpochBlock` (r:1 w:0) + /// Proof: `SubtensorModule::LastEpochBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::AdminFreezeWindow` (r:1 w:0) /// Proof: `SubtensorModule::AdminFreezeWindow` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::NetworksAdded` (r:1 w:0) @@ -178,11 +190,11 @@ impl WeightInfo for SubstrateWeight { /// Proof: `SubtensorModule::MinDifficulty` (`max_values`: None, `max_size`: None, mode: `Measured`) fn sudo_set_min_difficulty() -> Weight { // Proof Size summary in bytes: - // Measured: `770` - // Estimated: `4235` - // Minimum execution time: 25_999_000 picoseconds. - Weight::from_parts(26_890_000, 4235) - .saturating_add(T::DbWeight::get().reads(3_u64)) + // Measured: `918` + // Estimated: `4383` + // Minimum execution time: 33_122_000 picoseconds. + Weight::from_parts(33_873_000, 4383) + .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::NetworksAdded` (r:1 w:0) @@ -193,13 +205,17 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `619` // Estimated: `4084` - // Minimum execution time: 15_890_000 picoseconds. - Weight::from_parts(16_571_000, 4084) + // Minimum execution time: 15_519_000 picoseconds. + Weight::from_parts(16_280_000, 4084) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::Tempo` (r:1 w:0) /// Proof: `SubtensorModule::Tempo` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::PendingEpochAt` (r:1 w:0) + /// Proof: `SubtensorModule::PendingEpochAt` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::LastEpochBlock` (r:1 w:0) + /// Proof: `SubtensorModule::LastEpochBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::AdminFreezeWindow` (r:1 w:0) /// Proof: `SubtensorModule::AdminFreezeWindow` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::NetworksAdded` (r:1 w:0) @@ -208,15 +224,19 @@ impl WeightInfo for SubstrateWeight { /// Proof: `SubtensorModule::WeightsVersionKey` (`max_values`: None, `max_size`: None, mode: `Measured`) fn sudo_set_weights_version_key() -> Weight { // Proof Size summary in bytes: - // Measured: `770` - // Estimated: `4235` - // Minimum execution time: 26_109_000 picoseconds. - Weight::from_parts(26_960_000, 4235) - .saturating_add(T::DbWeight::get().reads(3_u64)) + // Measured: `918` + // Estimated: `4383` + // Minimum execution time: 33_072_000 picoseconds. + Weight::from_parts(34_364_000, 4383) + .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::Tempo` (r:1 w:0) /// Proof: `SubtensorModule::Tempo` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::PendingEpochAt` (r:1 w:0) + /// Proof: `SubtensorModule::PendingEpochAt` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::LastEpochBlock` (r:1 w:0) + /// Proof: `SubtensorModule::LastEpochBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::AdminFreezeWindow` (r:1 w:0) /// Proof: `SubtensorModule::AdminFreezeWindow` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::NetworksAdded` (r:1 w:0) @@ -225,15 +245,19 @@ impl WeightInfo for SubstrateWeight { /// Proof: `SubtensorModule::BondsMovingAverage` (`max_values`: None, `max_size`: None, mode: `Measured`) fn sudo_set_bonds_moving_average() -> Weight { // Proof Size summary in bytes: - // Measured: `770` - // Estimated: `4235` - // Minimum execution time: 26_049_000 picoseconds. - Weight::from_parts(27_130_000, 4235) - .saturating_add(T::DbWeight::get().reads(3_u64)) + // Measured: `918` + // Estimated: `4383` + // Minimum execution time: 33_342_000 picoseconds. + Weight::from_parts(34_123_000, 4383) + .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::Tempo` (r:1 w:0) /// Proof: `SubtensorModule::Tempo` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::PendingEpochAt` (r:1 w:0) + /// Proof: `SubtensorModule::PendingEpochAt` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::LastEpochBlock` (r:1 w:0) + /// Proof: `SubtensorModule::LastEpochBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::AdminFreezeWindow` (r:1 w:0) /// Proof: `SubtensorModule::AdminFreezeWindow` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::NetworksAdded` (r:1 w:0) @@ -242,15 +266,19 @@ impl WeightInfo for SubstrateWeight { /// Proof: `SubtensorModule::BondsPenalty` (`max_values`: None, `max_size`: None, mode: `Measured`) fn sudo_set_bonds_penalty() -> Weight { // Proof Size summary in bytes: - // Measured: `770` - // Estimated: `4235` - // Minimum execution time: 26_179_000 picoseconds. - Weight::from_parts(27_021_000, 4235) - .saturating_add(T::DbWeight::get().reads(3_u64)) + // Measured: `918` + // Estimated: `4383` + // Minimum execution time: 32_931_000 picoseconds. + Weight::from_parts(34_023_000, 4383) + .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::Tempo` (r:1 w:0) /// Proof: `SubtensorModule::Tempo` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::PendingEpochAt` (r:1 w:0) + /// Proof: `SubtensorModule::PendingEpochAt` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::LastEpochBlock` (r:1 w:0) + /// Proof: `SubtensorModule::LastEpochBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::AdminFreezeWindow` (r:1 w:0) /// Proof: `SubtensorModule::AdminFreezeWindow` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::NetworksAdded` (r:1 w:0) @@ -261,15 +289,19 @@ impl WeightInfo for SubstrateWeight { /// Proof: `SubtensorModule::MaxAllowedValidators` (`max_values`: None, `max_size`: None, mode: `Measured`) fn sudo_set_max_allowed_validators() -> Weight { // Proof Size summary in bytes: - // Measured: `770` - // Estimated: `4235` - // Minimum execution time: 27_652_000 picoseconds. - Weight::from_parts(28_463_000, 4235) - .saturating_add(T::DbWeight::get().reads(4_u64)) + // Measured: `918` + // Estimated: `4383` + // Minimum execution time: 33_853_000 picoseconds. + Weight::from_parts(35_036_000, 4383) + .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::Tempo` (r:1 w:0) /// Proof: `SubtensorModule::Tempo` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::PendingEpochAt` (r:1 w:0) + /// Proof: `SubtensorModule::PendingEpochAt` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::LastEpochBlock` (r:1 w:0) + /// Proof: `SubtensorModule::LastEpochBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::AdminFreezeWindow` (r:1 w:0) /// Proof: `SubtensorModule::AdminFreezeWindow` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::NetworksAdded` (r:1 w:0) @@ -278,11 +310,11 @@ impl WeightInfo for SubstrateWeight { /// Proof: `SubtensorModule::Difficulty` (`max_values`: None, `max_size`: None, mode: `Measured`) fn sudo_set_difficulty() -> Weight { // Proof Size summary in bytes: - // Measured: `770` - // Estimated: `4235` - // Minimum execution time: 26_359_000 picoseconds. - Weight::from_parts(27_091_000, 4235) - .saturating_add(T::DbWeight::get().reads(3_u64)) + // Measured: `918` + // Estimated: `4383` + // Minimum execution time: 32_941_000 picoseconds. + Weight::from_parts(34_404_000, 4383) + .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::NetworksAdded` (r:1 w:0) @@ -293,13 +325,17 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `619` // Estimated: `4084` - // Minimum execution time: 15_729_000 picoseconds. - Weight::from_parts(16_811_000, 4084) + // Minimum execution time: 16_039_000 picoseconds. + Weight::from_parts(16_661_000, 4084) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::Tempo` (r:1 w:0) /// Proof: `SubtensorModule::Tempo` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::PendingEpochAt` (r:1 w:0) + /// Proof: `SubtensorModule::PendingEpochAt` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::LastEpochBlock` (r:1 w:0) + /// Proof: `SubtensorModule::LastEpochBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::AdminFreezeWindow` (r:1 w:0) /// Proof: `SubtensorModule::AdminFreezeWindow` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::NetworksAdded` (r:1 w:0) @@ -308,15 +344,19 @@ impl WeightInfo for SubstrateWeight { /// Proof: `SubtensorModule::TargetRegistrationsPerInterval` (`max_values`: None, `max_size`: None, mode: `Measured`) fn sudo_set_target_registrations_per_interval() -> Weight { // Proof Size summary in bytes: - // Measured: `770` - // Estimated: `4235` - // Minimum execution time: 26_169_000 picoseconds. - Weight::from_parts(26_990_000, 4235) - .saturating_add(T::DbWeight::get().reads(3_u64)) + // Measured: `918` + // Estimated: `4383` + // Minimum execution time: 32_641_000 picoseconds. + Weight::from_parts(33_662_000, 4383) + .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::Tempo` (r:1 w:0) /// Proof: `SubtensorModule::Tempo` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::PendingEpochAt` (r:1 w:0) + /// Proof: `SubtensorModule::PendingEpochAt` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::LastEpochBlock` (r:1 w:0) + /// Proof: `SubtensorModule::LastEpochBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::AdminFreezeWindow` (r:1 w:0) /// Proof: `SubtensorModule::AdminFreezeWindow` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::NetworksAdded` (r:1 w:0) @@ -327,15 +367,19 @@ impl WeightInfo for SubstrateWeight { /// Proof: `SubtensorModule::ActivityCutoff` (`max_values`: None, `max_size`: None, mode: `Measured`) fn sudo_set_activity_cutoff() -> Weight { // Proof Size summary in bytes: - // Measured: `832` - // Estimated: `4297` - // Minimum execution time: 28_202_000 picoseconds. - Weight::from_parts(29_676_000, 4297) - .saturating_add(T::DbWeight::get().reads(4_u64)) + // Measured: `918` + // Estimated: `4383` + // Minimum execution time: 34_033_000 picoseconds. + Weight::from_parts(34_995_000, 4383) + .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::Tempo` (r:1 w:0) /// Proof: `SubtensorModule::Tempo` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::PendingEpochAt` (r:1 w:0) + /// Proof: `SubtensorModule::PendingEpochAt` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::LastEpochBlock` (r:1 w:0) + /// Proof: `SubtensorModule::LastEpochBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::AdminFreezeWindow` (r:1 w:0) /// Proof: `SubtensorModule::AdminFreezeWindow` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::NetworksAdded` (r:1 w:0) @@ -344,11 +388,11 @@ impl WeightInfo for SubstrateWeight { /// Proof: `SubtensorModule::Rho` (`max_values`: None, `max_size`: None, mode: `Measured`) fn sudo_set_rho() -> Weight { // Proof Size summary in bytes: - // Measured: `770` - // Estimated: `4235` - // Minimum execution time: 23_193_000 picoseconds. - Weight::from_parts(23_735_000, 4235) - .saturating_add(T::DbWeight::get().reads(3_u64)) + // Measured: `918` + // Estimated: `4383` + // Minimum execution time: 29_826_000 picoseconds. + Weight::from_parts(30_547_000, 4383) + .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::NetworksAdded` (r:1 w:0) @@ -359,13 +403,17 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `619` // Estimated: `4084` - // Minimum execution time: 16_009_000 picoseconds. - Weight::from_parts(16_501_000, 4084) + // Minimum execution time: 15_669_000 picoseconds. + Weight::from_parts(16_420_000, 4084) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::Tempo` (r:1 w:0) /// Proof: `SubtensorModule::Tempo` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::PendingEpochAt` (r:1 w:0) + /// Proof: `SubtensorModule::PendingEpochAt` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::LastEpochBlock` (r:1 w:0) + /// Proof: `SubtensorModule::LastEpochBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::AdminFreezeWindow` (r:1 w:0) /// Proof: `SubtensorModule::AdminFreezeWindow` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::NetworksAdded` (r:1 w:0) @@ -378,15 +426,19 @@ impl WeightInfo for SubstrateWeight { /// Proof: `SubtensorModule::MinAllowedUids` (`max_values`: None, `max_size`: None, mode: `Measured`) fn sudo_set_min_allowed_uids() -> Weight { // Proof Size summary in bytes: - // Measured: `770` - // Estimated: `4235` - // Minimum execution time: 29_495_000 picoseconds. - Weight::from_parts(30_577_000, 4235) - .saturating_add(T::DbWeight::get().reads(5_u64)) + // Measured: `918` + // Estimated: `4383` + // Minimum execution time: 36_428_000 picoseconds. + Weight::from_parts(37_490_000, 4383) + .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::Tempo` (r:1 w:0) /// Proof: `SubtensorModule::Tempo` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::PendingEpochAt` (r:1 w:0) + /// Proof: `SubtensorModule::PendingEpochAt` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::LastEpochBlock` (r:1 w:0) + /// Proof: `SubtensorModule::LastEpochBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::AdminFreezeWindow` (r:1 w:0) /// Proof: `SubtensorModule::AdminFreezeWindow` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::NetworksAdded` (r:1 w:0) @@ -401,15 +453,19 @@ impl WeightInfo for SubstrateWeight { /// Proof: `SubtensorModule::MaxAllowedUids` (`max_values`: None, `max_size`: None, mode: `Measured`) fn sudo_set_max_allowed_uids() -> Weight { // Proof Size summary in bytes: - // Measured: `820` - // Estimated: `4285` - // Minimum execution time: 34_475_000 picoseconds. - Weight::from_parts(35_696_000, 4285) - .saturating_add(T::DbWeight::get().reads(6_u64)) + // Measured: `968` + // Estimated: `4433` + // Minimum execution time: 41_086_000 picoseconds. + Weight::from_parts(42_659_000, 4433) + .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::Tempo` (r:1 w:0) /// Proof: `SubtensorModule::Tempo` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::PendingEpochAt` (r:1 w:0) + /// Proof: `SubtensorModule::PendingEpochAt` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::LastEpochBlock` (r:1 w:0) + /// Proof: `SubtensorModule::LastEpochBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::AdminFreezeWindow` (r:1 w:0) /// Proof: `SubtensorModule::AdminFreezeWindow` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::NetworksAdded` (r:1 w:0) @@ -418,15 +474,19 @@ impl WeightInfo for SubstrateWeight { /// Proof: `SubtensorModule::MinAllowedWeights` (`max_values`: None, `max_size`: None, mode: `Measured`) fn sudo_set_min_allowed_weights() -> Weight { // Proof Size summary in bytes: - // Measured: `770` - // Estimated: `4235` - // Minimum execution time: 26_209_000 picoseconds. - Weight::from_parts(27_151_000, 4235) - .saturating_add(T::DbWeight::get().reads(3_u64)) + // Measured: `918` + // Estimated: `4383` + // Minimum execution time: 32_921_000 picoseconds. + Weight::from_parts(33_442_000, 4383) + .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::Tempo` (r:1 w:0) /// Proof: `SubtensorModule::Tempo` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::PendingEpochAt` (r:1 w:0) + /// Proof: `SubtensorModule::PendingEpochAt` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::LastEpochBlock` (r:1 w:0) + /// Proof: `SubtensorModule::LastEpochBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::AdminFreezeWindow` (r:1 w:0) /// Proof: `SubtensorModule::AdminFreezeWindow` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::NetworksAdded` (r:1 w:0) @@ -435,15 +495,19 @@ impl WeightInfo for SubstrateWeight { /// Proof: `SubtensorModule::ImmunityPeriod` (`max_values`: None, `max_size`: None, mode: `Measured`) fn sudo_set_immunity_period() -> Weight { // Proof Size summary in bytes: - // Measured: `770` - // Estimated: `4235` - // Minimum execution time: 26_239_000 picoseconds. - Weight::from_parts(26_920_000, 4235) - .saturating_add(T::DbWeight::get().reads(3_u64)) + // Measured: `918` + // Estimated: `4383` + // Minimum execution time: 32_691_000 picoseconds. + Weight::from_parts(33_993_000, 4383) + .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::Tempo` (r:1 w:0) /// Proof: `SubtensorModule::Tempo` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::PendingEpochAt` (r:1 w:0) + /// Proof: `SubtensorModule::PendingEpochAt` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::LastEpochBlock` (r:1 w:0) + /// Proof: `SubtensorModule::LastEpochBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::AdminFreezeWindow` (r:1 w:0) /// Proof: `SubtensorModule::AdminFreezeWindow` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::NetworksAdded` (r:1 w:0) @@ -452,15 +516,19 @@ impl WeightInfo for SubstrateWeight { /// Proof: `SubtensorModule::MaxRegistrationsPerBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) fn sudo_set_max_registrations_per_block() -> Weight { // Proof Size summary in bytes: - // Measured: `770` - // Estimated: `4235` - // Minimum execution time: 25_969_000 picoseconds. - Weight::from_parts(26_951_000, 4235) - .saturating_add(T::DbWeight::get().reads(3_u64)) + // Measured: `918` + // Estimated: `4383` + // Minimum execution time: 32_761_000 picoseconds. + Weight::from_parts(34_203_000, 4383) + .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::Tempo` (r:1 w:0) /// Proof: `SubtensorModule::Tempo` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::PendingEpochAt` (r:1 w:0) + /// Proof: `SubtensorModule::PendingEpochAt` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::LastEpochBlock` (r:1 w:0) + /// Proof: `SubtensorModule::LastEpochBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::AdminFreezeWindow` (r:1 w:0) /// Proof: `SubtensorModule::AdminFreezeWindow` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::NetworksAdded` (r:1 w:0) @@ -471,15 +539,19 @@ impl WeightInfo for SubstrateWeight { /// Proof: `SubtensorModule::MaxBurn` (`max_values`: None, `max_size`: None, mode: `Measured`) fn sudo_set_max_burn() -> Weight { // Proof Size summary in bytes: - // Measured: `797` - // Estimated: `4262` - // Minimum execution time: 28_954_000 picoseconds. - Weight::from_parts(29_765_000, 4262) - .saturating_add(T::DbWeight::get().reads(4_u64)) + // Measured: `945` + // Estimated: `4410` + // Minimum execution time: 35_747_000 picoseconds. + Weight::from_parts(36_779_000, 4410) + .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::Tempo` (r:1 w:0) /// Proof: `SubtensorModule::Tempo` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::PendingEpochAt` (r:1 w:0) + /// Proof: `SubtensorModule::PendingEpochAt` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::LastEpochBlock` (r:1 w:0) + /// Proof: `SubtensorModule::LastEpochBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::AdminFreezeWindow` (r:1 w:0) /// Proof: `SubtensorModule::AdminFreezeWindow` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::NetworksAdded` (r:1 w:0) @@ -490,11 +562,11 @@ impl WeightInfo for SubstrateWeight { /// Proof: `SubtensorModule::MinBurn` (`max_values`: None, `max_size`: None, mode: `Measured`) fn sudo_set_min_burn() -> Weight { // Proof Size summary in bytes: - // Measured: `772` - // Estimated: `4237` - // Minimum execution time: 29_265_000 picoseconds. - Weight::from_parts(30_005_000, 4237) - .saturating_add(T::DbWeight::get().reads(4_u64)) + // Measured: `920` + // Estimated: `4385` + // Minimum execution time: 36_187_000 picoseconds. + Weight::from_parts(37_099_000, 4385) + .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::NetworkRegistrationAllowed` (r:0 w:1) @@ -503,27 +575,35 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_683_000 picoseconds. - Weight::from_parts(7_124_000, 0) + // Minimum execution time: 6_673_000 picoseconds. + Weight::from_parts(7_434_000, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::Tempo` (r:1 w:1) /// Proof: `SubtensorModule::Tempo` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::PendingEpochAt` (r:1 w:0) + /// Proof: `SubtensorModule::PendingEpochAt` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::LastEpochBlock` (r:1 w:1) + /// Proof: `SubtensorModule::LastEpochBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::AdminFreezeWindow` (r:1 w:0) /// Proof: `SubtensorModule::AdminFreezeWindow` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::NetworksAdded` (r:1 w:0) /// Proof: `SubtensorModule::NetworksAdded` (`max_values`: None, `max_size`: None, mode: `Measured`) fn sudo_set_tempo() -> Weight { // Proof Size summary in bytes: - // Measured: `770` - // Estimated: `4235` - // Minimum execution time: 25_758_000 picoseconds. - Weight::from_parts(26_580_000, 4235) - .saturating_add(T::DbWeight::get().reads(3_u64)) - .saturating_add(T::DbWeight::get().writes(1_u64)) + // Measured: `918` + // Estimated: `4383` + // Minimum execution time: 34_504_000 picoseconds. + Weight::from_parts(35_186_000, 4383) + .saturating_add(T::DbWeight::get().reads(5_u64)) + .saturating_add(T::DbWeight::get().writes(2_u64)) } /// Storage: `SubtensorModule::Tempo` (r:1 w:0) /// Proof: `SubtensorModule::Tempo` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::PendingEpochAt` (r:1 w:0) + /// Proof: `SubtensorModule::PendingEpochAt` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::LastEpochBlock` (r:1 w:0) + /// Proof: `SubtensorModule::LastEpochBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::AdminFreezeWindow` (r:1 w:0) /// Proof: `SubtensorModule::AdminFreezeWindow` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::NetworksAdded` (r:1 w:0) @@ -532,15 +612,19 @@ impl WeightInfo for SubstrateWeight { /// Proof: `SubtensorModule::RevealPeriodEpochs` (`max_values`: None, `max_size`: None, mode: `Measured`) fn sudo_set_commit_reveal_weights_interval() -> Weight { // Proof Size summary in bytes: - // Measured: `770` - // Estimated: `4235` - // Minimum execution time: 26_099_000 picoseconds. - Weight::from_parts(27_551_000, 4235) - .saturating_add(T::DbWeight::get().reads(3_u64)) + // Measured: `918` + // Estimated: `4383` + // Minimum execution time: 33_592_000 picoseconds. + Weight::from_parts(34_684_000, 4383) + .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::Tempo` (r:1 w:0) /// Proof: `SubtensorModule::Tempo` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::PendingEpochAt` (r:1 w:0) + /// Proof: `SubtensorModule::PendingEpochAt` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::LastEpochBlock` (r:1 w:0) + /// Proof: `SubtensorModule::LastEpochBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::AdminFreezeWindow` (r:1 w:0) /// Proof: `SubtensorModule::AdminFreezeWindow` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::NetworksAdded` (r:1 w:0) @@ -549,11 +633,11 @@ impl WeightInfo for SubstrateWeight { /// Proof: `SubtensorModule::CommitRevealWeightsEnabled` (`max_values`: None, `max_size`: None, mode: `Measured`) fn sudo_set_commit_reveal_weights_enabled() -> Weight { // Proof Size summary in bytes: - // Measured: `770` - // Estimated: `4235` - // Minimum execution time: 26_319_000 picoseconds. - Weight::from_parts(26_940_000, 4235) - .saturating_add(T::DbWeight::get().reads(3_u64)) + // Measured: `918` + // Estimated: `4383` + // Minimum execution time: 32_741_000 picoseconds. + Weight::from_parts(34_093_000, 4383) + .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::CommitRevealWeightsVersion` (r:0 w:1) @@ -562,8 +646,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_871_000 picoseconds. - Weight::from_parts(6_292_000, 0) + // Minimum execution time: 6_011_000 picoseconds. + Weight::from_parts(6_372_000, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::TxRateLimit` (r:0 w:1) @@ -572,26 +656,16 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_130_000 picoseconds. - Weight::from_parts(5_500_000, 0) - .saturating_add(T::DbWeight::get().writes(1_u64)) - } - /// Storage: `SubtensorModule::MaxEpochsPerBlock` (r:0 w:1) - /// Proof: `SubtensorModule::MaxEpochsPerBlock` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - fn sudo_set_max_epochs_per_block() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 4_000_000 picoseconds. - Weight::from_parts(4_000_000, 0) + // Minimum execution time: 5_420_000 picoseconds. + Weight::from_parts(5_640_000, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } fn sudo_set_total_issuance() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_851_000 picoseconds. - Weight::from_parts(6_102_000, 0) + // Minimum execution time: 5_791_000 picoseconds. + Weight::from_parts(6_141_000, 0) } /// Storage: `SubtensorModule::NetworksAdded` (r:1 w:0) /// Proof: `SubtensorModule::NetworksAdded` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -601,8 +675,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `619` // Estimated: `4084` - // Minimum execution time: 15_890_000 picoseconds. - Weight::from_parts(16_380_000, 4084) + // Minimum execution time: 15_889_000 picoseconds. + Weight::from_parts(16_400_000, 4084) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -612,8 +686,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_259_000 picoseconds. - Weight::from_parts(5_510_000, 0) + // Minimum execution time: 5_239_000 picoseconds. + Weight::from_parts(5_831_000, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::NominatorMinRequiredStake` (r:1 w:1) @@ -626,10 +700,10 @@ impl WeightInfo for SubstrateWeight { /// Proof: `SubtensorModule::Owner` (`max_values`: None, `max_size`: None, mode: `Measured`) fn sudo_set_nominator_min_required_stake() -> Weight { // Proof Size summary in bytes: - // Measured: `912` - // Estimated: `6852` - // Minimum execution time: 28_783_000 picoseconds. - Weight::from_parts(29_535_000, 6852) + // Measured: `950` + // Estimated: `6890` + // Minimum execution time: 29_575_000 picoseconds. + Weight::from_parts(30_617_000, 6890) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -639,8 +713,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_190_000 picoseconds. - Weight::from_parts(5_390_000, 0) + // Minimum execution time: 5_249_000 picoseconds. + Weight::from_parts(5_620_000, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::MinDelegateTake` (r:0 w:1) @@ -649,12 +723,16 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_179_000 picoseconds. - Weight::from_parts(5_471_000, 0) + // Minimum execution time: 5_410_000 picoseconds. + Weight::from_parts(5_831_000, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::Tempo` (r:1 w:0) /// Proof: `SubtensorModule::Tempo` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::PendingEpochAt` (r:1 w:0) + /// Proof: `SubtensorModule::PendingEpochAt` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::LastEpochBlock` (r:1 w:0) + /// Proof: `SubtensorModule::LastEpochBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::AdminFreezeWindow` (r:1 w:0) /// Proof: `SubtensorModule::AdminFreezeWindow` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::NetworksAdded` (r:1 w:0) @@ -667,30 +745,38 @@ impl WeightInfo for SubstrateWeight { /// Proof: `SubtensorModule::MinChildkeyTakePerSubnet` (`max_values`: None, `max_size`: None, mode: `Measured`) fn sudo_set_min_childkey_take_per_subnet() -> Weight { // Proof Size summary in bytes: - // Measured: `806` - // Estimated: `4271` - // Minimum execution time: 29_535_000 picoseconds. - Weight::from_parts(30_327_000, 4271) - .saturating_add(T::DbWeight::get().reads(5_u64)) + // Measured: `954` + // Estimated: `4419` + // Minimum execution time: 36_688_000 picoseconds. + Weight::from_parts(37_690_000, 4419) + .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::Tempo` (r:1 w:0) /// Proof: `SubtensorModule::Tempo` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::PendingEpochAt` (r:1 w:0) + /// Proof: `SubtensorModule::PendingEpochAt` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::LastEpochBlock` (r:1 w:0) + /// Proof: `SubtensorModule::LastEpochBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::AdminFreezeWindow` (r:1 w:0) /// Proof: `SubtensorModule::AdminFreezeWindow` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::LiquidAlphaOn` (r:0 w:1) /// Proof: `SubtensorModule::LiquidAlphaOn` (`max_values`: None, `max_size`: None, mode: `Measured`) fn sudo_set_liquid_alpha_enabled() -> Weight { // Proof Size summary in bytes: - // Measured: `667` - // Estimated: `4132` - // Minimum execution time: 17_453_000 picoseconds. - Weight::from_parts(18_084_000, 4132) - .saturating_add(T::DbWeight::get().reads(2_u64)) + // Measured: `815` + // Estimated: `4280` + // Minimum execution time: 24_345_000 picoseconds. + Weight::from_parts(25_497_000, 4280) + .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::Tempo` (r:1 w:0) /// Proof: `SubtensorModule::Tempo` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::PendingEpochAt` (r:1 w:0) + /// Proof: `SubtensorModule::PendingEpochAt` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::LastEpochBlock` (r:1 w:0) + /// Proof: `SubtensorModule::LastEpochBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::AdminFreezeWindow` (r:1 w:0) /// Proof: `SubtensorModule::AdminFreezeWindow` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::LiquidAlphaOn` (r:1 w:0) @@ -699,11 +785,11 @@ impl WeightInfo for SubstrateWeight { /// Proof: `SubtensorModule::AlphaValues` (`max_values`: None, `max_size`: None, mode: `Measured`) fn sudo_set_alpha_values() -> Weight { // Proof Size summary in bytes: - // Measured: `814` - // Estimated: `4279` - // Minimum execution time: 25_918_000 picoseconds. - Weight::from_parts(26_509_000, 4279) - .saturating_add(T::DbWeight::get().reads(3_u64)) + // Measured: `962` + // Estimated: `4427` + // Minimum execution time: 32_841_000 picoseconds. + Weight::from_parts(33_773_000, 4427) + .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::ColdkeySwapAnnouncementDelay` (r:0 w:1) @@ -712,8 +798,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_190_000 picoseconds. - Weight::from_parts(5_511_000, 0) + // Minimum execution time: 5_470_000 picoseconds. + Weight::from_parts(5_751_000, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::ColdkeySwapReannouncementDelay` (r:0 w:1) @@ -722,8 +808,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_270_000 picoseconds. - Weight::from_parts(5_500_000, 0) + // Minimum execution time: 5_340_000 picoseconds. + Weight::from_parts(5_721_000, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::DissolveNetworkScheduleDuration` (r:0 w:1) @@ -732,23 +818,27 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_139_000 picoseconds. - Weight::from_parts(5_440_000, 0) + // Minimum execution time: 5_290_000 picoseconds. + Weight::from_parts(5_591_000, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::Tempo` (r:1 w:0) /// Proof: `SubtensorModule::Tempo` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::PendingEpochAt` (r:1 w:0) + /// Proof: `SubtensorModule::PendingEpochAt` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::LastEpochBlock` (r:1 w:0) + /// Proof: `SubtensorModule::LastEpochBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::AdminFreezeWindow` (r:1 w:0) /// Proof: `SubtensorModule::AdminFreezeWindow` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::TransferToggle` (r:0 w:1) /// Proof: `SubtensorModule::TransferToggle` (`max_values`: None, `max_size`: None, mode: `Measured`) fn sudo_set_toggle_transfer() -> Weight { // Proof Size summary in bytes: - // Measured: `667` - // Estimated: `4132` - // Minimum execution time: 19_987_000 picoseconds. - Weight::from_parts(20_628_000, 4132) - .saturating_add(T::DbWeight::get().reads(2_u64)) + // Measured: `815` + // Estimated: `4280` + // Minimum execution time: 27_401_000 picoseconds. + Weight::from_parts(28_122_000, 4280) + .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `AdminUtils::PrecompileEnable` (r:1 w:0) @@ -757,7 +847,7 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `42` // Estimated: `3507` - // Minimum execution time: 6_161_000 picoseconds. + // Minimum execution time: 6_211_000 picoseconds. Weight::from_parts(6_382_000, 3507) .saturating_add(T::DbWeight::get().reads(1_u64)) } @@ -767,8 +857,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_665_000 picoseconds. - Weight::from_parts(2_945_000, 0) + // Minimum execution time: 2_816_000 picoseconds. + Weight::from_parts(2_996_000, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::EMAPriceHalvingBlocks` (r:0 w:1) @@ -777,12 +867,16 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_857_000 picoseconds. - Weight::from_parts(4_158_000, 0) + // Minimum execution time: 3_787_000 picoseconds. + Weight::from_parts(4_228_000, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::Tempo` (r:1 w:0) /// Proof: `SubtensorModule::Tempo` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::PendingEpochAt` (r:1 w:0) + /// Proof: `SubtensorModule::PendingEpochAt` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::LastEpochBlock` (r:1 w:0) + /// Proof: `SubtensorModule::LastEpochBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::AdminFreezeWindow` (r:1 w:0) /// Proof: `SubtensorModule::AdminFreezeWindow` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::NetworksAdded` (r:1 w:0) @@ -791,41 +885,49 @@ impl WeightInfo for SubstrateWeight { /// Proof: `SubtensorModule::AlphaSigmoidSteepness` (`max_values`: None, `max_size`: None, mode: `Measured`) fn sudo_set_alpha_sigmoid_steepness() -> Weight { // Proof Size summary in bytes: - // Measured: `770` - // Estimated: `4235` - // Minimum execution time: 23_253_000 picoseconds. - Weight::from_parts(23_824_000, 4235) - .saturating_add(T::DbWeight::get().reads(3_u64)) + // Measured: `918` + // Estimated: `4383` + // Minimum execution time: 29_746_000 picoseconds. + Weight::from_parts(30_808_000, 4383) + .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::Tempo` (r:1 w:0) /// Proof: `SubtensorModule::Tempo` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::PendingEpochAt` (r:1 w:0) + /// Proof: `SubtensorModule::PendingEpochAt` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::LastEpochBlock` (r:1 w:0) + /// Proof: `SubtensorModule::LastEpochBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::AdminFreezeWindow` (r:1 w:0) /// Proof: `SubtensorModule::AdminFreezeWindow` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::Yuma3On` (r:0 w:1) /// Proof: `SubtensorModule::Yuma3On` (`max_values`: None, `max_size`: None, mode: `Measured`) fn sudo_set_yuma3_enabled() -> Weight { // Proof Size summary in bytes: - // Measured: `667` - // Estimated: `4132` - // Minimum execution time: 20_408_000 picoseconds. - Weight::from_parts(20_928_000, 4132) - .saturating_add(T::DbWeight::get().reads(2_u64)) + // Measured: `815` + // Estimated: `4280` + // Minimum execution time: 27_221_000 picoseconds. + Weight::from_parts(27_762_000, 4280) + .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::Tempo` (r:1 w:0) /// Proof: `SubtensorModule::Tempo` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::PendingEpochAt` (r:1 w:0) + /// Proof: `SubtensorModule::PendingEpochAt` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::LastEpochBlock` (r:1 w:0) + /// Proof: `SubtensorModule::LastEpochBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::AdminFreezeWindow` (r:1 w:0) /// Proof: `SubtensorModule::AdminFreezeWindow` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::BondsResetOn` (r:0 w:1) /// Proof: `SubtensorModule::BondsResetOn` (`max_values`: None, `max_size`: None, mode: `Measured`) fn sudo_set_bonds_reset_enabled() -> Weight { // Proof Size summary in bytes: - // Measured: `667` - // Estimated: `4132` - // Minimum execution time: 22_281_000 picoseconds. - Weight::from_parts(23_013_000, 4132) - .saturating_add(T::DbWeight::get().reads(2_u64)) + // Measured: `815` + // Estimated: `4280` + // Minimum execution time: 29_094_000 picoseconds. + Weight::from_parts(30_346_000, 4280) + .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::NetworksAdded` (r:1 w:0) @@ -836,8 +938,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `619` // Estimated: `4084` - // Minimum execution time: 15_729_000 picoseconds. - Weight::from_parts(16_490_000, 4084) + // Minimum execution time: 15_879_000 picoseconds. + Weight::from_parts(16_461_000, 4084) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -851,24 +953,28 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `712` // Estimated: `4177` - // Minimum execution time: 24_325_000 picoseconds. - Weight::from_parts(25_427_000, 4177) + // Minimum execution time: 24_515_000 picoseconds. + Weight::from_parts(25_568_000, 4177) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } /// Storage: `SubtensorModule::Tempo` (r:1 w:0) /// Proof: `SubtensorModule::Tempo` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::PendingEpochAt` (r:1 w:0) + /// Proof: `SubtensorModule::PendingEpochAt` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::LastEpochBlock` (r:1 w:0) + /// Proof: `SubtensorModule::LastEpochBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::AdminFreezeWindow` (r:1 w:0) /// Proof: `SubtensorModule::AdminFreezeWindow` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::SubtokenEnabled` (r:0 w:1) /// Proof: `SubtensorModule::SubtokenEnabled` (`max_values`: None, `max_size`: None, mode: `Measured`) fn sudo_set_subtoken_enabled() -> Weight { // Proof Size summary in bytes: - // Measured: `667` - // Estimated: `4132` - // Minimum execution time: 16_661_000 picoseconds. - Weight::from_parts(17_342_000, 4132) - .saturating_add(T::DbWeight::get().reads(2_u64)) + // Measured: `815` + // Estimated: `4280` + // Minimum execution time: 24_024_000 picoseconds. + Weight::from_parts(24_776_000, 4280) + .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::AdminFreezeWindow` (r:0 w:1) @@ -877,8 +983,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_279_000 picoseconds. - Weight::from_parts(5_540_000, 0) + // Minimum execution time: 5_289_000 picoseconds. + Weight::from_parts(5_701_000, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::OwnerHyperparamRateLimit` (r:0 w:1) @@ -887,27 +993,35 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_260_000 picoseconds. - Weight::from_parts(5_620_000, 0) + // Minimum execution time: 5_359_000 picoseconds. + Weight::from_parts(6_262_000, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::Tempo` (r:1 w:0) /// Proof: `SubtensorModule::Tempo` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::PendingEpochAt` (r:1 w:0) + /// Proof: `SubtensorModule::PendingEpochAt` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::LastEpochBlock` (r:1 w:0) + /// Proof: `SubtensorModule::LastEpochBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::AdminFreezeWindow` (r:1 w:0) /// Proof: `SubtensorModule::AdminFreezeWindow` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::ImmuneOwnerUidsLimit` (r:0 w:1) /// Proof: `SubtensorModule::ImmuneOwnerUidsLimit` (`max_values`: None, `max_size`: None, mode: `Measured`) fn sudo_set_owner_immune_neuron_limit() -> Weight { // Proof Size summary in bytes: - // Measured: `667` - // Estimated: `4132` - // Minimum execution time: 16_961_000 picoseconds. - Weight::from_parts(17_663_000, 4132) - .saturating_add(T::DbWeight::get().reads(2_u64)) + // Measured: `815` + // Estimated: `4280` + // Minimum execution time: 24_095_000 picoseconds. + Weight::from_parts(24_696_000, 4280) + .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::Tempo` (r:1 w:0) /// Proof: `SubtensorModule::Tempo` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::PendingEpochAt` (r:1 w:0) + /// Proof: `SubtensorModule::PendingEpochAt` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::LastEpochBlock` (r:1 w:0) + /// Proof: `SubtensorModule::LastEpochBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::AdminFreezeWindow` (r:1 w:0) /// Proof: `SubtensorModule::AdminFreezeWindow` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::NetworksAdded` (r:1 w:0) @@ -920,11 +1034,11 @@ impl WeightInfo for SubstrateWeight { /// Proof: `SubtensorModule::SubnetworkN` (`max_values`: None, `max_size`: None, mode: `Measured`) fn sudo_trim_to_max_allowed_uids() -> Weight { // Proof Size summary in bytes: - // Measured: `785` - // Estimated: `4250` - // Minimum execution time: 29_645_000 picoseconds. - Weight::from_parts(30_477_000, 4250) - .saturating_add(T::DbWeight::get().reads(6_u64)) + // Measured: `933` + // Estimated: `4398` + // Minimum execution time: 36_998_000 picoseconds. + Weight::from_parts(38_441_000, 4398) + .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::MinNonImmuneUids` (r:0 w:1) @@ -933,8 +1047,18 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_953_000 picoseconds. - Weight::from_parts(7_134_000, 0) + // Minimum execution time: 6_893_000 picoseconds. + Weight::from_parts(7_113_000, 0) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// Storage: `SubtensorModule::MaxEpochsPerBlock` (r:0 w:1) + /// Proof: `SubtensorModule::MaxEpochsPerBlock` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn sudo_set_max_epochs_per_block() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 5_410_000 picoseconds. + Weight::from_parts(5_801_000, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } } @@ -948,10 +1072,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_037_000 picoseconds. - Weight::from_parts(4_538_772, 0) - // Standard Error: 736 - .saturating_add(Weight::from_parts(25_351, 0).saturating_mul(a.into())) + // Minimum execution time: 3_918_000 picoseconds. + Weight::from_parts(4_664_367, 0) + // Standard Error: 744 + .saturating_add(Weight::from_parts(22_586, 0).saturating_mul(a.into())) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `Grandpa::PendingChange` (r:1 w:1) @@ -961,10 +1085,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `174` // Estimated: `2779` - // Minimum execution time: 7_294_000 picoseconds. - Weight::from_parts(7_890_823, 2779) - // Standard Error: 864 - .saturating_add(Weight::from_parts(17_669, 0).saturating_mul(a.into())) + // Minimum execution time: 7_174_000 picoseconds. + Weight::from_parts(7_893_458, 2779) + // Standard Error: 896 + .saturating_add(Weight::from_parts(18_950, 0).saturating_mul(a.into())) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -974,27 +1098,35 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_250_000 picoseconds. - Weight::from_parts(5_640_000, 0) + // Minimum execution time: 5_319_000 picoseconds. + Weight::from_parts(5_791_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::Tempo` (r:1 w:0) /// Proof: `SubtensorModule::Tempo` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::PendingEpochAt` (r:1 w:0) + /// Proof: `SubtensorModule::PendingEpochAt` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::LastEpochBlock` (r:1 w:0) + /// Proof: `SubtensorModule::LastEpochBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::AdminFreezeWindow` (r:1 w:0) /// Proof: `SubtensorModule::AdminFreezeWindow` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::ServingRateLimit` (r:0 w:1) /// Proof: `SubtensorModule::ServingRateLimit` (`max_values`: None, `max_size`: None, mode: `Measured`) fn sudo_set_serving_rate_limit() -> Weight { // Proof Size summary in bytes: - // Measured: `627` - // Estimated: `4092` - // Minimum execution time: 20_679_000 picoseconds. - Weight::from_parts(21_500_000, 4092) - .saturating_add(RocksDbWeight::get().reads(2_u64)) + // Measured: `747` + // Estimated: `4212` + // Minimum execution time: 26_990_000 picoseconds. + Weight::from_parts(28_343_000, 4212) + .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::Tempo` (r:1 w:0) /// Proof: `SubtensorModule::Tempo` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::PendingEpochAt` (r:1 w:0) + /// Proof: `SubtensorModule::PendingEpochAt` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::LastEpochBlock` (r:1 w:0) + /// Proof: `SubtensorModule::LastEpochBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::AdminFreezeWindow` (r:1 w:0) /// Proof: `SubtensorModule::AdminFreezeWindow` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::NetworksAdded` (r:1 w:0) @@ -1003,15 +1135,19 @@ impl WeightInfo for () { /// Proof: `SubtensorModule::MaxDifficulty` (`max_values`: None, `max_size`: None, mode: `Measured`) fn sudo_set_max_difficulty() -> Weight { // Proof Size summary in bytes: - // Measured: `770` - // Estimated: `4235` - // Minimum execution time: 26_119_000 picoseconds. - Weight::from_parts(26_870_000, 4235) - .saturating_add(RocksDbWeight::get().reads(3_u64)) + // Measured: `918` + // Estimated: `4383` + // Minimum execution time: 32_811_000 picoseconds. + Weight::from_parts(33_703_000, 4383) + .saturating_add(RocksDbWeight::get().reads(5_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::Tempo` (r:1 w:0) /// Proof: `SubtensorModule::Tempo` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::PendingEpochAt` (r:1 w:0) + /// Proof: `SubtensorModule::PendingEpochAt` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::LastEpochBlock` (r:1 w:0) + /// Proof: `SubtensorModule::LastEpochBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::AdminFreezeWindow` (r:1 w:0) /// Proof: `SubtensorModule::AdminFreezeWindow` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::NetworksAdded` (r:1 w:0) @@ -1020,11 +1156,11 @@ impl WeightInfo for () { /// Proof: `SubtensorModule::MinDifficulty` (`max_values`: None, `max_size`: None, mode: `Measured`) fn sudo_set_min_difficulty() -> Weight { // Proof Size summary in bytes: - // Measured: `770` - // Estimated: `4235` - // Minimum execution time: 25_999_000 picoseconds. - Weight::from_parts(26_890_000, 4235) - .saturating_add(RocksDbWeight::get().reads(3_u64)) + // Measured: `918` + // Estimated: `4383` + // Minimum execution time: 33_122_000 picoseconds. + Weight::from_parts(33_873_000, 4383) + .saturating_add(RocksDbWeight::get().reads(5_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::NetworksAdded` (r:1 w:0) @@ -1035,13 +1171,17 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `619` // Estimated: `4084` - // Minimum execution time: 15_890_000 picoseconds. - Weight::from_parts(16_571_000, 4084) + // Minimum execution time: 15_519_000 picoseconds. + Weight::from_parts(16_280_000, 4084) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::Tempo` (r:1 w:0) /// Proof: `SubtensorModule::Tempo` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::PendingEpochAt` (r:1 w:0) + /// Proof: `SubtensorModule::PendingEpochAt` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::LastEpochBlock` (r:1 w:0) + /// Proof: `SubtensorModule::LastEpochBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::AdminFreezeWindow` (r:1 w:0) /// Proof: `SubtensorModule::AdminFreezeWindow` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::NetworksAdded` (r:1 w:0) @@ -1050,15 +1190,19 @@ impl WeightInfo for () { /// Proof: `SubtensorModule::WeightsVersionKey` (`max_values`: None, `max_size`: None, mode: `Measured`) fn sudo_set_weights_version_key() -> Weight { // Proof Size summary in bytes: - // Measured: `770` - // Estimated: `4235` - // Minimum execution time: 26_109_000 picoseconds. - Weight::from_parts(26_960_000, 4235) - .saturating_add(RocksDbWeight::get().reads(3_u64)) + // Measured: `918` + // Estimated: `4383` + // Minimum execution time: 33_072_000 picoseconds. + Weight::from_parts(34_364_000, 4383) + .saturating_add(RocksDbWeight::get().reads(5_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::Tempo` (r:1 w:0) /// Proof: `SubtensorModule::Tempo` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::PendingEpochAt` (r:1 w:0) + /// Proof: `SubtensorModule::PendingEpochAt` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::LastEpochBlock` (r:1 w:0) + /// Proof: `SubtensorModule::LastEpochBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::AdminFreezeWindow` (r:1 w:0) /// Proof: `SubtensorModule::AdminFreezeWindow` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::NetworksAdded` (r:1 w:0) @@ -1067,15 +1211,19 @@ impl WeightInfo for () { /// Proof: `SubtensorModule::BondsMovingAverage` (`max_values`: None, `max_size`: None, mode: `Measured`) fn sudo_set_bonds_moving_average() -> Weight { // Proof Size summary in bytes: - // Measured: `770` - // Estimated: `4235` - // Minimum execution time: 26_049_000 picoseconds. - Weight::from_parts(27_130_000, 4235) - .saturating_add(RocksDbWeight::get().reads(3_u64)) + // Measured: `918` + // Estimated: `4383` + // Minimum execution time: 33_342_000 picoseconds. + Weight::from_parts(34_123_000, 4383) + .saturating_add(RocksDbWeight::get().reads(5_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::Tempo` (r:1 w:0) /// Proof: `SubtensorModule::Tempo` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::PendingEpochAt` (r:1 w:0) + /// Proof: `SubtensorModule::PendingEpochAt` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::LastEpochBlock` (r:1 w:0) + /// Proof: `SubtensorModule::LastEpochBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::AdminFreezeWindow` (r:1 w:0) /// Proof: `SubtensorModule::AdminFreezeWindow` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::NetworksAdded` (r:1 w:0) @@ -1084,15 +1232,19 @@ impl WeightInfo for () { /// Proof: `SubtensorModule::BondsPenalty` (`max_values`: None, `max_size`: None, mode: `Measured`) fn sudo_set_bonds_penalty() -> Weight { // Proof Size summary in bytes: - // Measured: `770` - // Estimated: `4235` - // Minimum execution time: 26_179_000 picoseconds. - Weight::from_parts(27_021_000, 4235) - .saturating_add(RocksDbWeight::get().reads(3_u64)) + // Measured: `918` + // Estimated: `4383` + // Minimum execution time: 32_931_000 picoseconds. + Weight::from_parts(34_023_000, 4383) + .saturating_add(RocksDbWeight::get().reads(5_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::Tempo` (r:1 w:0) /// Proof: `SubtensorModule::Tempo` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::PendingEpochAt` (r:1 w:0) + /// Proof: `SubtensorModule::PendingEpochAt` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::LastEpochBlock` (r:1 w:0) + /// Proof: `SubtensorModule::LastEpochBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::AdminFreezeWindow` (r:1 w:0) /// Proof: `SubtensorModule::AdminFreezeWindow` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::NetworksAdded` (r:1 w:0) @@ -1103,15 +1255,19 @@ impl WeightInfo for () { /// Proof: `SubtensorModule::MaxAllowedValidators` (`max_values`: None, `max_size`: None, mode: `Measured`) fn sudo_set_max_allowed_validators() -> Weight { // Proof Size summary in bytes: - // Measured: `770` - // Estimated: `4235` - // Minimum execution time: 27_652_000 picoseconds. - Weight::from_parts(28_463_000, 4235) - .saturating_add(RocksDbWeight::get().reads(4_u64)) + // Measured: `918` + // Estimated: `4383` + // Minimum execution time: 33_853_000 picoseconds. + Weight::from_parts(35_036_000, 4383) + .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::Tempo` (r:1 w:0) /// Proof: `SubtensorModule::Tempo` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::PendingEpochAt` (r:1 w:0) + /// Proof: `SubtensorModule::PendingEpochAt` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::LastEpochBlock` (r:1 w:0) + /// Proof: `SubtensorModule::LastEpochBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::AdminFreezeWindow` (r:1 w:0) /// Proof: `SubtensorModule::AdminFreezeWindow` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::NetworksAdded` (r:1 w:0) @@ -1120,11 +1276,11 @@ impl WeightInfo for () { /// Proof: `SubtensorModule::Difficulty` (`max_values`: None, `max_size`: None, mode: `Measured`) fn sudo_set_difficulty() -> Weight { // Proof Size summary in bytes: - // Measured: `770` - // Estimated: `4235` - // Minimum execution time: 26_359_000 picoseconds. - Weight::from_parts(27_091_000, 4235) - .saturating_add(RocksDbWeight::get().reads(3_u64)) + // Measured: `918` + // Estimated: `4383` + // Minimum execution time: 32_941_000 picoseconds. + Weight::from_parts(34_404_000, 4383) + .saturating_add(RocksDbWeight::get().reads(5_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::NetworksAdded` (r:1 w:0) @@ -1135,13 +1291,17 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `619` // Estimated: `4084` - // Minimum execution time: 15_729_000 picoseconds. - Weight::from_parts(16_811_000, 4084) + // Minimum execution time: 16_039_000 picoseconds. + Weight::from_parts(16_661_000, 4084) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::Tempo` (r:1 w:0) /// Proof: `SubtensorModule::Tempo` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::PendingEpochAt` (r:1 w:0) + /// Proof: `SubtensorModule::PendingEpochAt` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::LastEpochBlock` (r:1 w:0) + /// Proof: `SubtensorModule::LastEpochBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::AdminFreezeWindow` (r:1 w:0) /// Proof: `SubtensorModule::AdminFreezeWindow` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::NetworksAdded` (r:1 w:0) @@ -1150,15 +1310,19 @@ impl WeightInfo for () { /// Proof: `SubtensorModule::TargetRegistrationsPerInterval` (`max_values`: None, `max_size`: None, mode: `Measured`) fn sudo_set_target_registrations_per_interval() -> Weight { // Proof Size summary in bytes: - // Measured: `770` - // Estimated: `4235` - // Minimum execution time: 26_169_000 picoseconds. - Weight::from_parts(26_990_000, 4235) - .saturating_add(RocksDbWeight::get().reads(3_u64)) + // Measured: `918` + // Estimated: `4383` + // Minimum execution time: 32_641_000 picoseconds. + Weight::from_parts(33_662_000, 4383) + .saturating_add(RocksDbWeight::get().reads(5_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::Tempo` (r:1 w:0) /// Proof: `SubtensorModule::Tempo` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::PendingEpochAt` (r:1 w:0) + /// Proof: `SubtensorModule::PendingEpochAt` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::LastEpochBlock` (r:1 w:0) + /// Proof: `SubtensorModule::LastEpochBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::AdminFreezeWindow` (r:1 w:0) /// Proof: `SubtensorModule::AdminFreezeWindow` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::NetworksAdded` (r:1 w:0) @@ -1169,15 +1333,19 @@ impl WeightInfo for () { /// Proof: `SubtensorModule::ActivityCutoff` (`max_values`: None, `max_size`: None, mode: `Measured`) fn sudo_set_activity_cutoff() -> Weight { // Proof Size summary in bytes: - // Measured: `832` - // Estimated: `4297` - // Minimum execution time: 28_202_000 picoseconds. - Weight::from_parts(29_676_000, 4297) - .saturating_add(RocksDbWeight::get().reads(4_u64)) + // Measured: `918` + // Estimated: `4383` + // Minimum execution time: 34_033_000 picoseconds. + Weight::from_parts(34_995_000, 4383) + .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::Tempo` (r:1 w:0) /// Proof: `SubtensorModule::Tempo` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::PendingEpochAt` (r:1 w:0) + /// Proof: `SubtensorModule::PendingEpochAt` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::LastEpochBlock` (r:1 w:0) + /// Proof: `SubtensorModule::LastEpochBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::AdminFreezeWindow` (r:1 w:0) /// Proof: `SubtensorModule::AdminFreezeWindow` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::NetworksAdded` (r:1 w:0) @@ -1186,11 +1354,11 @@ impl WeightInfo for () { /// Proof: `SubtensorModule::Rho` (`max_values`: None, `max_size`: None, mode: `Measured`) fn sudo_set_rho() -> Weight { // Proof Size summary in bytes: - // Measured: `770` - // Estimated: `4235` - // Minimum execution time: 23_193_000 picoseconds. - Weight::from_parts(23_735_000, 4235) - .saturating_add(RocksDbWeight::get().reads(3_u64)) + // Measured: `918` + // Estimated: `4383` + // Minimum execution time: 29_826_000 picoseconds. + Weight::from_parts(30_547_000, 4383) + .saturating_add(RocksDbWeight::get().reads(5_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::NetworksAdded` (r:1 w:0) @@ -1201,13 +1369,17 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `619` // Estimated: `4084` - // Minimum execution time: 16_009_000 picoseconds. - Weight::from_parts(16_501_000, 4084) + // Minimum execution time: 15_669_000 picoseconds. + Weight::from_parts(16_420_000, 4084) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::Tempo` (r:1 w:0) /// Proof: `SubtensorModule::Tempo` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::PendingEpochAt` (r:1 w:0) + /// Proof: `SubtensorModule::PendingEpochAt` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::LastEpochBlock` (r:1 w:0) + /// Proof: `SubtensorModule::LastEpochBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::AdminFreezeWindow` (r:1 w:0) /// Proof: `SubtensorModule::AdminFreezeWindow` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::NetworksAdded` (r:1 w:0) @@ -1220,15 +1392,19 @@ impl WeightInfo for () { /// Proof: `SubtensorModule::MinAllowedUids` (`max_values`: None, `max_size`: None, mode: `Measured`) fn sudo_set_min_allowed_uids() -> Weight { // Proof Size summary in bytes: - // Measured: `770` - // Estimated: `4235` - // Minimum execution time: 29_495_000 picoseconds. - Weight::from_parts(30_577_000, 4235) - .saturating_add(RocksDbWeight::get().reads(5_u64)) + // Measured: `918` + // Estimated: `4383` + // Minimum execution time: 36_428_000 picoseconds. + Weight::from_parts(37_490_000, 4383) + .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::Tempo` (r:1 w:0) /// Proof: `SubtensorModule::Tempo` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::PendingEpochAt` (r:1 w:0) + /// Proof: `SubtensorModule::PendingEpochAt` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::LastEpochBlock` (r:1 w:0) + /// Proof: `SubtensorModule::LastEpochBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::AdminFreezeWindow` (r:1 w:0) /// Proof: `SubtensorModule::AdminFreezeWindow` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::NetworksAdded` (r:1 w:0) @@ -1243,15 +1419,19 @@ impl WeightInfo for () { /// Proof: `SubtensorModule::MaxAllowedUids` (`max_values`: None, `max_size`: None, mode: `Measured`) fn sudo_set_max_allowed_uids() -> Weight { // Proof Size summary in bytes: - // Measured: `820` - // Estimated: `4285` - // Minimum execution time: 34_475_000 picoseconds. - Weight::from_parts(35_696_000, 4285) - .saturating_add(RocksDbWeight::get().reads(6_u64)) + // Measured: `968` + // Estimated: `4433` + // Minimum execution time: 41_086_000 picoseconds. + Weight::from_parts(42_659_000, 4433) + .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::Tempo` (r:1 w:0) /// Proof: `SubtensorModule::Tempo` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::PendingEpochAt` (r:1 w:0) + /// Proof: `SubtensorModule::PendingEpochAt` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::LastEpochBlock` (r:1 w:0) + /// Proof: `SubtensorModule::LastEpochBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::AdminFreezeWindow` (r:1 w:0) /// Proof: `SubtensorModule::AdminFreezeWindow` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::NetworksAdded` (r:1 w:0) @@ -1260,15 +1440,19 @@ impl WeightInfo for () { /// Proof: `SubtensorModule::MinAllowedWeights` (`max_values`: None, `max_size`: None, mode: `Measured`) fn sudo_set_min_allowed_weights() -> Weight { // Proof Size summary in bytes: - // Measured: `770` - // Estimated: `4235` - // Minimum execution time: 26_209_000 picoseconds. - Weight::from_parts(27_151_000, 4235) - .saturating_add(RocksDbWeight::get().reads(3_u64)) + // Measured: `918` + // Estimated: `4383` + // Minimum execution time: 32_921_000 picoseconds. + Weight::from_parts(33_442_000, 4383) + .saturating_add(RocksDbWeight::get().reads(5_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::Tempo` (r:1 w:0) /// Proof: `SubtensorModule::Tempo` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::PendingEpochAt` (r:1 w:0) + /// Proof: `SubtensorModule::PendingEpochAt` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::LastEpochBlock` (r:1 w:0) + /// Proof: `SubtensorModule::LastEpochBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::AdminFreezeWindow` (r:1 w:0) /// Proof: `SubtensorModule::AdminFreezeWindow` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::NetworksAdded` (r:1 w:0) @@ -1277,15 +1461,19 @@ impl WeightInfo for () { /// Proof: `SubtensorModule::ImmunityPeriod` (`max_values`: None, `max_size`: None, mode: `Measured`) fn sudo_set_immunity_period() -> Weight { // Proof Size summary in bytes: - // Measured: `770` - // Estimated: `4235` - // Minimum execution time: 26_239_000 picoseconds. - Weight::from_parts(26_920_000, 4235) - .saturating_add(RocksDbWeight::get().reads(3_u64)) + // Measured: `918` + // Estimated: `4383` + // Minimum execution time: 32_691_000 picoseconds. + Weight::from_parts(33_993_000, 4383) + .saturating_add(RocksDbWeight::get().reads(5_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::Tempo` (r:1 w:0) /// Proof: `SubtensorModule::Tempo` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::PendingEpochAt` (r:1 w:0) + /// Proof: `SubtensorModule::PendingEpochAt` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::LastEpochBlock` (r:1 w:0) + /// Proof: `SubtensorModule::LastEpochBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::AdminFreezeWindow` (r:1 w:0) /// Proof: `SubtensorModule::AdminFreezeWindow` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::NetworksAdded` (r:1 w:0) @@ -1294,15 +1482,19 @@ impl WeightInfo for () { /// Proof: `SubtensorModule::MaxRegistrationsPerBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) fn sudo_set_max_registrations_per_block() -> Weight { // Proof Size summary in bytes: - // Measured: `770` - // Estimated: `4235` - // Minimum execution time: 25_969_000 picoseconds. - Weight::from_parts(26_951_000, 4235) - .saturating_add(RocksDbWeight::get().reads(3_u64)) + // Measured: `918` + // Estimated: `4383` + // Minimum execution time: 32_761_000 picoseconds. + Weight::from_parts(34_203_000, 4383) + .saturating_add(RocksDbWeight::get().reads(5_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::Tempo` (r:1 w:0) /// Proof: `SubtensorModule::Tempo` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::PendingEpochAt` (r:1 w:0) + /// Proof: `SubtensorModule::PendingEpochAt` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::LastEpochBlock` (r:1 w:0) + /// Proof: `SubtensorModule::LastEpochBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::AdminFreezeWindow` (r:1 w:0) /// Proof: `SubtensorModule::AdminFreezeWindow` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::NetworksAdded` (r:1 w:0) @@ -1313,15 +1505,19 @@ impl WeightInfo for () { /// Proof: `SubtensorModule::MaxBurn` (`max_values`: None, `max_size`: None, mode: `Measured`) fn sudo_set_max_burn() -> Weight { // Proof Size summary in bytes: - // Measured: `797` - // Estimated: `4262` - // Minimum execution time: 28_954_000 picoseconds. - Weight::from_parts(29_765_000, 4262) - .saturating_add(RocksDbWeight::get().reads(4_u64)) + // Measured: `945` + // Estimated: `4410` + // Minimum execution time: 35_747_000 picoseconds. + Weight::from_parts(36_779_000, 4410) + .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::Tempo` (r:1 w:0) /// Proof: `SubtensorModule::Tempo` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::PendingEpochAt` (r:1 w:0) + /// Proof: `SubtensorModule::PendingEpochAt` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::LastEpochBlock` (r:1 w:0) + /// Proof: `SubtensorModule::LastEpochBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::AdminFreezeWindow` (r:1 w:0) /// Proof: `SubtensorModule::AdminFreezeWindow` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::NetworksAdded` (r:1 w:0) @@ -1332,11 +1528,11 @@ impl WeightInfo for () { /// Proof: `SubtensorModule::MinBurn` (`max_values`: None, `max_size`: None, mode: `Measured`) fn sudo_set_min_burn() -> Weight { // Proof Size summary in bytes: - // Measured: `772` - // Estimated: `4237` - // Minimum execution time: 29_265_000 picoseconds. - Weight::from_parts(30_005_000, 4237) - .saturating_add(RocksDbWeight::get().reads(4_u64)) + // Measured: `920` + // Estimated: `4385` + // Minimum execution time: 36_187_000 picoseconds. + Weight::from_parts(37_099_000, 4385) + .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::NetworkRegistrationAllowed` (r:0 w:1) @@ -1345,27 +1541,35 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_683_000 picoseconds. - Weight::from_parts(7_124_000, 0) + // Minimum execution time: 6_673_000 picoseconds. + Weight::from_parts(7_434_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::Tempo` (r:1 w:1) /// Proof: `SubtensorModule::Tempo` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::PendingEpochAt` (r:1 w:0) + /// Proof: `SubtensorModule::PendingEpochAt` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::LastEpochBlock` (r:1 w:1) + /// Proof: `SubtensorModule::LastEpochBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::AdminFreezeWindow` (r:1 w:0) /// Proof: `SubtensorModule::AdminFreezeWindow` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::NetworksAdded` (r:1 w:0) /// Proof: `SubtensorModule::NetworksAdded` (`max_values`: None, `max_size`: None, mode: `Measured`) fn sudo_set_tempo() -> Weight { // Proof Size summary in bytes: - // Measured: `770` - // Estimated: `4235` - // Minimum execution time: 25_758_000 picoseconds. - Weight::from_parts(26_580_000, 4235) - .saturating_add(RocksDbWeight::get().reads(3_u64)) - .saturating_add(RocksDbWeight::get().writes(1_u64)) + // Measured: `918` + // Estimated: `4383` + // Minimum execution time: 34_504_000 picoseconds. + Weight::from_parts(35_186_000, 4383) + .saturating_add(RocksDbWeight::get().reads(5_u64)) + .saturating_add(RocksDbWeight::get().writes(2_u64)) } /// Storage: `SubtensorModule::Tempo` (r:1 w:0) /// Proof: `SubtensorModule::Tempo` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::PendingEpochAt` (r:1 w:0) + /// Proof: `SubtensorModule::PendingEpochAt` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::LastEpochBlock` (r:1 w:0) + /// Proof: `SubtensorModule::LastEpochBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::AdminFreezeWindow` (r:1 w:0) /// Proof: `SubtensorModule::AdminFreezeWindow` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::NetworksAdded` (r:1 w:0) @@ -1374,15 +1578,19 @@ impl WeightInfo for () { /// Proof: `SubtensorModule::RevealPeriodEpochs` (`max_values`: None, `max_size`: None, mode: `Measured`) fn sudo_set_commit_reveal_weights_interval() -> Weight { // Proof Size summary in bytes: - // Measured: `770` - // Estimated: `4235` - // Minimum execution time: 26_099_000 picoseconds. - Weight::from_parts(27_551_000, 4235) - .saturating_add(RocksDbWeight::get().reads(3_u64)) + // Measured: `918` + // Estimated: `4383` + // Minimum execution time: 33_592_000 picoseconds. + Weight::from_parts(34_684_000, 4383) + .saturating_add(RocksDbWeight::get().reads(5_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::Tempo` (r:1 w:0) /// Proof: `SubtensorModule::Tempo` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::PendingEpochAt` (r:1 w:0) + /// Proof: `SubtensorModule::PendingEpochAt` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::LastEpochBlock` (r:1 w:0) + /// Proof: `SubtensorModule::LastEpochBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::AdminFreezeWindow` (r:1 w:0) /// Proof: `SubtensorModule::AdminFreezeWindow` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::NetworksAdded` (r:1 w:0) @@ -1391,11 +1599,11 @@ impl WeightInfo for () { /// Proof: `SubtensorModule::CommitRevealWeightsEnabled` (`max_values`: None, `max_size`: None, mode: `Measured`) fn sudo_set_commit_reveal_weights_enabled() -> Weight { // Proof Size summary in bytes: - // Measured: `770` - // Estimated: `4235` - // Minimum execution time: 26_319_000 picoseconds. - Weight::from_parts(26_940_000, 4235) - .saturating_add(RocksDbWeight::get().reads(3_u64)) + // Measured: `918` + // Estimated: `4383` + // Minimum execution time: 32_741_000 picoseconds. + Weight::from_parts(34_093_000, 4383) + .saturating_add(RocksDbWeight::get().reads(5_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::CommitRevealWeightsVersion` (r:0 w:1) @@ -1404,8 +1612,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_871_000 picoseconds. - Weight::from_parts(6_292_000, 0) + // Minimum execution time: 6_011_000 picoseconds. + Weight::from_parts(6_372_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::TxRateLimit` (r:0 w:1) @@ -1414,26 +1622,16 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_130_000 picoseconds. - Weight::from_parts(5_500_000, 0) - .saturating_add(RocksDbWeight::get().writes(1_u64)) - } - /// Storage: `SubtensorModule::MaxEpochsPerBlock` (r:0 w:1) - /// Proof: `SubtensorModule::MaxEpochsPerBlock` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - fn sudo_set_max_epochs_per_block() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 4_000_000 picoseconds. - Weight::from_parts(4_000_000, 0) + // Minimum execution time: 5_420_000 picoseconds. + Weight::from_parts(5_640_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } fn sudo_set_total_issuance() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_851_000 picoseconds. - Weight::from_parts(6_102_000, 0) + // Minimum execution time: 5_791_000 picoseconds. + Weight::from_parts(6_141_000, 0) } /// Storage: `SubtensorModule::NetworksAdded` (r:1 w:0) /// Proof: `SubtensorModule::NetworksAdded` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -1443,8 +1641,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `619` // Estimated: `4084` - // Minimum execution time: 15_890_000 picoseconds. - Weight::from_parts(16_380_000, 4084) + // Minimum execution time: 15_889_000 picoseconds. + Weight::from_parts(16_400_000, 4084) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -1454,8 +1652,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_259_000 picoseconds. - Weight::from_parts(5_510_000, 0) + // Minimum execution time: 5_239_000 picoseconds. + Weight::from_parts(5_831_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::NominatorMinRequiredStake` (r:1 w:1) @@ -1468,10 +1666,10 @@ impl WeightInfo for () { /// Proof: `SubtensorModule::Owner` (`max_values`: None, `max_size`: None, mode: `Measured`) fn sudo_set_nominator_min_required_stake() -> Weight { // Proof Size summary in bytes: - // Measured: `912` - // Estimated: `6852` - // Minimum execution time: 28_783_000 picoseconds. - Weight::from_parts(29_535_000, 6852) + // Measured: `950` + // Estimated: `6890` + // Minimum execution time: 29_575_000 picoseconds. + Weight::from_parts(30_617_000, 6890) .saturating_add(RocksDbWeight::get().reads(5_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -1481,8 +1679,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_190_000 picoseconds. - Weight::from_parts(5_390_000, 0) + // Minimum execution time: 5_249_000 picoseconds. + Weight::from_parts(5_620_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::MinDelegateTake` (r:0 w:1) @@ -1491,12 +1689,16 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_179_000 picoseconds. - Weight::from_parts(5_471_000, 0) + // Minimum execution time: 5_410_000 picoseconds. + Weight::from_parts(5_831_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::Tempo` (r:1 w:0) /// Proof: `SubtensorModule::Tempo` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::PendingEpochAt` (r:1 w:0) + /// Proof: `SubtensorModule::PendingEpochAt` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::LastEpochBlock` (r:1 w:0) + /// Proof: `SubtensorModule::LastEpochBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::AdminFreezeWindow` (r:1 w:0) /// Proof: `SubtensorModule::AdminFreezeWindow` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::NetworksAdded` (r:1 w:0) @@ -1509,30 +1711,38 @@ impl WeightInfo for () { /// Proof: `SubtensorModule::MinChildkeyTakePerSubnet` (`max_values`: None, `max_size`: None, mode: `Measured`) fn sudo_set_min_childkey_take_per_subnet() -> Weight { // Proof Size summary in bytes: - // Measured: `806` - // Estimated: `4271` - // Minimum execution time: 29_535_000 picoseconds. - Weight::from_parts(30_327_000, 4271) - .saturating_add(RocksDbWeight::get().reads(5_u64)) + // Measured: `954` + // Estimated: `4419` + // Minimum execution time: 36_688_000 picoseconds. + Weight::from_parts(37_690_000, 4419) + .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::Tempo` (r:1 w:0) /// Proof: `SubtensorModule::Tempo` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::PendingEpochAt` (r:1 w:0) + /// Proof: `SubtensorModule::PendingEpochAt` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::LastEpochBlock` (r:1 w:0) + /// Proof: `SubtensorModule::LastEpochBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::AdminFreezeWindow` (r:1 w:0) /// Proof: `SubtensorModule::AdminFreezeWindow` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::LiquidAlphaOn` (r:0 w:1) /// Proof: `SubtensorModule::LiquidAlphaOn` (`max_values`: None, `max_size`: None, mode: `Measured`) fn sudo_set_liquid_alpha_enabled() -> Weight { // Proof Size summary in bytes: - // Measured: `667` - // Estimated: `4132` - // Minimum execution time: 17_453_000 picoseconds. - Weight::from_parts(18_084_000, 4132) - .saturating_add(RocksDbWeight::get().reads(2_u64)) + // Measured: `815` + // Estimated: `4280` + // Minimum execution time: 24_345_000 picoseconds. + Weight::from_parts(25_497_000, 4280) + .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::Tempo` (r:1 w:0) /// Proof: `SubtensorModule::Tempo` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::PendingEpochAt` (r:1 w:0) + /// Proof: `SubtensorModule::PendingEpochAt` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::LastEpochBlock` (r:1 w:0) + /// Proof: `SubtensorModule::LastEpochBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::AdminFreezeWindow` (r:1 w:0) /// Proof: `SubtensorModule::AdminFreezeWindow` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::LiquidAlphaOn` (r:1 w:0) @@ -1541,11 +1751,11 @@ impl WeightInfo for () { /// Proof: `SubtensorModule::AlphaValues` (`max_values`: None, `max_size`: None, mode: `Measured`) fn sudo_set_alpha_values() -> Weight { // Proof Size summary in bytes: - // Measured: `814` - // Estimated: `4279` - // Minimum execution time: 25_918_000 picoseconds. - Weight::from_parts(26_509_000, 4279) - .saturating_add(RocksDbWeight::get().reads(3_u64)) + // Measured: `962` + // Estimated: `4427` + // Minimum execution time: 32_841_000 picoseconds. + Weight::from_parts(33_773_000, 4427) + .saturating_add(RocksDbWeight::get().reads(5_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::ColdkeySwapAnnouncementDelay` (r:0 w:1) @@ -1554,8 +1764,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_190_000 picoseconds. - Weight::from_parts(5_511_000, 0) + // Minimum execution time: 5_470_000 picoseconds. + Weight::from_parts(5_751_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::ColdkeySwapReannouncementDelay` (r:0 w:1) @@ -1564,8 +1774,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_270_000 picoseconds. - Weight::from_parts(5_500_000, 0) + // Minimum execution time: 5_340_000 picoseconds. + Weight::from_parts(5_721_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::DissolveNetworkScheduleDuration` (r:0 w:1) @@ -1574,23 +1784,27 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_139_000 picoseconds. - Weight::from_parts(5_440_000, 0) + // Minimum execution time: 5_290_000 picoseconds. + Weight::from_parts(5_591_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::Tempo` (r:1 w:0) /// Proof: `SubtensorModule::Tempo` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::PendingEpochAt` (r:1 w:0) + /// Proof: `SubtensorModule::PendingEpochAt` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::LastEpochBlock` (r:1 w:0) + /// Proof: `SubtensorModule::LastEpochBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::AdminFreezeWindow` (r:1 w:0) /// Proof: `SubtensorModule::AdminFreezeWindow` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::TransferToggle` (r:0 w:1) /// Proof: `SubtensorModule::TransferToggle` (`max_values`: None, `max_size`: None, mode: `Measured`) fn sudo_set_toggle_transfer() -> Weight { // Proof Size summary in bytes: - // Measured: `667` - // Estimated: `4132` - // Minimum execution time: 19_987_000 picoseconds. - Weight::from_parts(20_628_000, 4132) - .saturating_add(RocksDbWeight::get().reads(2_u64)) + // Measured: `815` + // Estimated: `4280` + // Minimum execution time: 27_401_000 picoseconds. + Weight::from_parts(28_122_000, 4280) + .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `AdminUtils::PrecompileEnable` (r:1 w:0) @@ -1599,7 +1813,7 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `42` // Estimated: `3507` - // Minimum execution time: 6_161_000 picoseconds. + // Minimum execution time: 6_211_000 picoseconds. Weight::from_parts(6_382_000, 3507) .saturating_add(RocksDbWeight::get().reads(1_u64)) } @@ -1609,8 +1823,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_665_000 picoseconds. - Weight::from_parts(2_945_000, 0) + // Minimum execution time: 2_816_000 picoseconds. + Weight::from_parts(2_996_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::EMAPriceHalvingBlocks` (r:0 w:1) @@ -1619,12 +1833,16 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_857_000 picoseconds. - Weight::from_parts(4_158_000, 0) + // Minimum execution time: 3_787_000 picoseconds. + Weight::from_parts(4_228_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::Tempo` (r:1 w:0) /// Proof: `SubtensorModule::Tempo` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::PendingEpochAt` (r:1 w:0) + /// Proof: `SubtensorModule::PendingEpochAt` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::LastEpochBlock` (r:1 w:0) + /// Proof: `SubtensorModule::LastEpochBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::AdminFreezeWindow` (r:1 w:0) /// Proof: `SubtensorModule::AdminFreezeWindow` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::NetworksAdded` (r:1 w:0) @@ -1633,41 +1851,49 @@ impl WeightInfo for () { /// Proof: `SubtensorModule::AlphaSigmoidSteepness` (`max_values`: None, `max_size`: None, mode: `Measured`) fn sudo_set_alpha_sigmoid_steepness() -> Weight { // Proof Size summary in bytes: - // Measured: `770` - // Estimated: `4235` - // Minimum execution time: 23_253_000 picoseconds. - Weight::from_parts(23_824_000, 4235) - .saturating_add(RocksDbWeight::get().reads(3_u64)) + // Measured: `918` + // Estimated: `4383` + // Minimum execution time: 29_746_000 picoseconds. + Weight::from_parts(30_808_000, 4383) + .saturating_add(RocksDbWeight::get().reads(5_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::Tempo` (r:1 w:0) /// Proof: `SubtensorModule::Tempo` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::PendingEpochAt` (r:1 w:0) + /// Proof: `SubtensorModule::PendingEpochAt` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::LastEpochBlock` (r:1 w:0) + /// Proof: `SubtensorModule::LastEpochBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::AdminFreezeWindow` (r:1 w:0) /// Proof: `SubtensorModule::AdminFreezeWindow` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::Yuma3On` (r:0 w:1) /// Proof: `SubtensorModule::Yuma3On` (`max_values`: None, `max_size`: None, mode: `Measured`) fn sudo_set_yuma3_enabled() -> Weight { // Proof Size summary in bytes: - // Measured: `667` - // Estimated: `4132` - // Minimum execution time: 20_408_000 picoseconds. - Weight::from_parts(20_928_000, 4132) - .saturating_add(RocksDbWeight::get().reads(2_u64)) + // Measured: `815` + // Estimated: `4280` + // Minimum execution time: 27_221_000 picoseconds. + Weight::from_parts(27_762_000, 4280) + .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::Tempo` (r:1 w:0) /// Proof: `SubtensorModule::Tempo` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::PendingEpochAt` (r:1 w:0) + /// Proof: `SubtensorModule::PendingEpochAt` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::LastEpochBlock` (r:1 w:0) + /// Proof: `SubtensorModule::LastEpochBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::AdminFreezeWindow` (r:1 w:0) /// Proof: `SubtensorModule::AdminFreezeWindow` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::BondsResetOn` (r:0 w:1) /// Proof: `SubtensorModule::BondsResetOn` (`max_values`: None, `max_size`: None, mode: `Measured`) fn sudo_set_bonds_reset_enabled() -> Weight { // Proof Size summary in bytes: - // Measured: `667` - // Estimated: `4132` - // Minimum execution time: 22_281_000 picoseconds. - Weight::from_parts(23_013_000, 4132) - .saturating_add(RocksDbWeight::get().reads(2_u64)) + // Measured: `815` + // Estimated: `4280` + // Minimum execution time: 29_094_000 picoseconds. + Weight::from_parts(30_346_000, 4280) + .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::NetworksAdded` (r:1 w:0) @@ -1678,8 +1904,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `619` // Estimated: `4084` - // Minimum execution time: 15_729_000 picoseconds. - Weight::from_parts(16_490_000, 4084) + // Minimum execution time: 15_879_000 picoseconds. + Weight::from_parts(16_461_000, 4084) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -1693,24 +1919,28 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `712` // Estimated: `4177` - // Minimum execution time: 24_325_000 picoseconds. - Weight::from_parts(25_427_000, 4177) + // Minimum execution time: 24_515_000 picoseconds. + Weight::from_parts(25_568_000, 4177) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } /// Storage: `SubtensorModule::Tempo` (r:1 w:0) /// Proof: `SubtensorModule::Tempo` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::PendingEpochAt` (r:1 w:0) + /// Proof: `SubtensorModule::PendingEpochAt` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::LastEpochBlock` (r:1 w:0) + /// Proof: `SubtensorModule::LastEpochBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::AdminFreezeWindow` (r:1 w:0) /// Proof: `SubtensorModule::AdminFreezeWindow` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::SubtokenEnabled` (r:0 w:1) /// Proof: `SubtensorModule::SubtokenEnabled` (`max_values`: None, `max_size`: None, mode: `Measured`) fn sudo_set_subtoken_enabled() -> Weight { // Proof Size summary in bytes: - // Measured: `667` - // Estimated: `4132` - // Minimum execution time: 16_661_000 picoseconds. - Weight::from_parts(17_342_000, 4132) - .saturating_add(RocksDbWeight::get().reads(2_u64)) + // Measured: `815` + // Estimated: `4280` + // Minimum execution time: 24_024_000 picoseconds. + Weight::from_parts(24_776_000, 4280) + .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::AdminFreezeWindow` (r:0 w:1) @@ -1719,8 +1949,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_279_000 picoseconds. - Weight::from_parts(5_540_000, 0) + // Minimum execution time: 5_289_000 picoseconds. + Weight::from_parts(5_701_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::OwnerHyperparamRateLimit` (r:0 w:1) @@ -1729,27 +1959,35 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_260_000 picoseconds. - Weight::from_parts(5_620_000, 0) + // Minimum execution time: 5_359_000 picoseconds. + Weight::from_parts(6_262_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::Tempo` (r:1 w:0) /// Proof: `SubtensorModule::Tempo` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::PendingEpochAt` (r:1 w:0) + /// Proof: `SubtensorModule::PendingEpochAt` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::LastEpochBlock` (r:1 w:0) + /// Proof: `SubtensorModule::LastEpochBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::AdminFreezeWindow` (r:1 w:0) /// Proof: `SubtensorModule::AdminFreezeWindow` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::ImmuneOwnerUidsLimit` (r:0 w:1) /// Proof: `SubtensorModule::ImmuneOwnerUidsLimit` (`max_values`: None, `max_size`: None, mode: `Measured`) fn sudo_set_owner_immune_neuron_limit() -> Weight { // Proof Size summary in bytes: - // Measured: `667` - // Estimated: `4132` - // Minimum execution time: 16_961_000 picoseconds. - Weight::from_parts(17_663_000, 4132) - .saturating_add(RocksDbWeight::get().reads(2_u64)) + // Measured: `815` + // Estimated: `4280` + // Minimum execution time: 24_095_000 picoseconds. + Weight::from_parts(24_696_000, 4280) + .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::Tempo` (r:1 w:0) /// Proof: `SubtensorModule::Tempo` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::PendingEpochAt` (r:1 w:0) + /// Proof: `SubtensorModule::PendingEpochAt` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::LastEpochBlock` (r:1 w:0) + /// Proof: `SubtensorModule::LastEpochBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::AdminFreezeWindow` (r:1 w:0) /// Proof: `SubtensorModule::AdminFreezeWindow` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::NetworksAdded` (r:1 w:0) @@ -1762,11 +2000,11 @@ impl WeightInfo for () { /// Proof: `SubtensorModule::SubnetworkN` (`max_values`: None, `max_size`: None, mode: `Measured`) fn sudo_trim_to_max_allowed_uids() -> Weight { // Proof Size summary in bytes: - // Measured: `785` - // Estimated: `4250` - // Minimum execution time: 29_645_000 picoseconds. - Weight::from_parts(30_477_000, 4250) - .saturating_add(RocksDbWeight::get().reads(6_u64)) + // Measured: `933` + // Estimated: `4398` + // Minimum execution time: 36_998_000 picoseconds. + Weight::from_parts(38_441_000, 4398) + .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::MinNonImmuneUids` (r:0 w:1) @@ -1775,8 +2013,18 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_953_000 picoseconds. - Weight::from_parts(7_134_000, 0) + // Minimum execution time: 6_893_000 picoseconds. + Weight::from_parts(7_113_000, 0) + .saturating_add(RocksDbWeight::get().writes(1_u64)) + } + /// Storage: `SubtensorModule::MaxEpochsPerBlock` (r:0 w:1) + /// Proof: `SubtensorModule::MaxEpochsPerBlock` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn sudo_set_max_epochs_per_block() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 5_410_000 picoseconds. + Weight::from_parts(5_801_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } } diff --git a/pallets/proxy/src/weights.rs b/pallets/proxy/src/weights.rs index 3a1f7a3775..dba859ae7f 100644 --- a/pallets/proxy/src/weights.rs +++ b/pallets/proxy/src/weights.rs @@ -2,9 +2,9 @@ //! Autogenerated weights for `pallet_subtensor_proxy` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 49.1.0 -//! DATE: 2026-06-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2026-06-23, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `runnervm1li68`, CPU: `AMD EPYC 9V74 80-Core Processor` +//! HOSTNAME: `runnervm7b5n9`, CPU: `AMD EPYC 7763 64-Core Processor` //! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: `1024` // Executed Command: @@ -22,7 +22,7 @@ // --no-storage-info // --no-min-squares // --no-median-slopes -// --output=/tmp/tmp.p1bMVWhQG1 +// --output=/tmp/tmp.h2eSm1Xq5e // --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: 23_305_000 picoseconds. - Weight::from_parts(24_344_176, 4254) - // Standard Error: 2_859 - .saturating_add(Weight::from_parts(61_607, 0).saturating_mul(p.into())) + // Minimum execution time: 26_529_000 picoseconds. + Weight::from_parts(27_681_445, 4254) + // Standard Error: 3_590 + .saturating_add(Weight::from_parts(80_836, 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: 48_211_000 picoseconds. - Weight::from_parts(49_327_900, 8615) - // Standard Error: 1_615 - .saturating_add(Weight::from_parts(229_917, 0).saturating_mul(a.into())) - // Standard Error: 6_471 - .saturating_add(Weight::from_parts(52_466, 0).saturating_mul(p.into())) + // Minimum execution time: 51_626_000 picoseconds. + Weight::from_parts(52_920_096, 8615) + // Standard Error: 1_690 + .saturating_add(Weight::from_parts(212_616, 0).saturating_mul(a.into())) + // Standard Error: 6_772 + .saturating_add(Weight::from_parts(48_853, 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,14 +109,16 @@ 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: 23_335_000 picoseconds. - Weight::from_parts(24_441_792, 8615) - // Standard Error: 1_160 - .saturating_add(Weight::from_parts(199_923, 0).saturating_mul(a.into())) + // Minimum execution time: 25_457_000 picoseconds. + Weight::from_parts(25_454_270, 8615) + // Standard Error: 1_102 + .saturating_add(Weight::from_parts(204_204, 0).saturating_mul(a.into())) + // Standard Error: 4_416 + .saturating_add(Weight::from_parts(20_244, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -126,16 +128,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 reject_announcement(a: u32, p: u32, ) -> Weight { + fn reject_announcement(a: u32, _p: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `299 + a * (68 ±0)` // Estimated: `8615` - // Minimum execution time: 23_325_000 picoseconds. - Weight::from_parts(24_119_725, 8615) - // Standard Error: 1_004 - .saturating_add(Weight::from_parts(199_684, 0).saturating_mul(a.into())) - // Standard Error: 4_022 - .saturating_add(Weight::from_parts(14_188, 0).saturating_mul(p.into())) + // Minimum execution time: 25_427_000 picoseconds. + Weight::from_parts(26_360_868, 8615) + // Standard Error: 1_187 + .saturating_add(Weight::from_parts(191_060, 0).saturating_mul(a.into())) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -151,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: 30_786_000 picoseconds. - Weight::from_parts(31_264_086, 8615) - // Standard Error: 1_063 - .saturating_add(Weight::from_parts(201_071, 0).saturating_mul(a.into())) - // Standard Error: 4_257 - .saturating_add(Weight::from_parts(48_234, 0).saturating_mul(p.into())) + // Minimum execution time: 33_251_000 picoseconds. + Weight::from_parts(33_549_165, 8615) + // Standard Error: 1_456 + .saturating_add(Weight::from_parts(198_190, 0).saturating_mul(a.into())) + // Standard Error: 5_835 + .saturating_add(Weight::from_parts(38_352, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -167,10 +167,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `119 + p * (37 ±0)` // Estimated: `4254` - // Minimum execution time: 22_033_000 picoseconds. - Weight::from_parts(23_091_198, 4254) - // Standard Error: 1_876 - .saturating_add(Weight::from_parts(71_914, 0).saturating_mul(p.into())) + // Minimum execution time: 24_445_000 picoseconds. + Weight::from_parts(25_355_274, 4254) + // Standard Error: 2_238 + .saturating_add(Weight::from_parts(71_464, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -183,10 +183,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `119 + p * (37 ±0)` // Estimated: `4254` - // Minimum execution time: 23_985_000 picoseconds. - Weight::from_parts(25_137_108, 4254) - // Standard Error: 2_461 - .saturating_add(Weight::from_parts(63_781, 0).saturating_mul(p.into())) + // Minimum execution time: 25_989_000 picoseconds. + Weight::from_parts(27_257_916, 4254) + // Standard Error: 2_553 + .saturating_add(Weight::from_parts(61_685, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -197,10 +197,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `119 + p * (37 ±0)` // Estimated: `4254` - // Minimum execution time: 24_056_000 picoseconds. - Weight::from_parts(25_056_188, 4254) - // Standard Error: 2_438 - .saturating_add(Weight::from_parts(41_155, 0).saturating_mul(p.into())) + // Minimum execution time: 25_818_000 picoseconds. + Weight::from_parts(26_983_745, 4254) + // Standard Error: 2_880 + .saturating_add(Weight::from_parts(33_050, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -211,10 +211,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `139` // Estimated: `4254` - // Minimum execution time: 24_766_000 picoseconds. - Weight::from_parts(25_774_219, 4254) - // Standard Error: 2_177 - .saturating_add(Weight::from_parts(29_107, 0).saturating_mul(p.into())) + // Minimum execution time: 25_899_000 picoseconds. + Weight::from_parts(26_924_717, 4254) + // Standard Error: 2_885 + .saturating_add(Weight::from_parts(28_165, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -225,10 +225,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `156 + p * (37 ±0)` // Estimated: `4254` - // Minimum execution time: 23_315_000 picoseconds. - Weight::from_parts(24_401_670, 4254) - // Standard Error: 1_977 - .saturating_add(Weight::from_parts(40_473, 0).saturating_mul(p.into())) + // Minimum execution time: 24_946_000 picoseconds. + Weight::from_parts(26_136_604, 4254) + // Standard Error: 3_120 + .saturating_add(Weight::from_parts(38_868, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -242,8 +242,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `412` // Estimated: `8615` - // Minimum execution time: 42_824_000 picoseconds. - Weight::from_parts(43_955_000, 8615) + // Minimum execution time: 44_283_000 picoseconds. + Weight::from_parts(45_074_000, 8615) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -256,10 +256,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `119 + p * (37 ±0)` // Estimated: `4254` - // Minimum execution time: 11_817_000 picoseconds. - Weight::from_parts(12_428_329, 4254) - // Standard Error: 1_464 - .saturating_add(Weight::from_parts(38_133, 0).saturating_mul(p.into())) + // Minimum execution time: 13_555_000 picoseconds. + Weight::from_parts(14_498_422, 4254) + // Standard Error: 2_077 + .saturating_add(Weight::from_parts(43_179, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -280,10 +280,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `637 + p * (37 ±0)` // Estimated: `4254 + p * (37 ±0)` - // Minimum execution time: 23_305_000 picoseconds. - Weight::from_parts(24_344_176, 4254) - // Standard Error: 2_859 - .saturating_add(Weight::from_parts(61_607, 0).saturating_mul(p.into())) + // Minimum execution time: 26_529_000 picoseconds. + Weight::from_parts(27_681_445, 4254) + // Standard Error: 3_590 + .saturating_add(Weight::from_parts(80_836, 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())) @@ -306,12 +306,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: 48_211_000 picoseconds. - Weight::from_parts(49_327_900, 8615) - // Standard Error: 1_615 - .saturating_add(Weight::from_parts(229_917, 0).saturating_mul(a.into())) - // Standard Error: 6_471 - .saturating_add(Weight::from_parts(52_466, 0).saturating_mul(p.into())) + // Minimum execution time: 51_626_000 picoseconds. + Weight::from_parts(52_920_096, 8615) + // Standard Error: 1_690 + .saturating_add(Weight::from_parts(212_616, 0).saturating_mul(a.into())) + // Standard Error: 6_772 + .saturating_add(Weight::from_parts(48_853, 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())) @@ -323,14 +323,16 @@ 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: 23_335_000 picoseconds. - Weight::from_parts(24_441_792, 8615) - // Standard Error: 1_160 - .saturating_add(Weight::from_parts(199_923, 0).saturating_mul(a.into())) + // Minimum execution time: 25_457_000 picoseconds. + Weight::from_parts(25_454_270, 8615) + // Standard Error: 1_102 + .saturating_add(Weight::from_parts(204_204, 0).saturating_mul(a.into())) + // Standard Error: 4_416 + .saturating_add(Weight::from_parts(20_244, 0).saturating_mul(p.into())) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -340,16 +342,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 reject_announcement(a: u32, p: u32, ) -> Weight { + fn reject_announcement(a: u32, _p: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `299 + a * (68 ±0)` // Estimated: `8615` - // Minimum execution time: 23_325_000 picoseconds. - Weight::from_parts(24_119_725, 8615) - // Standard Error: 1_004 - .saturating_add(Weight::from_parts(199_684, 0).saturating_mul(a.into())) - // Standard Error: 4_022 - .saturating_add(Weight::from_parts(14_188, 0).saturating_mul(p.into())) + // Minimum execution time: 25_427_000 picoseconds. + Weight::from_parts(26_360_868, 8615) + // Standard Error: 1_187 + .saturating_add(Weight::from_parts(191_060, 0).saturating_mul(a.into())) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -365,12 +365,12 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `308 + a * (68 ±0) + p * (37 ±0)` // Estimated: `8615` - // Minimum execution time: 30_786_000 picoseconds. - Weight::from_parts(31_264_086, 8615) - // Standard Error: 1_063 - .saturating_add(Weight::from_parts(201_071, 0).saturating_mul(a.into())) - // Standard Error: 4_257 - .saturating_add(Weight::from_parts(48_234, 0).saturating_mul(p.into())) + // Minimum execution time: 33_251_000 picoseconds. + Weight::from_parts(33_549_165, 8615) + // Standard Error: 1_456 + .saturating_add(Weight::from_parts(198_190, 0).saturating_mul(a.into())) + // Standard Error: 5_835 + .saturating_add(Weight::from_parts(38_352, 0).saturating_mul(p.into())) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -381,10 +381,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `119 + p * (37 ±0)` // Estimated: `4254` - // Minimum execution time: 22_033_000 picoseconds. - Weight::from_parts(23_091_198, 4254) - // Standard Error: 1_876 - .saturating_add(Weight::from_parts(71_914, 0).saturating_mul(p.into())) + // Minimum execution time: 24_445_000 picoseconds. + Weight::from_parts(25_355_274, 4254) + // Standard Error: 2_238 + .saturating_add(Weight::from_parts(71_464, 0).saturating_mul(p.into())) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -397,10 +397,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `119 + p * (37 ±0)` // Estimated: `4254` - // Minimum execution time: 23_985_000 picoseconds. - Weight::from_parts(25_137_108, 4254) - // Standard Error: 2_461 - .saturating_add(Weight::from_parts(63_781, 0).saturating_mul(p.into())) + // Minimum execution time: 25_989_000 picoseconds. + Weight::from_parts(27_257_916, 4254) + // Standard Error: 2_553 + .saturating_add(Weight::from_parts(61_685, 0).saturating_mul(p.into())) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -411,10 +411,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `119 + p * (37 ±0)` // Estimated: `4254` - // Minimum execution time: 24_056_000 picoseconds. - Weight::from_parts(25_056_188, 4254) - // Standard Error: 2_438 - .saturating_add(Weight::from_parts(41_155, 0).saturating_mul(p.into())) + // Minimum execution time: 25_818_000 picoseconds. + Weight::from_parts(26_983_745, 4254) + // Standard Error: 2_880 + .saturating_add(Weight::from_parts(33_050, 0).saturating_mul(p.into())) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -425,10 +425,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `139` // Estimated: `4254` - // Minimum execution time: 24_766_000 picoseconds. - Weight::from_parts(25_774_219, 4254) - // Standard Error: 2_177 - .saturating_add(Weight::from_parts(29_107, 0).saturating_mul(p.into())) + // Minimum execution time: 25_899_000 picoseconds. + Weight::from_parts(26_924_717, 4254) + // Standard Error: 2_885 + .saturating_add(Weight::from_parts(28_165, 0).saturating_mul(p.into())) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -439,10 +439,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `156 + p * (37 ±0)` // Estimated: `4254` - // Minimum execution time: 23_315_000 picoseconds. - Weight::from_parts(24_401_670, 4254) - // Standard Error: 1_977 - .saturating_add(Weight::from_parts(40_473, 0).saturating_mul(p.into())) + // Minimum execution time: 24_946_000 picoseconds. + Weight::from_parts(26_136_604, 4254) + // Standard Error: 3_120 + .saturating_add(Weight::from_parts(38_868, 0).saturating_mul(p.into())) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -456,8 +456,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `412` // Estimated: `8615` - // Minimum execution time: 42_824_000 picoseconds. - Weight::from_parts(43_955_000, 8615) + // Minimum execution time: 44_283_000 picoseconds. + Weight::from_parts(45_074_000, 8615) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -470,10 +470,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `119 + p * (37 ±0)` // Estimated: `4254` - // Minimum execution time: 11_817_000 picoseconds. - Weight::from_parts(12_428_329, 4254) - // Standard Error: 1_464 - .saturating_add(Weight::from_parts(38_133, 0).saturating_mul(p.into())) + // Minimum execution time: 13_555_000 picoseconds. + Weight::from_parts(14_498_422, 4254) + // Standard Error: 2_077 + .saturating_add(Weight::from_parts(43_179, 0).saturating_mul(p.into())) .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 4b5806aaf5..c36043d5f6 100644 --- a/pallets/subtensor/src/weights.rs +++ b/pallets/subtensor/src/weights.rs @@ -2,16 +2,16 @@ //! Autogenerated weights for `pallet_subtensor` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 49.1.0 -//! DATE: 2026-06-22, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2026-06-23, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `user-laptop`, CPU: `` +//! HOSTNAME: `runnervm7b5n9`, CPU: `AMD EPYC 7763 64-Core Processor` //! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: `1024` // Executed Command: -// /Users/user/Work/subtensor/target/production/node-subtensor +// /home/runner/work/subtensor/subtensor/target/production/node-subtensor // benchmark // pallet -// --runtime=/Users/user/Work/subtensor/target/production/wbuild/node-subtensor-runtime/node_subtensor_runtime.compact.compressed.wasm +// --runtime=/home/runner/work/subtensor/subtensor/target/production/wbuild/node-subtensor-runtime/node_subtensor_runtime.compact.compressed.wasm // --genesis-builder=runtime // --genesis-builder-preset=benchmark // --wasm-execution=compiled @@ -22,8 +22,8 @@ // --no-storage-info // --no-min-squares // --no-median-slopes -// --output=/Users/user/Work/subtensor/pallets/subtensor/src/weights.rs -// --template=/Users/user/Work/subtensor/.maintain/frame-weight-template.hbs +// --output=/tmp/tmp.cU3UNvMMf3 +// --template=/home/runner/work/subtensor/subtensor/.maintain/frame-weight-template.hbs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -185,8 +185,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1865` // Estimated: `6148` - // Minimum execution time: 148_000_000 picoseconds. - Weight::from_parts(155_000_000, 6148) + // Minimum execution time: 326_148_000 picoseconds. + Weight::from_parts(330_386_000, 6148) .saturating_add(T::DbWeight::get().reads(34_u64)) .saturating_add(T::DbWeight::get().writes(29_u64)) } @@ -228,8 +228,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `188820` // Estimated: `10327410` - // Minimum execution time: 6_739_000_000 picoseconds. - Weight::from_parts(6_870_000_000, 10327410) + // Minimum execution time: 14_933_071_000 picoseconds. + Weight::from_parts(15_246_145_000, 10327410) .saturating_add(T::DbWeight::get().reads(4112_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -299,8 +299,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `2226` // Estimated: `8727` - // Minimum execution time: 280_000_000 picoseconds. - Weight::from_parts(284_000_000, 8727) + // Minimum execution time: 627_509_000 picoseconds. + Weight::from_parts(649_871_000, 8727) .saturating_add(T::DbWeight::get().reads(32_u64)) .saturating_add(T::DbWeight::get().writes(16_u64)) } @@ -314,8 +314,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `713` // Estimated: `4178` - // Minimum execution time: 13_000_000 picoseconds. - Weight::from_parts(16_000_000, 4178) + // Minimum execution time: 30_817_000 picoseconds. + Weight::from_parts(31_769_000, 4178) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -329,8 +329,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `812` // Estimated: `4277` - // Minimum execution time: 13_000_000 picoseconds. - Weight::from_parts(16_000_000, 4277) + // Minimum execution time: 28_503_000 picoseconds. + Weight::from_parts(29_475_000, 4277) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -412,8 +412,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1798` // Estimated: `6148` - // Minimum execution time: 149_000_000 picoseconds. - Weight::from_parts(154_000_000, 6148) + // Minimum execution time: 327_380_000 picoseconds. + Weight::from_parts(331_367_000, 6148) .saturating_add(T::DbWeight::get().reads(34_u64)) .saturating_add(T::DbWeight::get().writes(29_u64)) } @@ -465,8 +465,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1516` // Estimated: `4981` - // Minimum execution time: 46_000_000 picoseconds. - Weight::from_parts(47_000_000, 4981) + // Minimum execution time: 101_559_000 picoseconds. + Weight::from_parts(102_911_000, 4981) .saturating_add(T::DbWeight::get().reads(19_u64)) .saturating_add(T::DbWeight::get().writes(16_u64)) } @@ -586,8 +586,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1532` // Estimated: `9947` - // Minimum execution time: 123_000_000 picoseconds. - Weight::from_parts(125_000_000, 9947) + // Minimum execution time: 270_073_000 picoseconds. + Weight::from_parts(277_638_000, 9947) .saturating_add(T::DbWeight::get().reads(40_u64)) .saturating_add(T::DbWeight::get().writes(48_u64)) } @@ -621,8 +621,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1249` // Estimated: `4714` - // Minimum execution time: 30_000_000 picoseconds. - Weight::from_parts(31_000_000, 4714) + // Minimum execution time: 67_746_000 picoseconds. + Weight::from_parts(69_860_000, 4714) .saturating_add(T::DbWeight::get().reads(13_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -668,8 +668,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1650` // Estimated: `7590` - // Minimum execution time: 49_000_000 picoseconds. - Weight::from_parts(52_000_000, 7590) + // Minimum execution time: 110_316_000 picoseconds. + Weight::from_parts(111_748_000, 7590) .saturating_add(T::DbWeight::get().reads(19_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -679,8 +679,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_000_000 picoseconds. - Weight::from_parts(2_000_000, 0) + // Minimum execution time: 5_540_000 picoseconds. + Weight::from_parts(5_781_000, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::Owner` (r:1 w:0) @@ -701,8 +701,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1033` // Estimated: `4498` - // Minimum execution time: 23_000_000 picoseconds. - Weight::from_parts(25_000_000, 4498) + // Minimum execution time: 52_037_000 picoseconds. + Weight::from_parts(52_958_000, 4498) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -718,8 +718,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `694` // Estimated: `4159` - // Minimum execution time: 22_000_000 picoseconds. - Weight::from_parts(23_000_000, 4159) + // Minimum execution time: 45_806_000 picoseconds. + Weight::from_parts(46_356_000, 4159) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -757,6 +757,8 @@ impl WeightInfo for SubstrateWeight { /// Proof: `SubtensorModule::MaturityRate` (`max_values`: Some(1), `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::AccountFlags` (r:1 w:0) + /// Proof: `SubtensorModule::AccountFlags` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::DecayingLock` (r:1 w:0) /// Proof: `SubtensorModule::DecayingLock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `System::Account` (r:2 w:2) @@ -767,9 +769,9 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `2110` // Estimated: `13000` - // Minimum execution time: 128_000_000 picoseconds. - Weight::from_parts(132_000_000, 13000) - .saturating_add(T::DbWeight::get().reads(37_u64)) + // Minimum execution time: 282_877_000 picoseconds. + Weight::from_parts(286_614_000, 13000) + .saturating_add(T::DbWeight::get().reads(38_u64)) .saturating_add(T::DbWeight::get().writes(15_u64)) } /// Storage: `System::Account` (r:2 w:2) @@ -808,6 +810,8 @@ impl WeightInfo for SubstrateWeight { /// Proof: `SubtensorModule::MaturityRate` (`max_values`: Some(1), `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::AccountFlags` (r:1 w:0) + /// Proof: `SubtensorModule::AccountFlags` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::DecayingLock` (r:1 w:0) /// Proof: `SubtensorModule::DecayingLock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::ColdkeySwapAnnouncements` (r:0 w:1) @@ -820,9 +824,9 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `2166` // Estimated: `13056` - // Minimum execution time: 138_000_000 picoseconds. - Weight::from_parts(144_000_000, 13056) - .saturating_add(T::DbWeight::get().reads(37_u64)) + // Minimum execution time: 316_098_000 picoseconds. + Weight::from_parts(319_104_000, 13056) + .saturating_add(T::DbWeight::get().reads(38_u64)) .saturating_add(T::DbWeight::get().writes(19_u64)) } /// Storage: `SubtensorModule::ColdkeySwapAnnouncements` (r:1 w:0) @@ -833,8 +837,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `665` // Estimated: `4130` - // Minimum execution time: 10_000_000 picoseconds. - Weight::from_parts(11_000_000, 4130) + // Minimum execution time: 22_602_000 picoseconds. + Weight::from_parts(23_373_000, 4130) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -846,8 +850,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `613` // Estimated: `4078` - // Minimum execution time: 8_000_000 picoseconds. - Weight::from_parts(9_000_000, 4078) + // Minimum execution time: 18_154_000 picoseconds. + Weight::from_parts(18_995_000, 4078) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -859,8 +863,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_000_000 picoseconds. - Weight::from_parts(4_000_000, 0) + // Minimum execution time: 8_546_000 picoseconds. + Weight::from_parts(9_107_000, 0) .saturating_add(T::DbWeight::get().writes(2_u64)) } /// Storage: `SubtensorModule::CommitRevealWeightsEnabled` (r:1 w:0) @@ -905,8 +909,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `2155` // Estimated: `8095` - // Minimum execution time: 191_000_000 picoseconds. - Weight::from_parts(197_000_000, 8095) + // Minimum execution time: 409_853_000 picoseconds. + Weight::from_parts(428_318_000, 8095) .saturating_add(T::DbWeight::get().reads(19_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -940,8 +944,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1754` // Estimated: `5219` - // Minimum execution time: 74_000_000 picoseconds. - Weight::from_parts(75_000_000, 5219) + // Minimum execution time: 171_559_000 picoseconds. + Weight::from_parts(173_743_000, 5219) .saturating_add(T::DbWeight::get().reads(13_u64)) .saturating_add(T::DbWeight::get().writes(6_u64)) } @@ -973,8 +977,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1754` // Estimated: `5219` - // Minimum execution time: 72_000_000 picoseconds. - Weight::from_parts(73_000_000, 5219) + // Minimum execution time: 167_031_000 picoseconds. + Weight::from_parts(169_686_000, 5219) .saturating_add(T::DbWeight::get().reads(12_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -994,8 +998,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1118` // Estimated: `4583` - // Minimum execution time: 18_000_000 picoseconds. - Weight::from_parts(19_000_000, 4583) + // Minimum execution time: 38_121_000 picoseconds. + Weight::from_parts(38_972_000, 4583) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -1065,8 +1069,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `2226` // Estimated: `8727` - // Minimum execution time: 357_000_000 picoseconds. - Weight::from_parts(371_000_000, 8727) + // Minimum execution time: 832_551_000 picoseconds. + Weight::from_parts(851_326_000, 8727) .saturating_add(T::DbWeight::get().reads(32_u64)) .saturating_add(T::DbWeight::get().writes(16_u64)) } @@ -1102,8 +1106,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1979` // Estimated: `7919` - // Minimum execution time: 95_000_000 picoseconds. - Weight::from_parts(96_000_000, 7919) + // Minimum execution time: 212_987_000 picoseconds. + Weight::from_parts(217_515_000, 7919) .saturating_add(T::DbWeight::get().reads(19_u64)) .saturating_add(T::DbWeight::get().writes(7_u64)) } @@ -1159,8 +1163,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `2142` // Estimated: `10557` - // Minimum execution time: 236_000_000 picoseconds. - Weight::from_parts(238_000_000, 10557) + // Minimum execution time: 529_496_000 picoseconds. + Weight::from_parts(539_615_000, 10557) .saturating_add(T::DbWeight::get().reads(28_u64)) .saturating_add(T::DbWeight::get().writes(13_u64)) } @@ -1214,8 +1218,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `2176` // Estimated: `10591` - // Minimum execution time: 308_000_000 picoseconds. - Weight::from_parts(315_000_000, 10591) + // Minimum execution time: 693_783_000 picoseconds. + Weight::from_parts(715_854_000, 10591) .saturating_add(T::DbWeight::get().reads(27_u64)) .saturating_add(T::DbWeight::get().writes(13_u64)) } @@ -1287,8 +1291,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `2662` // Estimated: `11077` - // Minimum execution time: 397_000_000 picoseconds. - Weight::from_parts(404_000_000, 11077) + // Minimum execution time: 909_094_000 picoseconds. + Weight::from_parts(916_638_000, 11077) .saturating_add(T::DbWeight::get().reads(47_u64)) .saturating_add(T::DbWeight::get().writes(24_u64)) } @@ -1314,8 +1318,6 @@ impl WeightInfo for SubstrateWeight { /// 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::AccountFlags` (r:1 w:0) - /// Proof: `SubtensorModule::AccountFlags` (`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:0) @@ -1328,11 +1330,11 @@ 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: `2054` - // Estimated: `7994` - // Minimum execution time: 254_636_000 picoseconds. - Weight::from_parts(258_541_000, 7994) - .saturating_add(T::DbWeight::get().reads(19_u64)) + // Measured: `1988` + // Estimated: `7928` + // Minimum execution time: 244_335_000 picoseconds. + Weight::from_parts(257_741_000, 7928) + .saturating_add(T::DbWeight::get().reads(18_u64)) .saturating_add(T::DbWeight::get().writes(6_u64)) } /// Storage: `SubtensorModule::Alpha` (r:2 w:0) @@ -1403,8 +1405,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `2505` // Estimated: `10920` - // Minimum execution time: 312_000_000 picoseconds. - Weight::from_parts(317_000_000, 10920) + // Minimum execution time: 709_802_000 picoseconds. + Weight::from_parts(733_507_000, 10920) .saturating_add(T::DbWeight::get().reads(47_u64)) .saturating_add(T::DbWeight::get().writes(24_u64)) } @@ -1442,8 +1444,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1300` // Estimated: `4765` - // Minimum execution time: 67_000_000 picoseconds. - Weight::from_parts(67_000_000, 4765) + // Minimum execution time: 145_021_000 picoseconds. + Weight::from_parts(167_262_000, 4765) .saturating_add(T::DbWeight::get().reads(15_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -1483,8 +1485,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1455` // Estimated: `7395` - // Minimum execution time: 45_000_000 picoseconds. - Weight::from_parts(46_000_000, 7395) + // Minimum execution time: 100_648_000 picoseconds. + Weight::from_parts(102_120_000, 7395) .saturating_add(T::DbWeight::get().reads(16_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -1500,8 +1502,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `830` // Estimated: `4295` - // Minimum execution time: 13_000_000 picoseconds. - Weight::from_parts(14_000_000, 4295) + // Minimum execution time: 29_365_000 picoseconds. + Weight::from_parts(29_926_000, 4295) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -1519,8 +1521,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `923` // Estimated: `4388` - // Minimum execution time: 16_000_000 picoseconds. - Weight::from_parts(17_000_000, 4388) + // Minimum execution time: 36_037_000 picoseconds. + Weight::from_parts(37_300_000, 4388) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -1640,8 +1642,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1468` // Estimated: `9883` - // Minimum execution time: 121_000_000 picoseconds. - Weight::from_parts(123_000_000, 9883) + // Minimum execution time: 270_775_000 picoseconds. + Weight::from_parts(280_263_000, 9883) .saturating_add(T::DbWeight::get().reads(39_u64)) .saturating_add(T::DbWeight::get().writes(47_u64)) } @@ -1655,8 +1657,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `684` // Estimated: `4149` - // Minimum execution time: 12_000_000 picoseconds. - Weight::from_parts(13_000_000, 4149) + // Minimum execution time: 30_457_000 picoseconds. + Weight::from_parts(31_398_000, 4149) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -1670,8 +1672,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `889` // Estimated: `6829` - // Minimum execution time: 13_000_000 picoseconds. - Weight::from_parts(14_000_000, 6829) + // Minimum execution time: 31_649_000 picoseconds. + Weight::from_parts(33_061_000, 6829) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -1683,8 +1685,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `595` // Estimated: `4060` - // Minimum execution time: 8_000_000 picoseconds. - Weight::from_parts(8_000_000, 4060) + // Minimum execution time: 18_064_000 picoseconds. + Weight::from_parts(18_675_000, 4060) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -1766,8 +1768,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `3172` // Estimated: `28912` - // Minimum execution time: 529_000_000 picoseconds. - Weight::from_parts(543_000_000, 28912) + // Minimum execution time: 1_221_957_000 picoseconds. + Weight::from_parts(1_230_412_000, 28912) .saturating_add(T::DbWeight::get().reads(182_u64)) .saturating_add(T::DbWeight::get().writes(99_u64)) } @@ -1781,8 +1783,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `818` // Estimated: `4283` - // Minimum execution time: 11_000_000 picoseconds. - Weight::from_parts(11_000_000, 4283) + // Minimum execution time: 24_866_000 picoseconds. + Weight::from_parts(25_508_000, 4283) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -1796,8 +1798,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `774` // Estimated: `9189` - // Minimum execution time: 12_000_000 picoseconds. - Weight::from_parts(13_000_000, 9189) + // Minimum execution time: 26_860_000 picoseconds. + Weight::from_parts(27_522_000, 9189) .saturating_add(T::DbWeight::get().reads(6_u64)) } /// Storage: `SubtensorModule::Owner` (r:1 w:0) @@ -1858,8 +1860,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `2235` // Estimated: `11306` - // Minimum execution time: 296_000_000 picoseconds. - Weight::from_parts(302_000_000, 11306) + // Minimum execution time: 667_584_000 picoseconds. + Weight::from_parts(692_290_000, 11306) .saturating_add(T::DbWeight::get().reads(43_u64)) .saturating_add(T::DbWeight::get().writes(25_u64)) } @@ -1913,8 +1915,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `2176` // Estimated: `10591` - // Minimum execution time: 317_000_000 picoseconds. - Weight::from_parts(323_000_000, 10591) + // Minimum execution time: 722_727_000 picoseconds. + Weight::from_parts(746_281_000, 10591) .saturating_add(T::DbWeight::get().reads(27_u64)) .saturating_add(T::DbWeight::get().writes(13_u64)) } @@ -2053,10 +2055,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1835 + k * (44 ±0)` // Estimated: `10256 + k * (2579 ±0)` - // Minimum execution time: 222_000_000 picoseconds. - Weight::from_parts(135_764_772, 10256) - // Standard Error: 49_814 - .saturating_add(Weight::from_parts(23_501_234, 0).saturating_mul(k.into())) + // Minimum execution time: 480_665_000 picoseconds. + Weight::from_parts(290_059_172, 10256) + // Standard Error: 59_736 + .saturating_add(Weight::from_parts(47_135_675, 0).saturating_mul(k.into())) .saturating_add(T::DbWeight::get().reads(49_u64)) .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(k.into()))) .saturating_add(T::DbWeight::get().writes(53_u64)) @@ -2086,10 +2088,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1501 + k * (53 ±0)` // Estimated: `6148 + k * (2529 ±0)` - // Minimum execution time: 41_000_000 picoseconds. - Weight::from_parts(49_310_804, 6148) - // Standard Error: 5_811 - .saturating_add(Weight::from_parts(865_763, 0).saturating_mul(k.into())) + // Minimum execution time: 126_435_000 picoseconds. + Weight::from_parts(174_697_948, 6148) + // Standard Error: 7_302 + .saturating_add(Weight::from_parts(1_407_793, 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)) @@ -2104,8 +2106,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `659` // Estimated: `9074` - // Minimum execution time: 12_000_000 picoseconds. - Weight::from_parts(12_000_000, 9074) + // Minimum execution time: 27_611_000 picoseconds. + Weight::from_parts(28_353_000, 9074) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -2141,8 +2143,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1248` // Estimated: `4713` - // Minimum execution time: 39_000_000 picoseconds. - Weight::from_parts(40_000_000, 4713) + // Minimum execution time: 84_177_000 picoseconds. + Weight::from_parts(86_050_000, 4713) .saturating_add(T::DbWeight::get().reads(14_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -2158,8 +2160,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `809` // Estimated: `4274` - // Minimum execution time: 14_000_000 picoseconds. - Weight::from_parts(15_000_000, 4274) + // Minimum execution time: 32_651_000 picoseconds. + Weight::from_parts(33_663_000, 4274) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -2175,8 +2177,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `476` // Estimated: `3941` - // Minimum execution time: 8_000_000 picoseconds. - Weight::from_parts(8_000_000, 3941) + // Minimum execution time: 17_693_000 picoseconds. + Weight::from_parts(18_575_000, 3941) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -2204,10 +2206,10 @@ impl WeightInfo for SubstrateWeight { /// Proof: `SubtensorModule::RootClaimableThreshold` (`max_values`: None, `max_size`: None, mode: `Measured`) fn claim_root() -> Weight { // Proof Size summary in bytes: - // Measured: `1935` - // Estimated: `7875` - // Minimum execution time: 59_000_000 picoseconds. - Weight::from_parts(60_000_000, 7875) + // Measured: `1969` + // Estimated: `7909` + // Minimum execution time: 136_795_000 picoseconds. + Weight::from_parts(138_218_000, 7909) .saturating_add(T::DbWeight::get().reads(16_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -2217,8 +2219,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_000_000 picoseconds. - Weight::from_parts(1_000_000, 0) + // Minimum execution time: 2_745_000 picoseconds. + Weight::from_parts(2_945_000, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::RootClaimableThreshold` (r:0 w:1) @@ -2227,8 +2229,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_000_000 picoseconds. - Weight::from_parts(2_000_000, 0) + // Minimum execution time: 5_380_000 picoseconds. + Weight::from_parts(5_931_000, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::Owner` (r:1 w:0) @@ -2241,8 +2243,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `899` // Estimated: `4364` - // Minimum execution time: 11_000_000 picoseconds. - Weight::from_parts(12_000_000, 4364) + // Minimum execution time: 27_391_000 picoseconds. + Weight::from_parts(28_232_000, 4364) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -2314,8 +2316,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `2229` // Estimated: `8727` - // Minimum execution time: 408_000_000 picoseconds. - Weight::from_parts(415_000_000, 8727) + // Minimum execution time: 914_675_000 picoseconds. + Weight::from_parts(941_434_000, 8727) .saturating_add(T::DbWeight::get().reads(33_u64)) .saturating_add(T::DbWeight::get().writes(17_u64)) } @@ -2325,8 +2327,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_000_000 picoseconds. - Weight::from_parts(1_000_000, 0) + // Minimum execution time: 2_745_000 picoseconds. + Weight::from_parts(2_846_000, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::Owner` (r:1 w:0) @@ -2367,8 +2369,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1715` // Estimated: `7655` - // Minimum execution time: 51_000_000 picoseconds. - Weight::from_parts(55_000_000, 7655) + // Minimum execution time: 115_725_000 picoseconds. + Weight::from_parts(117_409_000, 7655) .saturating_add(T::DbWeight::get().reads(17_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -2398,8 +2400,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1399` // Estimated: `7339` - // Minimum execution time: 69_000_000 picoseconds. - Weight::from_parts(174_000_000, 7339) + // Minimum execution time: 148_597_000 picoseconds. + Weight::from_parts(151_101_000, 7339) .saturating_add(T::DbWeight::get().reads(14_u64)) .saturating_add(T::DbWeight::get().writes(6_u64)) } @@ -2413,8 +2415,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `950` // Estimated: `4415` - // Minimum execution time: 268_000_000 picoseconds. - Weight::from_parts(274_000_000, 4415) + // Minimum execution time: 662_675_000 picoseconds. + Weight::from_parts(683_053_000, 4415) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -2434,8 +2436,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `975` // Estimated: `4440` - // Minimum execution time: 22_000_000 picoseconds. - Weight::from_parts(23_000_000, 4440) + // Minimum execution time: 44_473_000 picoseconds. + Weight::from_parts(45_765_000, 4440) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -2459,8 +2461,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `899` // Estimated: `4364` - // Minimum execution time: 18_000_000 picoseconds. - Weight::from_parts(19_000_000, 4364) + // Minimum execution time: 36_959_000 picoseconds. + Weight::from_parts(38_813_000, 4364) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -2484,8 +2486,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `982` // Estimated: `4447` - // Minimum execution time: 19_000_000 picoseconds. - Weight::from_parts(20_000_000, 4447) + // Minimum execution time: 40_996_000 picoseconds. + Weight::from_parts(42_309_000, 4447) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -2497,8 +2499,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `733` // Estimated: `4198` - // Minimum execution time: 8_000_000 picoseconds. - Weight::from_parts(9_000_000, 4198) + // Minimum execution time: 16_692_000 picoseconds. + Weight::from_parts(17_323_000, 4198) .saturating_add(T::DbWeight::get().reads(2_u64)) } /// Storage: `SubtensorModule::SubnetOwnerHotkey` (r:1 w:0) @@ -2525,8 +2527,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1731` // Estimated: `7671` - // Minimum execution time: 25_000_000 picoseconds. - Weight::from_parts(26_000_000, 7671) + // Minimum execution time: 51_526_000 picoseconds. + Weight::from_parts(53_510_000, 7671) .saturating_add(T::DbWeight::get().reads(11_u64)) } /// Storage: `SubtensorModule::CommitRevealWeightsEnabled` (r:1 w:0) @@ -2547,8 +2549,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1019` // Estimated: `4484` - // Minimum execution time: 17_000_000 picoseconds. - Weight::from_parts(18_000_000, 4484) + // Minimum execution time: 34_805_000 picoseconds. + Weight::from_parts(35_406_000, 4484) .saturating_add(T::DbWeight::get().reads(7_u64)) } /// Storage: `SubtensorModule::MinDelegateTake` (r:1 w:0) @@ -2561,8 +2563,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `721` // Estimated: `4186` - // Minimum execution time: 7_000_000 picoseconds. - Weight::from_parts(8_000_000, 4186) + // Minimum execution time: 14_928_000 picoseconds. + Weight::from_parts(15_449_000, 4186) .saturating_add(T::DbWeight::get().reads(3_u64)) } /// Storage: `SubtensorModule::Uids` (r:1 w:0) @@ -2575,8 +2577,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `647` // Estimated: `4112` - // Minimum execution time: 9_000_000 picoseconds. - Weight::from_parts(9_000_000, 4112) + // Minimum execution time: 18_394_000 picoseconds. + Weight::from_parts(18_905_000, 4112) .saturating_add(T::DbWeight::get().reads(3_u64)) } /// Storage: `SubtensorModule::Uids` (r:1 w:0) @@ -2587,8 +2589,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `652` // Estimated: `4117` - // Minimum execution time: 7_000_000 picoseconds. - Weight::from_parts(7_000_000, 4117) + // Minimum execution time: 14_918_000 picoseconds. + Weight::from_parts(15_369_000, 4117) .saturating_add(T::DbWeight::get().reads(2_u64)) } } @@ -2673,8 +2675,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1865` // Estimated: `6148` - // Minimum execution time: 148_000_000 picoseconds. - Weight::from_parts(155_000_000, 6148) + // Minimum execution time: 326_148_000 picoseconds. + Weight::from_parts(330_386_000, 6148) .saturating_add(RocksDbWeight::get().reads(34_u64)) .saturating_add(RocksDbWeight::get().writes(29_u64)) } @@ -2716,8 +2718,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `188820` // Estimated: `10327410` - // Minimum execution time: 6_739_000_000 picoseconds. - Weight::from_parts(6_870_000_000, 10327410) + // Minimum execution time: 14_933_071_000 picoseconds. + Weight::from_parts(15_246_145_000, 10327410) .saturating_add(RocksDbWeight::get().reads(4112_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -2787,8 +2789,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `2226` // Estimated: `8727` - // Minimum execution time: 280_000_000 picoseconds. - Weight::from_parts(284_000_000, 8727) + // Minimum execution time: 627_509_000 picoseconds. + Weight::from_parts(649_871_000, 8727) .saturating_add(RocksDbWeight::get().reads(32_u64)) .saturating_add(RocksDbWeight::get().writes(16_u64)) } @@ -2802,8 +2804,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `713` // Estimated: `4178` - // Minimum execution time: 13_000_000 picoseconds. - Weight::from_parts(16_000_000, 4178) + // Minimum execution time: 30_817_000 picoseconds. + Weight::from_parts(31_769_000, 4178) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -2817,8 +2819,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `812` // Estimated: `4277` - // Minimum execution time: 13_000_000 picoseconds. - Weight::from_parts(16_000_000, 4277) + // Minimum execution time: 28_503_000 picoseconds. + Weight::from_parts(29_475_000, 4277) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -2900,8 +2902,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1798` // Estimated: `6148` - // Minimum execution time: 149_000_000 picoseconds. - Weight::from_parts(154_000_000, 6148) + // Minimum execution time: 327_380_000 picoseconds. + Weight::from_parts(331_367_000, 6148) .saturating_add(RocksDbWeight::get().reads(34_u64)) .saturating_add(RocksDbWeight::get().writes(29_u64)) } @@ -2953,8 +2955,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1516` // Estimated: `4981` - // Minimum execution time: 46_000_000 picoseconds. - Weight::from_parts(47_000_000, 4981) + // Minimum execution time: 101_559_000 picoseconds. + Weight::from_parts(102_911_000, 4981) .saturating_add(RocksDbWeight::get().reads(19_u64)) .saturating_add(RocksDbWeight::get().writes(16_u64)) } @@ -3074,8 +3076,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1532` // Estimated: `9947` - // Minimum execution time: 123_000_000 picoseconds. - Weight::from_parts(125_000_000, 9947) + // Minimum execution time: 270_073_000 picoseconds. + Weight::from_parts(277_638_000, 9947) .saturating_add(RocksDbWeight::get().reads(40_u64)) .saturating_add(RocksDbWeight::get().writes(48_u64)) } @@ -3109,8 +3111,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1249` // Estimated: `4714` - // Minimum execution time: 30_000_000 picoseconds. - Weight::from_parts(31_000_000, 4714) + // Minimum execution time: 67_746_000 picoseconds. + Weight::from_parts(69_860_000, 4714) .saturating_add(RocksDbWeight::get().reads(13_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -3156,8 +3158,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1650` // Estimated: `7590` - // Minimum execution time: 49_000_000 picoseconds. - Weight::from_parts(52_000_000, 7590) + // Minimum execution time: 110_316_000 picoseconds. + Weight::from_parts(111_748_000, 7590) .saturating_add(RocksDbWeight::get().reads(19_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -3167,8 +3169,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_000_000 picoseconds. - Weight::from_parts(2_000_000, 0) + // Minimum execution time: 5_540_000 picoseconds. + Weight::from_parts(5_781_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::Owner` (r:1 w:0) @@ -3189,8 +3191,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1033` // Estimated: `4498` - // Minimum execution time: 23_000_000 picoseconds. - Weight::from_parts(25_000_000, 4498) + // Minimum execution time: 52_037_000 picoseconds. + Weight::from_parts(52_958_000, 4498) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -3206,8 +3208,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `694` // Estimated: `4159` - // Minimum execution time: 22_000_000 picoseconds. - Weight::from_parts(23_000_000, 4159) + // Minimum execution time: 45_806_000 picoseconds. + Weight::from_parts(46_356_000, 4159) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -3245,6 +3247,8 @@ impl WeightInfo for () { /// Proof: `SubtensorModule::MaturityRate` (`max_values`: Some(1), `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::AccountFlags` (r:1 w:0) + /// Proof: `SubtensorModule::AccountFlags` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::DecayingLock` (r:1 w:0) /// Proof: `SubtensorModule::DecayingLock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `System::Account` (r:2 w:2) @@ -3255,9 +3259,9 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `2110` // Estimated: `13000` - // Minimum execution time: 128_000_000 picoseconds. - Weight::from_parts(132_000_000, 13000) - .saturating_add(RocksDbWeight::get().reads(37_u64)) + // Minimum execution time: 282_877_000 picoseconds. + Weight::from_parts(286_614_000, 13000) + .saturating_add(RocksDbWeight::get().reads(38_u64)) .saturating_add(RocksDbWeight::get().writes(15_u64)) } /// Storage: `System::Account` (r:2 w:2) @@ -3296,6 +3300,8 @@ impl WeightInfo for () { /// Proof: `SubtensorModule::MaturityRate` (`max_values`: Some(1), `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::AccountFlags` (r:1 w:0) + /// Proof: `SubtensorModule::AccountFlags` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::DecayingLock` (r:1 w:0) /// Proof: `SubtensorModule::DecayingLock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::ColdkeySwapAnnouncements` (r:0 w:1) @@ -3308,9 +3314,9 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `2166` // Estimated: `13056` - // Minimum execution time: 138_000_000 picoseconds. - Weight::from_parts(144_000_000, 13056) - .saturating_add(RocksDbWeight::get().reads(37_u64)) + // Minimum execution time: 316_098_000 picoseconds. + Weight::from_parts(319_104_000, 13056) + .saturating_add(RocksDbWeight::get().reads(38_u64)) .saturating_add(RocksDbWeight::get().writes(19_u64)) } /// Storage: `SubtensorModule::ColdkeySwapAnnouncements` (r:1 w:0) @@ -3321,8 +3327,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `665` // Estimated: `4130` - // Minimum execution time: 10_000_000 picoseconds. - Weight::from_parts(11_000_000, 4130) + // Minimum execution time: 22_602_000 picoseconds. + Weight::from_parts(23_373_000, 4130) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -3334,8 +3340,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `613` // Estimated: `4078` - // Minimum execution time: 8_000_000 picoseconds. - Weight::from_parts(9_000_000, 4078) + // Minimum execution time: 18_154_000 picoseconds. + Weight::from_parts(18_995_000, 4078) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -3347,8 +3353,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_000_000 picoseconds. - Weight::from_parts(4_000_000, 0) + // Minimum execution time: 8_546_000 picoseconds. + Weight::from_parts(9_107_000, 0) .saturating_add(RocksDbWeight::get().writes(2_u64)) } /// Storage: `SubtensorModule::CommitRevealWeightsEnabled` (r:1 w:0) @@ -3393,8 +3399,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `2155` // Estimated: `8095` - // Minimum execution time: 191_000_000 picoseconds. - Weight::from_parts(197_000_000, 8095) + // Minimum execution time: 409_853_000 picoseconds. + Weight::from_parts(428_318_000, 8095) .saturating_add(RocksDbWeight::get().reads(19_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -3428,8 +3434,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1754` // Estimated: `5219` - // Minimum execution time: 74_000_000 picoseconds. - Weight::from_parts(75_000_000, 5219) + // Minimum execution time: 171_559_000 picoseconds. + Weight::from_parts(173_743_000, 5219) .saturating_add(RocksDbWeight::get().reads(13_u64)) .saturating_add(RocksDbWeight::get().writes(6_u64)) } @@ -3461,8 +3467,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1754` // Estimated: `5219` - // Minimum execution time: 72_000_000 picoseconds. - Weight::from_parts(73_000_000, 5219) + // Minimum execution time: 167_031_000 picoseconds. + Weight::from_parts(169_686_000, 5219) .saturating_add(RocksDbWeight::get().reads(12_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } @@ -3482,8 +3488,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1118` // Estimated: `4583` - // Minimum execution time: 18_000_000 picoseconds. - Weight::from_parts(19_000_000, 4583) + // Minimum execution time: 38_121_000 picoseconds. + Weight::from_parts(38_972_000, 4583) .saturating_add(RocksDbWeight::get().reads(5_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -3553,8 +3559,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `2226` // Estimated: `8727` - // Minimum execution time: 357_000_000 picoseconds. - Weight::from_parts(371_000_000, 8727) + // Minimum execution time: 832_551_000 picoseconds. + Weight::from_parts(851_326_000, 8727) .saturating_add(RocksDbWeight::get().reads(32_u64)) .saturating_add(RocksDbWeight::get().writes(16_u64)) } @@ -3590,8 +3596,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1979` // Estimated: `7919` - // Minimum execution time: 95_000_000 picoseconds. - Weight::from_parts(96_000_000, 7919) + // Minimum execution time: 212_987_000 picoseconds. + Weight::from_parts(217_515_000, 7919) .saturating_add(RocksDbWeight::get().reads(19_u64)) .saturating_add(RocksDbWeight::get().writes(7_u64)) } @@ -3647,8 +3653,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `2142` // Estimated: `10557` - // Minimum execution time: 236_000_000 picoseconds. - Weight::from_parts(238_000_000, 10557) + // Minimum execution time: 529_496_000 picoseconds. + Weight::from_parts(539_615_000, 10557) .saturating_add(RocksDbWeight::get().reads(28_u64)) .saturating_add(RocksDbWeight::get().writes(13_u64)) } @@ -3702,8 +3708,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `2176` // Estimated: `10591` - // Minimum execution time: 308_000_000 picoseconds. - Weight::from_parts(315_000_000, 10591) + // Minimum execution time: 693_783_000 picoseconds. + Weight::from_parts(715_854_000, 10591) .saturating_add(RocksDbWeight::get().reads(27_u64)) .saturating_add(RocksDbWeight::get().writes(13_u64)) } @@ -3775,8 +3781,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `2662` // Estimated: `11077` - // Minimum execution time: 397_000_000 picoseconds. - Weight::from_parts(404_000_000, 11077) + // Minimum execution time: 909_094_000 picoseconds. + Weight::from_parts(916_638_000, 11077) .saturating_add(RocksDbWeight::get().reads(47_u64)) .saturating_add(RocksDbWeight::get().writes(24_u64)) } @@ -3802,8 +3808,6 @@ impl WeightInfo for () { /// 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::AccountFlags` (r:1 w:0) - /// Proof: `SubtensorModule::AccountFlags` (`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:0) @@ -3816,11 +3820,11 @@ impl WeightInfo for () { /// Proof: `SubtensorModule::LastColdkeyHotkeyStakeBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) fn transfer_stake() -> Weight { // Proof Size summary in bytes: - // Measured: `2054` - // Estimated: `7994` - // Minimum execution time: 254_636_000 picoseconds. - Weight::from_parts(258_541_000, 7994) - .saturating_add(RocksDbWeight::get().reads(19_u64)) + // Measured: `1988` + // Estimated: `7928` + // Minimum execution time: 244_335_000 picoseconds. + Weight::from_parts(257_741_000, 7928) + .saturating_add(RocksDbWeight::get().reads(18_u64)) .saturating_add(RocksDbWeight::get().writes(6_u64)) } /// Storage: `SubtensorModule::Alpha` (r:2 w:0) @@ -3891,8 +3895,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `2505` // Estimated: `10920` - // Minimum execution time: 312_000_000 picoseconds. - Weight::from_parts(317_000_000, 10920) + // Minimum execution time: 709_802_000 picoseconds. + Weight::from_parts(733_507_000, 10920) .saturating_add(RocksDbWeight::get().reads(47_u64)) .saturating_add(RocksDbWeight::get().writes(24_u64)) } @@ -3930,8 +3934,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1300` // Estimated: `4765` - // Minimum execution time: 67_000_000 picoseconds. - Weight::from_parts(67_000_000, 4765) + // Minimum execution time: 145_021_000 picoseconds. + Weight::from_parts(167_262_000, 4765) .saturating_add(RocksDbWeight::get().reads(15_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -3971,8 +3975,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1455` // Estimated: `7395` - // Minimum execution time: 45_000_000 picoseconds. - Weight::from_parts(46_000_000, 7395) + // Minimum execution time: 100_648_000 picoseconds. + Weight::from_parts(102_120_000, 7395) .saturating_add(RocksDbWeight::get().reads(16_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -3988,8 +3992,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `830` // Estimated: `4295` - // Minimum execution time: 13_000_000 picoseconds. - Weight::from_parts(14_000_000, 4295) + // Minimum execution time: 29_365_000 picoseconds. + Weight::from_parts(29_926_000, 4295) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -4007,8 +4011,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `923` // Estimated: `4388` - // Minimum execution time: 16_000_000 picoseconds. - Weight::from_parts(17_000_000, 4388) + // Minimum execution time: 36_037_000 picoseconds. + Weight::from_parts(37_300_000, 4388) .saturating_add(RocksDbWeight::get().reads(5_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -4128,8 +4132,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1468` // Estimated: `9883` - // Minimum execution time: 121_000_000 picoseconds. - Weight::from_parts(123_000_000, 9883) + // Minimum execution time: 270_775_000 picoseconds. + Weight::from_parts(280_263_000, 9883) .saturating_add(RocksDbWeight::get().reads(39_u64)) .saturating_add(RocksDbWeight::get().writes(47_u64)) } @@ -4143,8 +4147,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `684` // Estimated: `4149` - // Minimum execution time: 12_000_000 picoseconds. - Weight::from_parts(13_000_000, 4149) + // Minimum execution time: 30_457_000 picoseconds. + Weight::from_parts(31_398_000, 4149) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -4158,8 +4162,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `889` // Estimated: `6829` - // Minimum execution time: 13_000_000 picoseconds. - Weight::from_parts(14_000_000, 6829) + // Minimum execution time: 31_649_000 picoseconds. + Weight::from_parts(33_061_000, 6829) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -4171,8 +4175,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `595` // Estimated: `4060` - // Minimum execution time: 8_000_000 picoseconds. - Weight::from_parts(8_000_000, 4060) + // Minimum execution time: 18_064_000 picoseconds. + Weight::from_parts(18_675_000, 4060) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -4254,8 +4258,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `3172` // Estimated: `28912` - // Minimum execution time: 529_000_000 picoseconds. - Weight::from_parts(543_000_000, 28912) + // Minimum execution time: 1_221_957_000 picoseconds. + Weight::from_parts(1_230_412_000, 28912) .saturating_add(RocksDbWeight::get().reads(182_u64)) .saturating_add(RocksDbWeight::get().writes(99_u64)) } @@ -4269,8 +4273,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `818` // Estimated: `4283` - // Minimum execution time: 11_000_000 picoseconds. - Weight::from_parts(11_000_000, 4283) + // Minimum execution time: 24_866_000 picoseconds. + Weight::from_parts(25_508_000, 4283) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -4284,8 +4288,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `774` // Estimated: `9189` - // Minimum execution time: 12_000_000 picoseconds. - Weight::from_parts(13_000_000, 9189) + // Minimum execution time: 26_860_000 picoseconds. + Weight::from_parts(27_522_000, 9189) .saturating_add(RocksDbWeight::get().reads(6_u64)) } /// Storage: `SubtensorModule::Owner` (r:1 w:0) @@ -4346,8 +4350,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `2235` // Estimated: `11306` - // Minimum execution time: 296_000_000 picoseconds. - Weight::from_parts(302_000_000, 11306) + // Minimum execution time: 667_584_000 picoseconds. + Weight::from_parts(692_290_000, 11306) .saturating_add(RocksDbWeight::get().reads(43_u64)) .saturating_add(RocksDbWeight::get().writes(25_u64)) } @@ -4401,8 +4405,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `2176` // Estimated: `10591` - // Minimum execution time: 317_000_000 picoseconds. - Weight::from_parts(323_000_000, 10591) + // Minimum execution time: 722_727_000 picoseconds. + Weight::from_parts(746_281_000, 10591) .saturating_add(RocksDbWeight::get().reads(27_u64)) .saturating_add(RocksDbWeight::get().writes(13_u64)) } @@ -4541,10 +4545,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1835 + k * (44 ±0)` // Estimated: `10256 + k * (2579 ±0)` - // Minimum execution time: 222_000_000 picoseconds. - Weight::from_parts(135_764_772, 10256) - // Standard Error: 49_814 - .saturating_add(Weight::from_parts(23_501_234, 0).saturating_mul(k.into())) + // Minimum execution time: 480_665_000 picoseconds. + Weight::from_parts(290_059_172, 10256) + // Standard Error: 59_736 + .saturating_add(Weight::from_parts(47_135_675, 0).saturating_mul(k.into())) .saturating_add(RocksDbWeight::get().reads(49_u64)) .saturating_add(RocksDbWeight::get().reads((2_u64).saturating_mul(k.into()))) .saturating_add(RocksDbWeight::get().writes(53_u64)) @@ -4574,10 +4578,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1501 + k * (53 ±0)` // Estimated: `6148 + k * (2529 ±0)` - // Minimum execution time: 41_000_000 picoseconds. - Weight::from_parts(49_310_804, 6148) - // Standard Error: 5_811 - .saturating_add(Weight::from_parts(865_763, 0).saturating_mul(k.into())) + // Minimum execution time: 126_435_000 picoseconds. + Weight::from_parts(174_697_948, 6148) + // Standard Error: 7_302 + .saturating_add(Weight::from_parts(1_407_793, 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)) @@ -4592,8 +4596,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `659` // Estimated: `9074` - // Minimum execution time: 12_000_000 picoseconds. - Weight::from_parts(12_000_000, 9074) + // Minimum execution time: 27_611_000 picoseconds. + Weight::from_parts(28_353_000, 9074) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -4629,8 +4633,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1248` // Estimated: `4713` - // Minimum execution time: 39_000_000 picoseconds. - Weight::from_parts(40_000_000, 4713) + // Minimum execution time: 84_177_000 picoseconds. + Weight::from_parts(86_050_000, 4713) .saturating_add(RocksDbWeight::get().reads(14_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -4646,8 +4650,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `809` // Estimated: `4274` - // Minimum execution time: 14_000_000 picoseconds. - Weight::from_parts(15_000_000, 4274) + // Minimum execution time: 32_651_000 picoseconds. + Weight::from_parts(33_663_000, 4274) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -4663,8 +4667,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `476` // Estimated: `3941` - // Minimum execution time: 8_000_000 picoseconds. - Weight::from_parts(8_000_000, 3941) + // Minimum execution time: 17_693_000 picoseconds. + Weight::from_parts(18_575_000, 3941) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } @@ -4692,10 +4696,10 @@ impl WeightInfo for () { /// Proof: `SubtensorModule::RootClaimableThreshold` (`max_values`: None, `max_size`: None, mode: `Measured`) fn claim_root() -> Weight { // Proof Size summary in bytes: - // Measured: `1935` - // Estimated: `7875` - // Minimum execution time: 59_000_000 picoseconds. - Weight::from_parts(60_000_000, 7875) + // Measured: `1969` + // Estimated: `7909` + // Minimum execution time: 136_795_000 picoseconds. + Weight::from_parts(138_218_000, 7909) .saturating_add(RocksDbWeight::get().reads(16_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } @@ -4705,8 +4709,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_000_000 picoseconds. - Weight::from_parts(1_000_000, 0) + // Minimum execution time: 2_745_000 picoseconds. + Weight::from_parts(2_945_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::RootClaimableThreshold` (r:0 w:1) @@ -4715,8 +4719,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_000_000 picoseconds. - Weight::from_parts(2_000_000, 0) + // Minimum execution time: 5_380_000 picoseconds. + Weight::from_parts(5_931_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::Owner` (r:1 w:0) @@ -4729,8 +4733,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `899` // Estimated: `4364` - // Minimum execution time: 11_000_000 picoseconds. - Weight::from_parts(12_000_000, 4364) + // Minimum execution time: 27_391_000 picoseconds. + Weight::from_parts(28_232_000, 4364) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -4802,8 +4806,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `2229` // Estimated: `8727` - // Minimum execution time: 408_000_000 picoseconds. - Weight::from_parts(415_000_000, 8727) + // Minimum execution time: 914_675_000 picoseconds. + Weight::from_parts(941_434_000, 8727) .saturating_add(RocksDbWeight::get().reads(33_u64)) .saturating_add(RocksDbWeight::get().writes(17_u64)) } @@ -4813,8 +4817,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_000_000 picoseconds. - Weight::from_parts(1_000_000, 0) + // Minimum execution time: 2_745_000 picoseconds. + Weight::from_parts(2_846_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::Owner` (r:1 w:0) @@ -4855,8 +4859,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1715` // Estimated: `7655` - // Minimum execution time: 51_000_000 picoseconds. - Weight::from_parts(55_000_000, 7655) + // Minimum execution time: 115_725_000 picoseconds. + Weight::from_parts(117_409_000, 7655) .saturating_add(RocksDbWeight::get().reads(17_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -4886,8 +4890,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1399` // Estimated: `7339` - // Minimum execution time: 69_000_000 picoseconds. - Weight::from_parts(174_000_000, 7339) + // Minimum execution time: 148_597_000 picoseconds. + Weight::from_parts(151_101_000, 7339) .saturating_add(RocksDbWeight::get().reads(14_u64)) .saturating_add(RocksDbWeight::get().writes(6_u64)) } @@ -4901,8 +4905,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `950` // Estimated: `4415` - // Minimum execution time: 268_000_000 picoseconds. - Weight::from_parts(274_000_000, 4415) + // Minimum execution time: 662_675_000 picoseconds. + Weight::from_parts(683_053_000, 4415) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -4922,8 +4926,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `975` // Estimated: `4440` - // Minimum execution time: 22_000_000 picoseconds. - Weight::from_parts(23_000_000, 4440) + // Minimum execution time: 44_473_000 picoseconds. + Weight::from_parts(45_765_000, 4440) .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -4947,8 +4951,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `899` // Estimated: `4364` - // Minimum execution time: 18_000_000 picoseconds. - Weight::from_parts(19_000_000, 4364) + // Minimum execution time: 36_959_000 picoseconds. + Weight::from_parts(38_813_000, 4364) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -4972,8 +4976,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `982` // Estimated: `4447` - // Minimum execution time: 19_000_000 picoseconds. - Weight::from_parts(20_000_000, 4447) + // Minimum execution time: 40_996_000 picoseconds. + Weight::from_parts(42_309_000, 4447) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -4985,8 +4989,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `733` // Estimated: `4198` - // Minimum execution time: 8_000_000 picoseconds. - Weight::from_parts(9_000_000, 4198) + // Minimum execution time: 16_692_000 picoseconds. + Weight::from_parts(17_323_000, 4198) .saturating_add(RocksDbWeight::get().reads(2_u64)) } /// Storage: `SubtensorModule::SubnetOwnerHotkey` (r:1 w:0) @@ -5013,8 +5017,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1731` // Estimated: `7671` - // Minimum execution time: 25_000_000 picoseconds. - Weight::from_parts(26_000_000, 7671) + // Minimum execution time: 51_526_000 picoseconds. + Weight::from_parts(53_510_000, 7671) .saturating_add(RocksDbWeight::get().reads(11_u64)) } /// Storage: `SubtensorModule::CommitRevealWeightsEnabled` (r:1 w:0) @@ -5035,8 +5039,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1019` // Estimated: `4484` - // Minimum execution time: 17_000_000 picoseconds. - Weight::from_parts(18_000_000, 4484) + // Minimum execution time: 34_805_000 picoseconds. + Weight::from_parts(35_406_000, 4484) .saturating_add(RocksDbWeight::get().reads(7_u64)) } /// Storage: `SubtensorModule::MinDelegateTake` (r:1 w:0) @@ -5049,8 +5053,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `721` // Estimated: `4186` - // Minimum execution time: 7_000_000 picoseconds. - Weight::from_parts(8_000_000, 4186) + // Minimum execution time: 14_928_000 picoseconds. + Weight::from_parts(15_449_000, 4186) .saturating_add(RocksDbWeight::get().reads(3_u64)) } /// Storage: `SubtensorModule::Uids` (r:1 w:0) @@ -5063,8 +5067,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `647` // Estimated: `4112` - // Minimum execution time: 9_000_000 picoseconds. - Weight::from_parts(9_000_000, 4112) + // Minimum execution time: 18_394_000 picoseconds. + Weight::from_parts(18_905_000, 4112) .saturating_add(RocksDbWeight::get().reads(3_u64)) } /// Storage: `SubtensorModule::Uids` (r:1 w:0) @@ -5075,8 +5079,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `652` // Estimated: `4117` - // Minimum execution time: 7_000_000 picoseconds. - Weight::from_parts(7_000_000, 4117) + // Minimum execution time: 14_918_000 picoseconds. + Weight::from_parts(15_369_000, 4117) .saturating_add(RocksDbWeight::get().reads(2_u64)) } } diff --git a/pallets/utility/src/weights.rs b/pallets/utility/src/weights.rs index 4fe14ea89b..d53d9ec80b 100644 --- a/pallets/utility/src/weights.rs +++ b/pallets/utility/src/weights.rs @@ -2,9 +2,9 @@ //! Autogenerated weights for `pallet_subtensor_utility` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 49.1.0 -//! DATE: 2026-06-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2026-06-23, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `runnervm1li68`, CPU: `AMD EPYC 9V74 80-Core Processor` +//! HOSTNAME: `runnervm7b5n9`, CPU: `AMD EPYC 7763 64-Core Processor` //! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: `1024` // Executed Command: @@ -22,7 +22,7 @@ // --no-storage-info // --no-min-squares // --no-median-slopes -// --output=/tmp/tmp.dful3SGU9S +// --output=/tmp/tmp.LQGKoNeRU5 // --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: 3_655_000 picoseconds. - Weight::from_parts(13_879_015, 3983) - // Standard Error: 2_223 - .saturating_add(Weight::from_parts(5_280_856, 0).saturating_mul(c.into())) + // Minimum execution time: 5_099_000 picoseconds. + Weight::from_parts(19_831_182, 3983) + // Standard Error: 1_865 + .saturating_add(Weight::from_parts(5_629_167, 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: 13_380_000 picoseconds. - Weight::from_parts(13_880_000, 3983) + // Minimum execution time: 15_068_000 picoseconds. + Weight::from_parts(15_619_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: 3_825_000 picoseconds. - Weight::from_parts(9_466_022, 3983) - // Standard Error: 1_996 - .saturating_add(Weight::from_parts(5_530_123, 0).saturating_mul(c.into())) + // Minimum execution time: 5_030_000 picoseconds. + Weight::from_parts(16_388_597, 3983) + // Standard Error: 2_018 + .saturating_add(Weight::from_parts(5_828_632, 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: 5_508_000 picoseconds. - Weight::from_parts(5_809_000, 0) + // Minimum execution time: 7_024_000 picoseconds. + Weight::from_parts(7_324_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: 3_736_000 picoseconds. - Weight::from_parts(15_189_579, 3983) - // Standard Error: 1_690 - .saturating_add(Weight::from_parts(5_270_917, 0).saturating_mul(c.into())) + // Minimum execution time: 4_869_000 picoseconds. + Weight::from_parts(11_585_164, 3983) + // Standard Error: 4_216 + .saturating_add(Weight::from_parts(5_647_592, 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: 5_338_000 picoseconds. - Weight::from_parts(5_719_000, 0) + // Minimum execution time: 6_752_000 picoseconds. + Weight::from_parts(7_163_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: 18_498_000 picoseconds. - Weight::from_parts(19_339_000, 3983) + // Minimum execution time: 21_280_000 picoseconds. + Weight::from_parts(21_951_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: 3_655_000 picoseconds. - Weight::from_parts(13_879_015, 3983) - // Standard Error: 2_223 - .saturating_add(Weight::from_parts(5_280_856, 0).saturating_mul(c.into())) + // Minimum execution time: 5_099_000 picoseconds. + Weight::from_parts(19_831_182, 3983) + // Standard Error: 1_865 + .saturating_add(Weight::from_parts(5_629_167, 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: 13_380_000 picoseconds. - Weight::from_parts(13_880_000, 3983) + // Minimum execution time: 15_068_000 picoseconds. + Weight::from_parts(15_619_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: 3_825_000 picoseconds. - Weight::from_parts(9_466_022, 3983) - // Standard Error: 1_996 - .saturating_add(Weight::from_parts(5_530_123, 0).saturating_mul(c.into())) + // Minimum execution time: 5_030_000 picoseconds. + Weight::from_parts(16_388_597, 3983) + // Standard Error: 2_018 + .saturating_add(Weight::from_parts(5_828_632, 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: 5_508_000 picoseconds. - Weight::from_parts(5_809_000, 0) + // Minimum execution time: 7_024_000 picoseconds. + Weight::from_parts(7_324_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: 3_736_000 picoseconds. - Weight::from_parts(15_189_579, 3983) - // Standard Error: 1_690 - .saturating_add(Weight::from_parts(5_270_917, 0).saturating_mul(c.into())) + // Minimum execution time: 4_869_000 picoseconds. + Weight::from_parts(11_585_164, 3983) + // Standard Error: 4_216 + .saturating_add(Weight::from_parts(5_647_592, 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: 5_338_000 picoseconds. - Weight::from_parts(5_719_000, 0) + // Minimum execution time: 6_752_000 picoseconds. + Weight::from_parts(7_163_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: 18_498_000 picoseconds. - Weight::from_parts(19_339_000, 3983) + // Minimum execution time: 21_280_000 picoseconds. + Weight::from_parts(21_951_000, 3983) .saturating_add(RocksDbWeight::get().reads(2_u64)) } } From 5564ef696c7561a3e81502615bbb3f36b911285c Mon Sep 17 00:00:00 2001 From: Greg Zaitsev Date: Tue, 23 Jun 2026 18:56:44 +0300 Subject: [PATCH 13/13] merge devnet-ready --- contract-tests/test/crowdloan.precompile.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contract-tests/test/crowdloan.precompile.test.ts b/contract-tests/test/crowdloan.precompile.test.ts index 2a0655bc63..44420c7f96 100644 --- a/contract-tests/test/crowdloan.precompile.test.ts +++ b/contract-tests/test/crowdloan.precompile.test.ts @@ -101,7 +101,7 @@ describe("Crowdloan precompile E2E balance smoke", () => { assert.ok( Number( contributorBalanceBefore.data.free - contributorBalanceAfter.data.free, - ) < 1_000_000, + ) < 2_000_000, ); const crowdloanContract3 = new ethers.Contract( @@ -198,7 +198,7 @@ describe("Crowdloan precompile E2E balance smoke", () => { convertH160ToSS58(wallet1.address), ); assert.ok( - Number(balanceBefore.data.free - balanceAfter.data.free) < 1_000_000, + Number(balanceBefore.data.free - balanceAfter.data.free) < 2_000_000, ); }); });