diff --git a/pallets/proxy/src/weights.rs b/pallets/proxy/src/weights.rs index 93650912fe..cb235499bf 100644 --- a/pallets/proxy/src/weights.rs +++ b/pallets/proxy/src/weights.rs @@ -2,7 +2,7 @@ //! Autogenerated weights for `pallet_subtensor_proxy` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 49.1.0 -//! DATE: 2026-05-25, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2026-05-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runnervmg397c`, CPU: `AMD EPYC 7763 64-Core Processor` //! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: `1024` @@ -22,7 +22,7 @@ // --no-storage-info // --no-min-squares // --no-median-slopes -// --output=/tmp/tmp.qXOiQkaCNn +// --output=/tmp/tmp.Mq6XZsjjVN // --template=/home/runner/work/subtensor/subtensor/.maintain/frame-weight-template.hbs #![cfg_attr(rustfmt, rustfmt_skip)] @@ -66,10 +66,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `637 + p * (37 ±0)` // Estimated: `4254 + p * (37 ±0)` - // Minimum execution time: 26_600_000 picoseconds. - Weight::from_parts(27_477_037, 4254) - // Standard Error: 3_197 - .saturating_add(Weight::from_parts(80_343, 0).saturating_mul(p.into())) + // Minimum execution time: 26_409_000 picoseconds. + Weight::from_parts(27_497_849, 4254) + // Standard Error: 3_174 + .saturating_add(Weight::from_parts(75_758, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) .saturating_add(Weight::from_parts(0, 37).saturating_mul(p.into())) @@ -92,12 +92,12 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `894 + a * (68 ±0) + p * (37 ±0)` // Estimated: `8615 + a * (68 ±0) + p * (37 ±0)` - // Minimum execution time: 51_786_000 picoseconds. - Weight::from_parts(52_295_376, 8615) - // Standard Error: 1_674 - .saturating_add(Weight::from_parts(216_153, 0).saturating_mul(a.into())) - // Standard Error: 6_704 - .saturating_add(Weight::from_parts(34_685, 0).saturating_mul(p.into())) + // Minimum execution time: 52_398_000 picoseconds. + Weight::from_parts(52_767_607, 8615) + // Standard Error: 1_794 + .saturating_add(Weight::from_parts(211_004, 0).saturating_mul(a.into())) + // Standard Error: 7_187 + .saturating_add(Weight::from_parts(52_109, 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())) @@ -113,10 +113,12 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `299 + a * (68 ±0)` // Estimated: `8615` - // Minimum execution time: 24_796_000 picoseconds. - Weight::from_parts(25_411_516, 8615) - // Standard Error: 1_174 - .saturating_add(Weight::from_parts(204_601, 0).saturating_mul(a.into())) + // Minimum execution time: 25_096_000 picoseconds. + Weight::from_parts(25_762_328, 8615) + // Standard Error: 1_118 + .saturating_add(Weight::from_parts(190_188, 0).saturating_mul(a.into())) + // Standard Error: 4_478 + .saturating_add(Weight::from_parts(8_981, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -130,10 +132,12 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `299 + a * (68 ±0)` // Estimated: `8615` - // Minimum execution time: 25_307_000 picoseconds. - Weight::from_parts(25_315_553, 8615) - // Standard Error: 1_296 - .saturating_add(Weight::from_parts(211_641, 0).saturating_mul(a.into())) + // Minimum execution time: 25_287_000 picoseconds. + Weight::from_parts(25_920_706, 8615) + // Standard Error: 1_389 + .saturating_add(Weight::from_parts(186_592, 0).saturating_mul(a.into())) + // Standard Error: 5_564 + .saturating_add(Weight::from_parts(14_450, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -149,12 +153,12 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `308 + a * (68 ±0) + p * (37 ±0)` // Estimated: `8615` - // Minimum execution time: 32_200_000 picoseconds. - Weight::from_parts(32_309_059, 8615) - // Standard Error: 1_376 - .saturating_add(Weight::from_parts(204_544, 0).saturating_mul(a.into())) - // Standard Error: 5_511 - .saturating_add(Weight::from_parts(50_671, 0).saturating_mul(p.into())) + // Minimum execution time: 32_942_000 picoseconds. + Weight::from_parts(33_610_546, 8615) + // Standard Error: 1_128 + .saturating_add(Weight::from_parts(180_422, 0).saturating_mul(a.into())) + // Standard Error: 4_521 + .saturating_add(Weight::from_parts(53_655, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -165,10 +169,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `119 + p * (37 ±0)` // Estimated: `4254` - // Minimum execution time: 23_754_000 picoseconds. - Weight::from_parts(24_570_196, 4254) - // Standard Error: 2_399 - .saturating_add(Weight::from_parts(76_851, 0).saturating_mul(p.into())) + // Minimum execution time: 24_145_000 picoseconds. + Weight::from_parts(24_922_268, 4254) + // Standard Error: 2_045 + .saturating_add(Weight::from_parts(100_980, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -181,10 +185,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `119 + p * (37 ±0)` // Estimated: `4254` - // Minimum execution time: 25_447_000 picoseconds. - Weight::from_parts(26_347_745, 4254) - // Standard Error: 3_273 - .saturating_add(Weight::from_parts(71_881, 0).saturating_mul(p.into())) + // Minimum execution time: 26_500_000 picoseconds. + Weight::from_parts(27_572_510, 4254) + // Standard Error: 2_610 + .saturating_add(Weight::from_parts(48_169, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -195,10 +199,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `119 + p * (37 ±0)` // Estimated: `4254` - // Minimum execution time: 25_096_000 picoseconds. - Weight::from_parts(26_267_829, 4254) - // Standard Error: 2_981 - .saturating_add(Weight::from_parts(52_495, 0).saturating_mul(p.into())) + // Minimum execution time: 25_837_000 picoseconds. + Weight::from_parts(26_802_905, 4254) + // Standard Error: 2_581 + .saturating_add(Weight::from_parts(36_803, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -209,10 +213,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `139` // Estimated: `4254` - // Minimum execution time: 25_438_000 picoseconds. - Weight::from_parts(26_407_271, 4254) - // Standard Error: 3_133 - .saturating_add(Weight::from_parts(42_843, 0).saturating_mul(p.into())) + // Minimum execution time: 26_008_000 picoseconds. + Weight::from_parts(27_008_198, 4254) + // Standard Error: 2_529 + .saturating_add(Weight::from_parts(24_204, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -223,10 +227,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `156 + p * (37 ±0)` // Estimated: `4254` - // Minimum execution time: 24_515_000 picoseconds. - Weight::from_parts(25_539_027, 4254) - // Standard Error: 2_827 - .saturating_add(Weight::from_parts(25_081, 0).saturating_mul(p.into())) + // Minimum execution time: 25_127_000 picoseconds. + Weight::from_parts(25_979_822, 4254) + // Standard Error: 2_434 + .saturating_add(Weight::from_parts(48_076, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -240,8 +244,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `412` // Estimated: `8615` - // Minimum execution time: 43_011_000 picoseconds. - Weight::from_parts(43_712_000, 8615) + // Minimum execution time: 44_111_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)) } @@ -254,10 +258,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `119 + p * (37 ±0)` // Estimated: `4254` - // Minimum execution time: 13_636_000 picoseconds. - Weight::from_parts(14_306_938, 4254) - // Standard Error: 2_079 - .saturating_add(Weight::from_parts(36_366, 0).saturating_mul(p.into())) + // Minimum execution time: 13_776_000 picoseconds. + Weight::from_parts(14_437_469, 4254) + // Standard Error: 1_697 + .saturating_add(Weight::from_parts(38_918, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -278,10 +282,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `637 + p * (37 ±0)` // Estimated: `4254 + p * (37 ±0)` - // Minimum execution time: 26_600_000 picoseconds. - Weight::from_parts(27_477_037, 4254) - // Standard Error: 3_197 - .saturating_add(Weight::from_parts(80_343, 0).saturating_mul(p.into())) + // Minimum execution time: 26_409_000 picoseconds. + Weight::from_parts(27_497_849, 4254) + // Standard Error: 3_174 + .saturating_add(Weight::from_parts(75_758, 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())) @@ -304,12 +308,12 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `894 + a * (68 ±0) + p * (37 ±0)` // Estimated: `8615 + a * (68 ±0) + p * (37 ±0)` - // Minimum execution time: 51_786_000 picoseconds. - Weight::from_parts(52_295_376, 8615) - // Standard Error: 1_674 - .saturating_add(Weight::from_parts(216_153, 0).saturating_mul(a.into())) - // Standard Error: 6_704 - .saturating_add(Weight::from_parts(34_685, 0).saturating_mul(p.into())) + // Minimum execution time: 52_398_000 picoseconds. + Weight::from_parts(52_767_607, 8615) + // Standard Error: 1_794 + .saturating_add(Weight::from_parts(211_004, 0).saturating_mul(a.into())) + // Standard Error: 7_187 + .saturating_add(Weight::from_parts(52_109, 0).saturating_mul(p.into())) .saturating_add(RocksDbWeight::get().reads(5_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 68).saturating_mul(a.into())) @@ -325,10 +329,12 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `299 + a * (68 ±0)` // Estimated: `8615` - // Minimum execution time: 24_796_000 picoseconds. - Weight::from_parts(25_411_516, 8615) - // Standard Error: 1_174 - .saturating_add(Weight::from_parts(204_601, 0).saturating_mul(a.into())) + // Minimum execution time: 25_096_000 picoseconds. + Weight::from_parts(25_762_328, 8615) + // Standard Error: 1_118 + .saturating_add(Weight::from_parts(190_188, 0).saturating_mul(a.into())) + // Standard Error: 4_478 + .saturating_add(Weight::from_parts(8_981, 0).saturating_mul(p.into())) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -342,10 +348,12 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `299 + a * (68 ±0)` // Estimated: `8615` - // Minimum execution time: 25_307_000 picoseconds. - Weight::from_parts(25_315_553, 8615) - // Standard Error: 1_296 - .saturating_add(Weight::from_parts(211_641, 0).saturating_mul(a.into())) + // Minimum execution time: 25_287_000 picoseconds. + Weight::from_parts(25_920_706, 8615) + // Standard Error: 1_389 + .saturating_add(Weight::from_parts(186_592, 0).saturating_mul(a.into())) + // Standard Error: 5_564 + .saturating_add(Weight::from_parts(14_450, 0).saturating_mul(p.into())) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -361,12 +369,12 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `308 + a * (68 ±0) + p * (37 ±0)` // Estimated: `8615` - // Minimum execution time: 32_200_000 picoseconds. - Weight::from_parts(32_309_059, 8615) - // Standard Error: 1_376 - .saturating_add(Weight::from_parts(204_544, 0).saturating_mul(a.into())) - // Standard Error: 5_511 - .saturating_add(Weight::from_parts(50_671, 0).saturating_mul(p.into())) + // Minimum execution time: 32_942_000 picoseconds. + Weight::from_parts(33_610_546, 8615) + // Standard Error: 1_128 + .saturating_add(Weight::from_parts(180_422, 0).saturating_mul(a.into())) + // Standard Error: 4_521 + .saturating_add(Weight::from_parts(53_655, 0).saturating_mul(p.into())) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -377,10 +385,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `119 + p * (37 ±0)` // Estimated: `4254` - // Minimum execution time: 23_754_000 picoseconds. - Weight::from_parts(24_570_196, 4254) - // Standard Error: 2_399 - .saturating_add(Weight::from_parts(76_851, 0).saturating_mul(p.into())) + // Minimum execution time: 24_145_000 picoseconds. + Weight::from_parts(24_922_268, 4254) + // Standard Error: 2_045 + .saturating_add(Weight::from_parts(100_980, 0).saturating_mul(p.into())) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -393,10 +401,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `119 + p * (37 ±0)` // Estimated: `4254` - // Minimum execution time: 25_447_000 picoseconds. - Weight::from_parts(26_347_745, 4254) - // Standard Error: 3_273 - .saturating_add(Weight::from_parts(71_881, 0).saturating_mul(p.into())) + // Minimum execution time: 26_500_000 picoseconds. + Weight::from_parts(27_572_510, 4254) + // Standard Error: 2_610 + .saturating_add(Weight::from_parts(48_169, 0).saturating_mul(p.into())) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -407,10 +415,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `119 + p * (37 ±0)` // Estimated: `4254` - // Minimum execution time: 25_096_000 picoseconds. - Weight::from_parts(26_267_829, 4254) - // Standard Error: 2_981 - .saturating_add(Weight::from_parts(52_495, 0).saturating_mul(p.into())) + // Minimum execution time: 25_837_000 picoseconds. + Weight::from_parts(26_802_905, 4254) + // Standard Error: 2_581 + .saturating_add(Weight::from_parts(36_803, 0).saturating_mul(p.into())) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -421,10 +429,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `139` // Estimated: `4254` - // Minimum execution time: 25_438_000 picoseconds. - Weight::from_parts(26_407_271, 4254) - // Standard Error: 3_133 - .saturating_add(Weight::from_parts(42_843, 0).saturating_mul(p.into())) + // Minimum execution time: 26_008_000 picoseconds. + Weight::from_parts(27_008_198, 4254) + // Standard Error: 2_529 + .saturating_add(Weight::from_parts(24_204, 0).saturating_mul(p.into())) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -435,10 +443,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `156 + p * (37 ±0)` // Estimated: `4254` - // Minimum execution time: 24_515_000 picoseconds. - Weight::from_parts(25_539_027, 4254) - // Standard Error: 2_827 - .saturating_add(Weight::from_parts(25_081, 0).saturating_mul(p.into())) + // Minimum execution time: 25_127_000 picoseconds. + Weight::from_parts(25_979_822, 4254) + // Standard Error: 2_434 + .saturating_add(Weight::from_parts(48_076, 0).saturating_mul(p.into())) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -452,8 +460,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `412` // Estimated: `8615` - // Minimum execution time: 43_011_000 picoseconds. - Weight::from_parts(43_712_000, 8615) + // Minimum execution time: 44_111_000 picoseconds. + Weight::from_parts(45_074_000, 8615) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -466,10 +474,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `119 + p * (37 ±0)` // Estimated: `4254` - // Minimum execution time: 13_636_000 picoseconds. - Weight::from_parts(14_306_938, 4254) - // Standard Error: 2_079 - .saturating_add(Weight::from_parts(36_366, 0).saturating_mul(p.into())) + // Minimum execution time: 13_776_000 picoseconds. + Weight::from_parts(14_437_469, 4254) + // Standard Error: 1_697 + .saturating_add(Weight::from_parts(38_918, 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/coinbase/run_coinbase.rs b/pallets/subtensor/src/coinbase/run_coinbase.rs index e3e98c7a88..a6c988feea 100644 --- a/pallets/subtensor/src/coinbase/run_coinbase.rs +++ b/pallets/subtensor/src/coinbase/run_coinbase.rs @@ -107,7 +107,9 @@ impl Pallet { if let Ok(buy_swap_result_ok) = buy_swap_result { let bought_alpha: AlphaBalance = buy_swap_result_ok.amount_paid_out.into(); - Self::recycle_subnet_alpha(*netuid_i, bought_alpha); + SubnetProtocolAlpha::::mutate(*netuid_i, |total| { + *total = total.saturating_add(bought_alpha); + }); // Record actual excess TAO that entered pool. let actual_excess: TaoBalance = buy_swap_result_ok.amount_paid_in; diff --git a/pallets/subtensor/src/lib.rs b/pallets/subtensor/src/lib.rs index 934d47e34d..df35cf4f9c 100644 --- a/pallets/subtensor/src/lib.rs +++ b/pallets/subtensor/src/lib.rs @@ -1385,6 +1385,10 @@ pub mod pallet { #[pallet::storage] pub type SubnetAlphaOut = StorageMap<_, Identity, NetUid, AlphaBalance, ValueQuery, DefaultZeroAlpha>; + /// --- MAP ( netuid ) --> protocol_alpha | Returns the protocol-owned alpha cached for the subnet. + #[pallet::storage] + pub type SubnetProtocolAlpha = + StorageMap<_, Identity, NetUid, AlphaBalance, ValueQuery, DefaultZeroAlpha>; /// --- MAP ( cold ) --> Vec | Maps coldkey to hotkeys that stake to it #[pallet::storage] diff --git a/pallets/subtensor/src/staking/remove_stake.rs b/pallets/subtensor/src/staking/remove_stake.rs index f2d07189a4..c3ed9e1b74 100644 --- a/pallets/subtensor/src/staking/remove_stake.rs +++ b/pallets/subtensor/src/staking/remove_stake.rs @@ -473,7 +473,11 @@ impl Pallet { // - track hotkeys to clear pool totals. let mut keys_to_remove: Vec<(T::AccountId, T::AccountId)> = Vec::new(); let mut stakers: Vec<(T::AccountId, T::AccountId, u128)> = Vec::new(); - let mut total_alpha_value_u128: u128 = 0; + let protocol_alpha_value_u128: u128 = SubnetAlphaIn::::get(netuid) + .saturating_add(SubnetProtocolAlpha::::get(netuid)) + .to_u64() as u128; + let mut total_alpha_value_u128: u128 = protocol_alpha_value_u128; + let mut protocol_tao_share = TaoBalance::ZERO; let hotkeys_in_subnet: Vec = TotalHotkeyAlpha::::iter_keys() .filter(|(_, this_netuid)| *this_netuid == netuid) @@ -517,16 +521,18 @@ impl Pallet { // 6) Pro‑rata distribution of the pot by α value (largest‑remainder), // **credited directly to each staker's COLDKEY free balance**. - if pot_u64 > 0 && total_alpha_value_u128 > 0 && !stakers.is_empty() { + if pot_u64 > 0 && total_alpha_value_u128 > 0 { struct Portion { _hot: A, cold: C, + is_protocol: bool, share: u64, // TAO to credit to coldkey balance rem: u128, // remainder for largest‑remainder method } let pot_u128: u128 = pot_u64 as u128; - let mut portions: Vec> = Vec::with_capacity(stakers.len()); + let mut portions: Vec> = + Vec::with_capacity(stakers.len().saturating_add(1)); let mut distributed: u128 = 0; for (hot, cold, alpha_val) in &stakers { @@ -539,6 +545,22 @@ impl Pallet { portions.push(Portion { _hot: hot.clone(), cold: cold.clone(), + is_protocol: false, + share: share_u64, + rem, + }); + } + + if protocol_alpha_value_u128 > 0 { + let prod: u128 = pot_u128.saturating_mul(protocol_alpha_value_u128); + let share_u128: u128 = prod.checked_div(total_alpha_value_u128).unwrap_or_default(); + let share_u64: u64 = share_u128.min(u128::from(u64::MAX)) as u64; + distributed = distributed.saturating_add(u128::from(share_u64)); + let rem: u128 = prod.checked_rem(total_alpha_value_u128).unwrap_or_default(); + portions.push(Portion { + _hot: owner_coldkey.clone(), + cold: owner_coldkey.clone(), + is_protocol: true, share: share_u64, rem, }); @@ -555,7 +577,9 @@ impl Pallet { // Credit each share directly to coldkey free balance. for p in portions { - if p.share > 0 { + if p.is_protocol { + protocol_tao_share = protocol_tao_share.saturating_add(p.share.into()); + } else if p.share > 0 { // Cannot fail the whole transaction if this transfer fails let _ = Self::transfer_tao_from_subnet(netuid, &p.cold, p.share.into()); } @@ -578,6 +602,7 @@ impl Pallet { SubnetAlphaIn::::remove(netuid); SubnetAlphaInProvided::::remove(netuid); SubnetAlphaOut::::remove(netuid); + SubnetProtocolAlpha::::remove(netuid); // Clear the locked balance on the subnet. Self::set_subnet_locked_balance(netuid, TaoBalance::ZERO); @@ -596,7 +621,8 @@ impl Pallet { && let Some(subnet_account) = Self::get_subnet_account_id(netuid) { // Transfer maximum transferrable up to refund to owner - let transferrable = Self::get_coldkey_balance(&subnet_account); + let transferrable = + Self::get_coldkey_balance(&subnet_account).saturating_sub(protocol_tao_share); // We do our best effort to refund owner to as full amount of refund as possible, but // we cannot fail new subnet registration, so the result is ignored. let _ = Self::transfer_tao(&subnet_account, &owner_coldkey, refund.min(transferrable)); diff --git a/pallets/subtensor/src/tests/coinbase.rs b/pallets/subtensor/src/tests/coinbase.rs index b89041c98c..45260ef8fc 100644 --- a/pallets/subtensor/src/tests/coinbase.rs +++ b/pallets/subtensor/src/tests/coinbase.rs @@ -822,6 +822,13 @@ fn test_coinbase_alpha_issuance_with_cap_trigger_and_block_emission() { // Run coinbase SubtensorModule::run_coinbase(emission_credit); + // New behavior: chain-bought alpha is cached instead of recycled. + // The cached amount remains part of outstanding alpha supply. + assert!( + !SubnetProtocolAlpha::::get(netuid1).is_zero() + || !SubnetProtocolAlpha::::get(netuid2).is_zero() + ); + // Get the prices after the run_coinbase let price_1_after = ::SwapInterface::current_alpha_price(netuid1); let price_2_after = ::SwapInterface::current_alpha_price(netuid2); @@ -831,11 +838,13 @@ fn test_coinbase_alpha_issuance_with_cap_trigger_and_block_emission() { assert_eq!( u64::from(SubnetAlphaOut::::get(netuid2)), 21_000_000_000_000_000_u64 + .saturating_add(u64::from(SubnetProtocolAlpha::::get(netuid2))) ); assert!(u64::from(SubnetAlphaIn::::get(netuid2)) < initial_alpha); assert_eq!( u64::from(SubnetAlphaOut::::get(netuid2)), 21_000_000_000_000_000_u64 + .saturating_add(u64::from(SubnetProtocolAlpha::::get(netuid2))) ); assert!(price_1_after > price_1_before); diff --git a/pallets/subtensor/src/tests/networks.rs b/pallets/subtensor/src/tests/networks.rs index d236ea0c8a..2707f2998f 100644 --- a/pallets/subtensor/src/tests/networks.rs +++ b/pallets/subtensor/src/tests/networks.rs @@ -111,6 +111,8 @@ fn dissolve_single_alpha_out_staker_gets_all_tao() { let owner_hot = U256::from(20); let net = add_dynamic_network(&owner_hot, &owner_cold); remove_owner_registration_stake(net); + SubnetAlphaIn::::insert(net, AlphaBalance::ZERO); + SubnetProtocolAlpha::::insert(net, AlphaBalance::ZERO); // 2. Single α-out staker let (s_hot, s_cold) = (U256::from(100), U256::from(200)); @@ -147,6 +149,8 @@ fn dissolve_two_stakers_pro_rata_distribution() { let oh = U256::from(51); let net = add_dynamic_network(&oh, &oc); remove_owner_registration_stake(net); + SubnetAlphaIn::::insert(net, AlphaBalance::ZERO); + SubnetProtocolAlpha::::insert(net, AlphaBalance::ZERO); // Mark this subnet as *legacy* so owner refund path is enabled. let reg_at = NetworkRegisteredAt::::get(net); @@ -367,6 +371,7 @@ fn dissolve_clears_all_per_subnet_storages() { // Items now REMOVED (not zeroed) by dissolution SubnetAlphaIn::::insert(net, AlphaBalance::from(2)); SubnetAlphaOut::::insert(net, AlphaBalance::from(3)); + SubnetProtocolAlpha::::insert(net, AlphaBalance::from(4)); // Prefix / double-map collections Keys::::insert(net, 0u16, owner_hot); @@ -523,6 +528,7 @@ fn dissolve_clears_all_per_subnet_storages() { // These are now REMOVED assert!(!SubnetAlphaIn::::contains_key(net)); assert!(!SubnetAlphaOut::::contains_key(net)); + assert!(!SubnetProtocolAlpha::::contains_key(net)); // Collections fully cleared assert!(Keys::::iter_prefix(net).next().is_none()); @@ -691,6 +697,8 @@ fn dissolve_rounding_remainder_distribution() { let oh = U256::from(62); let net = add_dynamic_network(&oh, &oc); remove_owner_registration_stake(net); + SubnetAlphaIn::::insert(net, AlphaBalance::ZERO); + SubnetProtocolAlpha::::insert(net, AlphaBalance::ZERO); let (s1h, s1c) = (U256::from(63), U256::from(64)); let (s2h, s2c) = (U256::from(65), U256::from(66)); @@ -724,6 +732,40 @@ fn dissolve_rounding_remainder_distribution() { }); } +#[test] +fn dissolve_protocol_alpha_share_is_not_paid_to_users() { + new_test_ext(0).execute_with(|| { + let owner_cold = U256::from(610); + let owner_hot = U256::from(620); + let net = add_dynamic_network(&owner_hot, &owner_cold); + remove_owner_registration_stake(net); + SubtensorModule::set_subnet_locked_balance(net, TaoBalance::ZERO); + + // Protocol owns both alpha-in and cached chain-buy alpha on dereg. + SubnetAlphaIn::::insert(net, AlphaBalance::from(100u64)); + SubnetProtocolAlpha::::insert(net, AlphaBalance::from(50u64)); + + let staker_hot = U256::from(630); + let staker_cold = U256::from(640); + AlphaV2::::insert((staker_hot, staker_cold, net), sf_from_u64(50u64)); + TotalHotkeyAlpha::::insert(staker_hot, net, AlphaBalance::from(50u64)); + + let pot: u64 = 200; + SubnetTAO::::insert(net, TaoBalance::from(pot)); + + let staker_before = SubtensorModule::get_coldkey_balance(&staker_cold); + assert_ok!(SubtensorModule::do_dissolve_network(net)); + + // User gets 50 / (100 alpha-in + 50 cached protocol alpha + 50 user alpha) + // of the TAO pot. The protocol share is withheld from user/owner payout. + assert_eq!( + SubtensorModule::get_coldkey_balance(&staker_cold), + staker_before + 50.into() + ); + assert!(!SubnetProtocolAlpha::::contains_key(net)); + }); +} + #[test] fn destroy_alpha_out_multiple_stakers_pro_rata() { new_test_ext(0).execute_with(|| { @@ -766,6 +808,9 @@ fn destroy_alpha_out_multiple_stakers_pro_rata() { )); // 4. α-out snapshot + + SubnetAlphaIn::::insert(netuid, AlphaBalance::ZERO); + SubnetProtocolAlpha::::insert(netuid, AlphaBalance::ZERO); let a1: u128 = sf_to_u128(&AlphaV2::::get((h1, c1, netuid))); let a2: u128 = sf_to_u128(&AlphaV2::::get((h2, c2, netuid))); let atotal = a1 + a2; @@ -899,6 +944,9 @@ fn destroy_alpha_out_many_stakers_complex_distribution() { let owner_before = SubtensorModule::get_coldkey_balance(&owner_cold); // ── 5) expected τ share per pallet algorithm (incl. remainder) ───── + + SubnetAlphaIn::::insert(netuid, AlphaBalance::ZERO); + SubnetProtocolAlpha::::insert(netuid, AlphaBalance::ZERO); let mut share = [0u64; N]; let mut rem = [0u128; N]; let mut paid: u128 = 0; @@ -1970,6 +2018,11 @@ fn massive_dissolve_refund_and_reregistration_flow_is_lossless_and_cleans_state( // 5) Compute Hamilton-apportionment BASE shares per cold and total leftover // from the **pair-level** pre‑LP α snapshot; also count pairs per cold. // ──────────────────────────────────────────────────────────────────── + for &net in nets.iter() { + SubnetAlphaIn::::insert(net, AlphaBalance::ZERO); + SubnetProtocolAlpha::::insert(net, AlphaBalance::ZERO); + } + let mut base_share_cold: BTreeMap = cold_lps.iter().copied().map(|c| (c, 0_u64)).collect(); let mut pair_count_cold: BTreeMap = diff --git a/pallets/subtensor/src/weights.rs b/pallets/subtensor/src/weights.rs index 5090ea6b90..0b0c66b1f7 100644 --- a/pallets/subtensor/src/weights.rs +++ b/pallets/subtensor/src/weights.rs @@ -2,9 +2,9 @@ //! Autogenerated weights for `pallet_subtensor` //! //! 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-05-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `runnervmg397c`, CPU: `AMD EPYC 7763 64-Core Processor` +//! HOSTNAME: `runnervmeorf1`, 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.lgtaB2SecD +// --output=/tmp/tmp.Ny8nuUXP0L // --template=/home/runner/work/subtensor/subtensor/.maintain/frame-weight-template.hbs #![cfg_attr(rustfmt, rustfmt_skip)] @@ -195,8 +195,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1716` // Estimated: `13600` - // Minimum execution time: 355_373_000 picoseconds. - Weight::from_parts(359_110_000, 13600) + // Minimum execution time: 356_503_000 picoseconds. + Weight::from_parts(360_891_000, 13600) .saturating_add(T::DbWeight::get().reads(48_u64)) .saturating_add(T::DbWeight::get().writes(40_u64)) } @@ -238,8 +238,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `188792` // Estimated: `10327382` - // Minimum execution time: 15_014_102_000 picoseconds. - Weight::from_parts(15_388_200_000, 10327382) + // Minimum execution time: 14_860_332_000 picoseconds. + Weight::from_parts(15_044_960_000, 10327382) .saturating_add(T::DbWeight::get().reads(4112_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -311,9 +311,9 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `2640` // Estimated: `8727` - // Minimum execution time: 438_658_000 picoseconds. - Weight::from_parts(458_155_000, 8727) - .saturating_add(T::DbWeight::get().reads(35_u64)) + // Minimum execution time: 435_552_000 picoseconds. + Weight::from_parts(440_823_000, 8727) + .saturating_add(T::DbWeight::get().reads(33_u64)) .saturating_add(T::DbWeight::get().writes(18_u64)) } /// Storage: `SubtensorModule::IsNetworkMember` (r:2 w:0) @@ -326,8 +326,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `801` // Estimated: `6741` - // Minimum execution time: 33_773_000 picoseconds. - Weight::from_parts(34_705_000, 6741) + // Minimum execution time: 33_503_000 picoseconds. + Weight::from_parts(34_274_000, 6741) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -341,8 +341,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `774` // Estimated: `6714` - // Minimum execution time: 29_576_000 picoseconds. - Weight::from_parts(30_557_000, 6714) + // Minimum execution time: 29_716_000 picoseconds. + Weight::from_parts(30_667_000, 6714) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -444,8 +444,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1649` // Estimated: `13600` - // Minimum execution time: 365_763_000 picoseconds. - Weight::from_parts(368_327_000, 13600) + // Minimum execution time: 351_095_000 picoseconds. + Weight::from_parts(354_461_000, 13600) .saturating_add(T::DbWeight::get().reads(48_u64)) .saturating_add(T::DbWeight::get().writes(40_u64)) } @@ -497,8 +497,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1445` // Estimated: `4910` - // Minimum execution time: 99_325_000 picoseconds. - Weight::from_parts(101_459_000, 4910) + // Minimum execution time: 98_524_000 picoseconds. + Weight::from_parts(100_618_000, 4910) .saturating_add(T::DbWeight::get().reads(19_u64)) .saturating_add(T::DbWeight::get().writes(16_u64)) } @@ -620,8 +620,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1459` // Estimated: `9874` - // Minimum execution time: 264_674_000 picoseconds. - Weight::from_parts(271_215_000, 9874) + // Minimum execution time: 267_429_000 picoseconds. + Weight::from_parts(274_472_000, 9874) .saturating_add(T::DbWeight::get().reads(42_u64)) .saturating_add(T::DbWeight::get().writes(49_u64)) } @@ -649,8 +649,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1071` // Estimated: `4536` - // Minimum execution time: 59_551_000 picoseconds. - Weight::from_parts(60_783_000, 4536) + // Minimum execution time: 58_739_000 picoseconds. + Weight::from_parts(60_563_000, 4536) .saturating_add(T::DbWeight::get().reads(10_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -694,8 +694,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1589` // Estimated: `7529` - // Minimum execution time: 106_459_000 picoseconds. - Weight::from_parts(107_931_000, 7529) + // Minimum execution time: 105_827_000 picoseconds. + Weight::from_parts(107_290_000, 7529) .saturating_add(T::DbWeight::get().reads(18_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -705,8 +705,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_310_000 picoseconds. - Weight::from_parts(5_631_000, 0) + // Minimum execution time: 5_380_000 picoseconds. + Weight::from_parts(5_670_000, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::Owner` (r:1 w:0) @@ -725,11 +725,11 @@ impl WeightInfo for SubstrateWeight { /// Proof: `SubtensorModule::TransactionKeyLastBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) fn set_childkey_take() -> Weight { // Proof Size summary in bytes: - // Measured: `999` - // Estimated: `4464` - // Minimum execution time: 52_067_000 picoseconds. - Weight::from_parts(52_989_000, 4464) - .saturating_add(T::DbWeight::get().reads(7_u64)) + // Measured: `948` + // Estimated: `4413` + // Minimum execution time: 45_024_000 picoseconds. + Weight::from_parts(46_587_000, 4413) + .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } /// Storage: `SubtensorModule::ColdkeySwapAnnouncements` (r:1 w:1) @@ -744,8 +744,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `694` // Estimated: `4159` - // Minimum execution time: 44_454_000 picoseconds. - Weight::from_parts(45_224_000, 4159) + // Minimum execution time: 44_824_000 picoseconds. + Weight::from_parts(45_596_000, 4159) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -785,8 +785,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `2175` // Estimated: `13065` - // Minimum execution time: 262_129_000 picoseconds. - Weight::from_parts(265_496_000, 13065) + // Minimum execution time: 268_210_000 picoseconds. + Weight::from_parts(270_696_000, 13065) .saturating_add(T::DbWeight::get().reads(33_u64)) .saturating_add(T::DbWeight::get().writes(15_u64)) } @@ -830,8 +830,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `2231` // Estimated: `13121` - // Minimum execution time: 286_364_000 picoseconds. - Weight::from_parts(288_679_000, 13121) + // Minimum execution time: 290_712_000 picoseconds. + Weight::from_parts(299_910_000, 13121) .saturating_add(T::DbWeight::get().reads(33_u64)) .saturating_add(T::DbWeight::get().writes(19_u64)) } @@ -843,8 +843,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `665` // Estimated: `4130` - // Minimum execution time: 22_462_000 picoseconds. - Weight::from_parts(23_103_000, 4130) + // Minimum execution time: 22_162_000 picoseconds. + Weight::from_parts(22_903_000, 4130) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -856,8 +856,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `613` // Estimated: `4078` - // Minimum execution time: 18_715_000 picoseconds. - Weight::from_parts(19_206_000, 4078) + // Minimum execution time: 18_444_000 picoseconds. + Weight::from_parts(18_815_000, 4078) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -869,8 +869,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 8_376_000 picoseconds. - Weight::from_parts(8_856_000, 0) + // Minimum execution time: 8_345_000 picoseconds. + Weight::from_parts(8_677_000, 0) .saturating_add(T::DbWeight::get().writes(2_u64)) } /// Storage: `SubtensorModule::CommitRevealWeightsEnabled` (r:1 w:0) @@ -913,8 +913,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `2094` // Estimated: `8034` - // Minimum execution time: 389_868_000 picoseconds. - Weight::from_parts(407_990_000, 8034) + // Minimum execution time: 392_202_000 picoseconds. + Weight::from_parts(397_642_000, 8034) .saturating_add(T::DbWeight::get().reads(18_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -948,8 +948,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1873` // Estimated: `5338` - // Minimum execution time: 163_986_000 picoseconds. - Weight::from_parts(166_641_000, 5338) + // Minimum execution time: 172_963_000 picoseconds. + Weight::from_parts(175_527_000, 5338) .saturating_add(T::DbWeight::get().reads(13_u64)) .saturating_add(T::DbWeight::get().writes(6_u64)) } @@ -981,8 +981,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1873` // Estimated: `5338` - // Minimum execution time: 160_249_000 picoseconds. - Weight::from_parts(163_325_000, 5338) + // Minimum execution time: 168_845_000 picoseconds. + Weight::from_parts(171_861_000, 5338) .saturating_add(T::DbWeight::get().reads(12_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -1002,8 +1002,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1118` // Estimated: `4583` - // Minimum execution time: 38_332_000 picoseconds. - Weight::from_parts(39_093_000, 4583) + // Minimum execution time: 38_081_000 picoseconds. + Weight::from_parts(39_023_000, 4583) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -1075,9 +1075,9 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `2640` // Estimated: `8727` - // Minimum execution time: 473_202_000 picoseconds. - Weight::from_parts(494_572_000, 8727) - .saturating_add(T::DbWeight::get().reads(35_u64)) + // Minimum execution time: 467_993_000 picoseconds. + Weight::from_parts(487_089_000, 8727) + .saturating_add(T::DbWeight::get().reads(33_u64)) .saturating_add(T::DbWeight::get().writes(18_u64)) } /// Storage: `SubtensorModule::Alpha` (r:2 w:0) @@ -1112,8 +1112,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `2027` // Estimated: `7967` - // Minimum execution time: 207_417_000 picoseconds. - Weight::from_parts(209_791_000, 7967) + // Minimum execution time: 208_610_000 picoseconds. + Weight::from_parts(212_657_000, 7967) .saturating_add(T::DbWeight::get().reads(19_u64)) .saturating_add(T::DbWeight::get().writes(7_u64)) } @@ -1179,8 +1179,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `2564` // Estimated: `10979` - // Minimum execution time: 412_629_000 picoseconds. - Weight::from_parts(419_953_000, 10979) + // Minimum execution time: 421_314_000 picoseconds. + Weight::from_parts(441_181_000, 10979) .saturating_add(T::DbWeight::get().reads(35_u64)) .saturating_add(T::DbWeight::get().writes(15_u64)) } @@ -1244,8 +1244,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `2564` // Estimated: `10979` - // Minimum execution time: 445_501_000 picoseconds. - Weight::from_parts(451_852_000, 10979) + // Minimum execution time: 454_816_000 picoseconds. + Weight::from_parts(468_161_000, 10979) .saturating_add(T::DbWeight::get().reads(34_u64)) .saturating_add(T::DbWeight::get().writes(15_u64)) } @@ -1317,11 +1317,11 @@ impl WeightInfo for SubstrateWeight { /// Proof: `SubtensorModule::LastColdkeyHotkeyStakeBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) fn swap_stake_limit() -> Weight { // Proof Size summary in bytes: - // Measured: `3012` - // Estimated: `11427` - // Minimum execution time: 653_168_000 picoseconds. - Weight::from_parts(675_150_000, 11427) - .saturating_add(T::DbWeight::get().reads(51_u64)) + // Measured: `2978` + // Estimated: `11393` + // Minimum execution time: 659_747_000 picoseconds. + Weight::from_parts(683_000_000, 11393) + .saturating_add(T::DbWeight::get().reads(49_u64)) .saturating_add(T::DbWeight::get().writes(26_u64)) } /// Storage: `SubtensorModule::Alpha` (r:2 w:0) @@ -1360,8 +1360,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `2021` // Estimated: `7961` - // Minimum execution time: 236_792_000 picoseconds. - Weight::from_parts(239_797_000, 7961) + // Minimum execution time: 241_118_000 picoseconds. + Weight::from_parts(244_384_000, 7961) .saturating_add(T::DbWeight::get().reads(18_u64)) .saturating_add(T::DbWeight::get().writes(6_u64)) } @@ -1433,11 +1433,11 @@ impl WeightInfo for SubstrateWeight { /// Proof: `SubtensorModule::LastColdkeyHotkeyStakeBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) fn swap_stake() -> Weight { // Proof Size summary in bytes: - // Measured: `2858` - // Estimated: `11273` - // Minimum execution time: 597_504_000 picoseconds. - Weight::from_parts(618_804_000, 11273) - .saturating_add(T::DbWeight::get().reads(51_u64)) + // Measured: `2824` + // Estimated: `11239` + // Minimum execution time: 602_340_000 picoseconds. + Weight::from_parts(625_023_000, 11239) + .saturating_add(T::DbWeight::get().reads(49_u64)) .saturating_add(T::DbWeight::get().writes(26_u64)) } /// Storage: `SubtensorModule::NetworksAdded` (r:1 w:0) @@ -1466,8 +1466,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1122` // Estimated: `4587` - // Minimum execution time: 122_068_000 picoseconds. - Weight::from_parts(124_231_000, 4587) + // Minimum execution time: 127_377_000 picoseconds. + Weight::from_parts(129_371_000, 4587) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -1507,8 +1507,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1426` // Estimated: `7366` - // Minimum execution time: 99_356_000 picoseconds. - Weight::from_parts(101_709_000, 7366) + // Minimum execution time: 98_874_000 picoseconds. + Weight::from_parts(100_026_000, 7366) .saturating_add(T::DbWeight::get().reads(16_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -1524,8 +1524,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `793` // Estimated: `4258` - // Minimum execution time: 28_253_000 picoseconds. - Weight::from_parts(29_094_000, 4258) + // Minimum execution time: 27_601_000 picoseconds. + Weight::from_parts(28_743_000, 4258) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -1543,8 +1543,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `886` // Estimated: `4351` - // Minimum execution time: 35_737_000 picoseconds. - Weight::from_parts(36_198_000, 4351) + // Minimum execution time: 34_584_000 picoseconds. + Weight::from_parts(35_335_000, 4351) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -1666,8 +1666,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1343` // Estimated: `9758` - // Minimum execution time: 262_941_000 picoseconds. - Weight::from_parts(270_434_000, 9758) + // Minimum execution time: 264_562_000 picoseconds. + Weight::from_parts(268_810_000, 9758) .saturating_add(T::DbWeight::get().reads(41_u64)) .saturating_add(T::DbWeight::get().writes(48_u64)) } @@ -1681,8 +1681,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `772` // Estimated: `6712` - // Minimum execution time: 32_971_000 picoseconds. - Weight::from_parts(34_043_000, 6712) + // Minimum execution time: 32_801_000 picoseconds. + Weight::from_parts(33_943_000, 6712) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -1696,8 +1696,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `852` // Estimated: `6792` - // Minimum execution time: 30_457_000 picoseconds. - Weight::from_parts(31_158_000, 6792) + // Minimum execution time: 30_606_000 picoseconds. + Weight::from_parts(31_519_000, 6792) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -1709,8 +1709,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `595` // Estimated: `4060` - // Minimum execution time: 17_673_000 picoseconds. - Weight::from_parts(18_244_000, 4060) + // Minimum execution time: 17_562_000 picoseconds. + Weight::from_parts(18_053_000, 4060) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -1786,9 +1786,9 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `3026` // Estimated: `28766` - // Minimum execution time: 1_114_799_000 picoseconds. - Weight::from_parts(1_123_425_000, 28766) - .saturating_add(T::DbWeight::get().reads(171_u64)) + // Minimum execution time: 1_134_802_000 picoseconds. + Weight::from_parts(1_139_961_000, 28766) + .saturating_add(T::DbWeight::get().reads(166_u64)) .saturating_add(T::DbWeight::get().writes(95_u64)) } /// Storage: `SubtensorModule::Owner` (r:1 w:1) @@ -1801,8 +1801,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `745` // Estimated: `4210` - // Minimum execution time: 23_865_000 picoseconds. - Weight::from_parts(24_475_000, 4210) + // Minimum execution time: 23_493_000 picoseconds. + Weight::from_parts(24_255_000, 4210) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -1816,8 +1816,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `740` // Estimated: `9155` - // Minimum execution time: 26_870_000 picoseconds. - Weight::from_parts(27_361_000, 9155) + // Minimum execution time: 26_449_000 picoseconds. + Weight::from_parts(27_010_000, 9155) .saturating_add(T::DbWeight::get().reads(6_u64)) } /// Storage: `SubtensorModule::Owner` (r:1 w:0) @@ -1888,8 +1888,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `2642` // Estimated: `11306` - // Minimum execution time: 546_189_000 picoseconds. - Weight::from_parts(551_489_000, 11306) + // Minimum execution time: 578_647_000 picoseconds. + Weight::from_parts(583_015_000, 11306) .saturating_add(T::DbWeight::get().reads(50_u64)) .saturating_add(T::DbWeight::get().writes(27_u64)) } @@ -1953,8 +1953,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `2564` // Estimated: `10979` - // Minimum execution time: 467_822_000 picoseconds. - Weight::from_parts(478_552_000, 10979) + // Minimum execution time: 479_833_000 picoseconds. + Weight::from_parts(502_786_000, 10979) .saturating_add(T::DbWeight::get().reads(34_u64)) .saturating_add(T::DbWeight::get().writes(15_u64)) } @@ -2095,10 +2095,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1762 + k * (44 ±0)` // Estimated: `10183 + k * (2579 ±0)` - // Minimum execution time: 460_900_000 picoseconds. - Weight::from_parts(284_422_033, 10183) - // Standard Error: 28_051 - .saturating_add(Weight::from_parts(43_690_535, 0).saturating_mul(k.into())) + // Minimum execution time: 468_231_000 picoseconds. + Weight::from_parts(277_408_614, 10183) + // Standard Error: 26_474 + .saturating_add(Weight::from_parts(44_643_068, 0).saturating_mul(k.into())) .saturating_add(T::DbWeight::get().reads(51_u64)) .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(k.into()))) .saturating_add(T::DbWeight::get().writes(54_u64)) @@ -2128,10 +2128,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1468 + k * (53 ±0)` // Estimated: `6148 + k * (2514 ±0)` - // Minimum execution time: 91_781_000 picoseconds. - Weight::from_parts(72_937_060, 6148) - // Standard Error: 7_499 - .saturating_add(Weight::from_parts(1_672_052, 0).saturating_mul(k.into())) + // Minimum execution time: 124_271_000 picoseconds. + Weight::from_parts(141_164_876, 6148) + // Standard Error: 8_240 + .saturating_add(Weight::from_parts(1_406_147, 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)) @@ -2146,8 +2146,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `659` // Estimated: `9074` - // Minimum execution time: 27_120_000 picoseconds. - Weight::from_parts(28_123_000, 9074) + // Minimum execution time: 26_268_000 picoseconds. + Weight::from_parts(27_521_000, 9074) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -2175,8 +2175,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1070` // Estimated: `4535` - // Minimum execution time: 74_078_000 picoseconds. - Weight::from_parts(74_980_000, 4535) + // Minimum execution time: 71_282_000 picoseconds. + Weight::from_parts(72_975_000, 4535) .saturating_add(T::DbWeight::get().reads(10_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -2192,8 +2192,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `809` // Estimated: `4274` - // Minimum execution time: 33_022_000 picoseconds. - Weight::from_parts(33_913_000, 4274) + // Minimum execution time: 32_099_000 picoseconds. + Weight::from_parts(33_262_000, 4274) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -2209,8 +2209,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `476` // Estimated: `3941` - // Minimum execution time: 17_613_000 picoseconds. - Weight::from_parts(18_094_000, 3941) + // Minimum execution time: 17_313_000 picoseconds. + Weight::from_parts(17_943_000, 3941) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -2240,8 +2240,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1929` // Estimated: `7869` - // Minimum execution time: 134_861_000 picoseconds. - Weight::from_parts(136_855_000, 7869) + // Minimum execution time: 134_200_000 picoseconds. + Weight::from_parts(136_214_000, 7869) .saturating_add(T::DbWeight::get().reads(16_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -2251,8 +2251,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_685_000 picoseconds. - Weight::from_parts(3_006_000, 0) + // Minimum execution time: 2_745_000 picoseconds. + Weight::from_parts(2_856_000, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::RootClaimableThreshold` (r:0 w:1) @@ -2261,8 +2261,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_390_000 picoseconds. - Weight::from_parts(6_001_000, 0) + // Minimum execution time: 5_249_000 picoseconds. + Weight::from_parts(5_751_000, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::Owner` (r:1 w:0) @@ -2275,8 +2275,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `862` // Estimated: `4327` - // Minimum execution time: 26_600_000 picoseconds. - Weight::from_parts(27_432_000, 4327) + // Minimum execution time: 25_768_000 picoseconds. + Weight::from_parts(26_890_000, 4327) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -2350,10 +2350,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `2570` // Estimated: `8727` - // Minimum execution time: 565_736_000 picoseconds. - Weight::from_parts(586_314_000, 8727) - .saturating_add(T::DbWeight::get().reads(36_u64)) - .saturating_add(T::DbWeight::get().writes(18_u64)) + // Minimum execution time: 592_522_000 picoseconds. + Weight::from_parts(612_019_000, 8727) + .saturating_add(T::DbWeight::get().reads(34_u64)) + .saturating_add(T::DbWeight::get().writes(19_u64)) } /// Storage: `SubtensorModule::PendingChildKeyCooldown` (r:0 w:1) /// Proof: `SubtensorModule::PendingChildKeyCooldown` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) @@ -2361,8 +2361,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_735_000 picoseconds. - Weight::from_parts(3_056_000, 0) + // Minimum execution time: 2_815_000 picoseconds. + Weight::from_parts(2_935_000, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::Owner` (r:1 w:0) @@ -2389,11 +2389,11 @@ impl WeightInfo for SubstrateWeight { /// Proof: `SubtensorModule::HotkeyLock` (`max_values`: None, `max_size`: None, mode: `Measured`) fn lock_stake() -> Weight { // Proof Size summary in bytes: - // Measured: `1651` - // Estimated: `5116` - // Minimum execution time: 95_959_000 picoseconds. - Weight::from_parts(98_204_000, 5116) - .saturating_add(T::DbWeight::get().reads(11_u64)) + // Measured: `1463` + // Estimated: `4928` + // Minimum execution time: 90_288_000 picoseconds. + Weight::from_parts(91_720_000, 4928) + .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } /// Storage: `SubtensorModule::Owner` (r:2 w:0) @@ -2406,17 +2406,32 @@ impl WeightInfo for SubstrateWeight { /// Proof: `SubtensorModule::DecayingLock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::UnlockRate` (r:1 w:0) /// Proof: `SubtensorModule::UnlockRate` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::HotkeyLock` (r:1 w:1) + /// Proof: `SubtensorModule::HotkeyLock` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn unlock_stake() -> Weight { + // Proof Size summary in bytes: + // Measured: `978` + // Estimated: `6918` + // Minimum execution time: 70_882_000 picoseconds. + Weight::from_parts(71_814_000, 6918) + .saturating_add(T::DbWeight::get().reads(5_u64)) + .saturating_add(T::DbWeight::get().writes(2_u64)) + } + /// Storage: `SubtensorModule::Lock` (r:2 w:2) + /// Proof: `SubtensorModule::Lock` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::Owner` (r:2 w:0) + /// Proof: `SubtensorModule::Owner` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::MaturityRate` (r:1 w:0) /// Proof: `SubtensorModule::MaturityRate` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::HotkeyLock` (r:2 w:2) /// Proof: `SubtensorModule::HotkeyLock` (`max_values`: None, `max_size`: None, mode: `Measured`) fn move_lock() -> Weight { // Proof Size summary in bytes: - // Measured: `1366` - // Estimated: `7306` - // Minimum execution time: 109_825_000 picoseconds. - Weight::from_parts(111_929_000, 7306) - .saturating_add(T::DbWeight::get().reads(10_u64)) + // Measured: `1302` + // Estimated: `7242` + // Minimum execution time: 92_212_000 picoseconds. + Weight::from_parts(93_754_000, 7242) + .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } } @@ -2521,8 +2536,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1716` // Estimated: `13600` - // Minimum execution time: 355_373_000 picoseconds. - Weight::from_parts(359_110_000, 13600) + // Minimum execution time: 356_503_000 picoseconds. + Weight::from_parts(360_891_000, 13600) .saturating_add(RocksDbWeight::get().reads(48_u64)) .saturating_add(RocksDbWeight::get().writes(40_u64)) } @@ -2564,8 +2579,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `188792` // Estimated: `10327382` - // Minimum execution time: 15_014_102_000 picoseconds. - Weight::from_parts(15_388_200_000, 10327382) + // Minimum execution time: 14_860_332_000 picoseconds. + Weight::from_parts(15_044_960_000, 10327382) .saturating_add(RocksDbWeight::get().reads(4112_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -2637,9 +2652,9 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `2640` // Estimated: `8727` - // Minimum execution time: 438_658_000 picoseconds. - Weight::from_parts(458_155_000, 8727) - .saturating_add(RocksDbWeight::get().reads(35_u64)) + // Minimum execution time: 435_552_000 picoseconds. + Weight::from_parts(440_823_000, 8727) + .saturating_add(RocksDbWeight::get().reads(33_u64)) .saturating_add(RocksDbWeight::get().writes(18_u64)) } /// Storage: `SubtensorModule::IsNetworkMember` (r:2 w:0) @@ -2652,8 +2667,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `801` // Estimated: `6741` - // Minimum execution time: 33_773_000 picoseconds. - Weight::from_parts(34_705_000, 6741) + // Minimum execution time: 33_503_000 picoseconds. + Weight::from_parts(34_274_000, 6741) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -2667,8 +2682,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `774` // Estimated: `6714` - // Minimum execution time: 29_576_000 picoseconds. - Weight::from_parts(30_557_000, 6714) + // Minimum execution time: 29_716_000 picoseconds. + Weight::from_parts(30_667_000, 6714) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -2770,8 +2785,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1649` // Estimated: `13600` - // Minimum execution time: 365_763_000 picoseconds. - Weight::from_parts(368_327_000, 13600) + // Minimum execution time: 351_095_000 picoseconds. + Weight::from_parts(354_461_000, 13600) .saturating_add(RocksDbWeight::get().reads(48_u64)) .saturating_add(RocksDbWeight::get().writes(40_u64)) } @@ -2823,8 +2838,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1445` // Estimated: `4910` - // Minimum execution time: 99_325_000 picoseconds. - Weight::from_parts(101_459_000, 4910) + // Minimum execution time: 98_524_000 picoseconds. + Weight::from_parts(100_618_000, 4910) .saturating_add(RocksDbWeight::get().reads(19_u64)) .saturating_add(RocksDbWeight::get().writes(16_u64)) } @@ -2946,8 +2961,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1459` // Estimated: `9874` - // Minimum execution time: 264_674_000 picoseconds. - Weight::from_parts(271_215_000, 9874) + // Minimum execution time: 267_429_000 picoseconds. + Weight::from_parts(274_472_000, 9874) .saturating_add(RocksDbWeight::get().reads(42_u64)) .saturating_add(RocksDbWeight::get().writes(49_u64)) } @@ -2975,8 +2990,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1071` // Estimated: `4536` - // Minimum execution time: 59_551_000 picoseconds. - Weight::from_parts(60_783_000, 4536) + // Minimum execution time: 58_739_000 picoseconds. + Weight::from_parts(60_563_000, 4536) .saturating_add(RocksDbWeight::get().reads(10_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -3020,8 +3035,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1589` // Estimated: `7529` - // Minimum execution time: 106_459_000 picoseconds. - Weight::from_parts(107_931_000, 7529) + // Minimum execution time: 105_827_000 picoseconds. + Weight::from_parts(107_290_000, 7529) .saturating_add(RocksDbWeight::get().reads(18_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -3031,8 +3046,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_310_000 picoseconds. - Weight::from_parts(5_631_000, 0) + // Minimum execution time: 5_380_000 picoseconds. + Weight::from_parts(5_670_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::Owner` (r:1 w:0) @@ -3051,11 +3066,11 @@ impl WeightInfo for () { /// Proof: `SubtensorModule::TransactionKeyLastBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) fn set_childkey_take() -> Weight { // Proof Size summary in bytes: - // Measured: `999` - // Estimated: `4464` - // Minimum execution time: 52_067_000 picoseconds. - Weight::from_parts(52_989_000, 4464) - .saturating_add(RocksDbWeight::get().reads(7_u64)) + // Measured: `948` + // Estimated: `4413` + // Minimum execution time: 45_024_000 picoseconds. + Weight::from_parts(46_587_000, 4413) + .saturating_add(RocksDbWeight::get().reads(5_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } /// Storage: `SubtensorModule::ColdkeySwapAnnouncements` (r:1 w:1) @@ -3070,8 +3085,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `694` // Estimated: `4159` - // Minimum execution time: 44_454_000 picoseconds. - Weight::from_parts(45_224_000, 4159) + // Minimum execution time: 44_824_000 picoseconds. + Weight::from_parts(45_596_000, 4159) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -3111,8 +3126,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `2175` // Estimated: `13065` - // Minimum execution time: 262_129_000 picoseconds. - Weight::from_parts(265_496_000, 13065) + // Minimum execution time: 268_210_000 picoseconds. + Weight::from_parts(270_696_000, 13065) .saturating_add(RocksDbWeight::get().reads(33_u64)) .saturating_add(RocksDbWeight::get().writes(15_u64)) } @@ -3156,8 +3171,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `2231` // Estimated: `13121` - // Minimum execution time: 286_364_000 picoseconds. - Weight::from_parts(288_679_000, 13121) + // Minimum execution time: 290_712_000 picoseconds. + Weight::from_parts(299_910_000, 13121) .saturating_add(RocksDbWeight::get().reads(33_u64)) .saturating_add(RocksDbWeight::get().writes(19_u64)) } @@ -3169,8 +3184,13 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `665` // Estimated: `4130` +<<<<<<< chain-buy-cache + // Minimum execution time: 22_162_000 picoseconds. + Weight::from_parts(22_903_000, 4130) +======= // Minimum execution time: 22_462_000 picoseconds. Weight::from_parts(23_103_000, 4130) +>>>>>>> devnet-ready .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -3182,8 +3202,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `613` // Estimated: `4078` - // Minimum execution time: 18_715_000 picoseconds. - Weight::from_parts(19_206_000, 4078) + // Minimum execution time: 18_444_000 picoseconds. + Weight::from_parts(18_815_000, 4078) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -3195,8 +3215,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 8_376_000 picoseconds. - Weight::from_parts(8_856_000, 0) + // Minimum execution time: 8_345_000 picoseconds. + Weight::from_parts(8_677_000, 0) .saturating_add(RocksDbWeight::get().writes(2_u64)) } /// Storage: `SubtensorModule::CommitRevealWeightsEnabled` (r:1 w:0) @@ -3239,8 +3259,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `2094` // Estimated: `8034` - // Minimum execution time: 389_868_000 picoseconds. - Weight::from_parts(407_990_000, 8034) + // Minimum execution time: 392_202_000 picoseconds. + Weight::from_parts(397_642_000, 8034) .saturating_add(RocksDbWeight::get().reads(18_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -3274,8 +3294,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1873` // Estimated: `5338` - // Minimum execution time: 163_986_000 picoseconds. - Weight::from_parts(166_641_000, 5338) + // Minimum execution time: 172_963_000 picoseconds. + Weight::from_parts(175_527_000, 5338) .saturating_add(RocksDbWeight::get().reads(13_u64)) .saturating_add(RocksDbWeight::get().writes(6_u64)) } @@ -3307,8 +3327,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1873` // Estimated: `5338` - // Minimum execution time: 160_249_000 picoseconds. - Weight::from_parts(163_325_000, 5338) + // Minimum execution time: 168_845_000 picoseconds. + Weight::from_parts(171_861_000, 5338) .saturating_add(RocksDbWeight::get().reads(12_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } @@ -3328,8 +3348,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1118` // Estimated: `4583` - // Minimum execution time: 38_332_000 picoseconds. - Weight::from_parts(39_093_000, 4583) + // Minimum execution time: 38_081_000 picoseconds. + Weight::from_parts(39_023_000, 4583) .saturating_add(RocksDbWeight::get().reads(5_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -3401,9 +3421,9 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `2640` // Estimated: `8727` - // Minimum execution time: 473_202_000 picoseconds. - Weight::from_parts(494_572_000, 8727) - .saturating_add(RocksDbWeight::get().reads(35_u64)) + // Minimum execution time: 467_993_000 picoseconds. + Weight::from_parts(487_089_000, 8727) + .saturating_add(RocksDbWeight::get().reads(33_u64)) .saturating_add(RocksDbWeight::get().writes(18_u64)) } /// Storage: `SubtensorModule::Alpha` (r:2 w:0) @@ -3438,8 +3458,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `2027` // Estimated: `7967` - // Minimum execution time: 207_417_000 picoseconds. - Weight::from_parts(209_791_000, 7967) + // Minimum execution time: 208_610_000 picoseconds. + Weight::from_parts(212_657_000, 7967) .saturating_add(RocksDbWeight::get().reads(19_u64)) .saturating_add(RocksDbWeight::get().writes(7_u64)) } @@ -3505,8 +3525,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `2564` // Estimated: `10979` - // Minimum execution time: 412_629_000 picoseconds. - Weight::from_parts(419_953_000, 10979) + // Minimum execution time: 421_314_000 picoseconds. + Weight::from_parts(441_181_000, 10979) .saturating_add(RocksDbWeight::get().reads(35_u64)) .saturating_add(RocksDbWeight::get().writes(15_u64)) } @@ -3570,8 +3590,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `2564` // Estimated: `10979` - // Minimum execution time: 445_501_000 picoseconds. - Weight::from_parts(451_852_000, 10979) + // Minimum execution time: 454_816_000 picoseconds. + Weight::from_parts(468_161_000, 10979) .saturating_add(RocksDbWeight::get().reads(34_u64)) .saturating_add(RocksDbWeight::get().writes(15_u64)) } @@ -3643,11 +3663,11 @@ impl WeightInfo for () { /// Proof: `SubtensorModule::LastColdkeyHotkeyStakeBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) fn swap_stake_limit() -> Weight { // Proof Size summary in bytes: - // Measured: `3012` - // Estimated: `11427` - // Minimum execution time: 653_168_000 picoseconds. - Weight::from_parts(675_150_000, 11427) - .saturating_add(RocksDbWeight::get().reads(51_u64)) + // Measured: `2978` + // Estimated: `11393` + // Minimum execution time: 659_747_000 picoseconds. + Weight::from_parts(683_000_000, 11393) + .saturating_add(RocksDbWeight::get().reads(49_u64)) .saturating_add(RocksDbWeight::get().writes(26_u64)) } /// Storage: `SubtensorModule::Alpha` (r:2 w:0) @@ -3686,8 +3706,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `2021` // Estimated: `7961` - // Minimum execution time: 236_792_000 picoseconds. - Weight::from_parts(239_797_000, 7961) + // Minimum execution time: 241_118_000 picoseconds. + Weight::from_parts(244_384_000, 7961) .saturating_add(RocksDbWeight::get().reads(18_u64)) .saturating_add(RocksDbWeight::get().writes(6_u64)) } @@ -3759,11 +3779,11 @@ impl WeightInfo for () { /// Proof: `SubtensorModule::LastColdkeyHotkeyStakeBlock` (`max_values`: None, `max_size`: None, mode: `Measured`) fn swap_stake() -> Weight { // Proof Size summary in bytes: - // Measured: `2858` - // Estimated: `11273` - // Minimum execution time: 597_504_000 picoseconds. - Weight::from_parts(618_804_000, 11273) - .saturating_add(RocksDbWeight::get().reads(51_u64)) + // Measured: `2824` + // Estimated: `11239` + // Minimum execution time: 602_340_000 picoseconds. + Weight::from_parts(625_023_000, 11239) + .saturating_add(RocksDbWeight::get().reads(49_u64)) .saturating_add(RocksDbWeight::get().writes(26_u64)) } /// Storage: `SubtensorModule::NetworksAdded` (r:1 w:0) @@ -3792,8 +3812,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1122` // Estimated: `4587` - // Minimum execution time: 122_068_000 picoseconds. - Weight::from_parts(124_231_000, 4587) + // Minimum execution time: 127_377_000 picoseconds. + Weight::from_parts(129_371_000, 4587) .saturating_add(RocksDbWeight::get().reads(11_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -3833,8 +3853,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1426` // Estimated: `7366` - // Minimum execution time: 99_356_000 picoseconds. - Weight::from_parts(101_709_000, 7366) + // Minimum execution time: 98_874_000 picoseconds. + Weight::from_parts(100_026_000, 7366) .saturating_add(RocksDbWeight::get().reads(16_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -3850,8 +3870,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `793` // Estimated: `4258` - // Minimum execution time: 28_253_000 picoseconds. - Weight::from_parts(29_094_000, 4258) + // Minimum execution time: 27_601_000 picoseconds. + Weight::from_parts(28_743_000, 4258) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -3869,8 +3889,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `886` // Estimated: `4351` - // Minimum execution time: 35_737_000 picoseconds. - Weight::from_parts(36_198_000, 4351) + // Minimum execution time: 34_584_000 picoseconds. + Weight::from_parts(35_335_000, 4351) .saturating_add(RocksDbWeight::get().reads(5_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -3992,8 +4012,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1343` // Estimated: `9758` - // Minimum execution time: 262_941_000 picoseconds. - Weight::from_parts(270_434_000, 9758) + // Minimum execution time: 264_562_000 picoseconds. + Weight::from_parts(268_810_000, 9758) .saturating_add(RocksDbWeight::get().reads(41_u64)) .saturating_add(RocksDbWeight::get().writes(48_u64)) } @@ -4007,8 +4027,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `772` // Estimated: `6712` - // Minimum execution time: 32_971_000 picoseconds. - Weight::from_parts(34_043_000, 6712) + // Minimum execution time: 32_801_000 picoseconds. + Weight::from_parts(33_943_000, 6712) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -4022,8 +4042,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `852` // Estimated: `6792` - // Minimum execution time: 30_457_000 picoseconds. - Weight::from_parts(31_158_000, 6792) + // Minimum execution time: 30_606_000 picoseconds. + Weight::from_parts(31_519_000, 6792) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -4035,8 +4055,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `595` // Estimated: `4060` - // Minimum execution time: 17_673_000 picoseconds. - Weight::from_parts(18_244_000, 4060) + // Minimum execution time: 17_562_000 picoseconds. + Weight::from_parts(18_053_000, 4060) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -4112,9 +4132,9 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `3026` // Estimated: `28766` - // Minimum execution time: 1_114_799_000 picoseconds. - Weight::from_parts(1_123_425_000, 28766) - .saturating_add(RocksDbWeight::get().reads(171_u64)) + // Minimum execution time: 1_134_802_000 picoseconds. + Weight::from_parts(1_139_961_000, 28766) + .saturating_add(RocksDbWeight::get().reads(166_u64)) .saturating_add(RocksDbWeight::get().writes(95_u64)) } /// Storage: `SubtensorModule::Owner` (r:1 w:1) @@ -4127,8 +4147,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `745` // Estimated: `4210` - // Minimum execution time: 23_865_000 picoseconds. - Weight::from_parts(24_475_000, 4210) + // Minimum execution time: 23_493_000 picoseconds. + Weight::from_parts(24_255_000, 4210) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -4142,8 +4162,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `740` // Estimated: `9155` - // Minimum execution time: 26_870_000 picoseconds. - Weight::from_parts(27_361_000, 9155) + // Minimum execution time: 26_449_000 picoseconds. + Weight::from_parts(27_010_000, 9155) .saturating_add(RocksDbWeight::get().reads(6_u64)) } /// Storage: `SubtensorModule::Owner` (r:1 w:0) @@ -4214,8 +4234,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `2642` // Estimated: `11306` - // Minimum execution time: 546_189_000 picoseconds. - Weight::from_parts(551_489_000, 11306) + // Minimum execution time: 578_647_000 picoseconds. + Weight::from_parts(583_015_000, 11306) .saturating_add(RocksDbWeight::get().reads(50_u64)) .saturating_add(RocksDbWeight::get().writes(27_u64)) } @@ -4279,8 +4299,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `2564` // Estimated: `10979` - // Minimum execution time: 467_822_000 picoseconds. - Weight::from_parts(478_552_000, 10979) + // Minimum execution time: 479_833_000 picoseconds. + Weight::from_parts(502_786_000, 10979) .saturating_add(RocksDbWeight::get().reads(34_u64)) .saturating_add(RocksDbWeight::get().writes(15_u64)) } @@ -4421,10 +4441,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1762 + k * (44 ±0)` // Estimated: `10183 + k * (2579 ±0)` - // Minimum execution time: 460_900_000 picoseconds. - Weight::from_parts(284_422_033, 10183) - // Standard Error: 28_051 - .saturating_add(Weight::from_parts(43_690_535, 0).saturating_mul(k.into())) + // Minimum execution time: 468_231_000 picoseconds. + Weight::from_parts(277_408_614, 10183) + // Standard Error: 26_474 + .saturating_add(Weight::from_parts(44_643_068, 0).saturating_mul(k.into())) .saturating_add(RocksDbWeight::get().reads(51_u64)) .saturating_add(RocksDbWeight::get().reads((2_u64).saturating_mul(k.into()))) .saturating_add(RocksDbWeight::get().writes(54_u64)) @@ -4454,10 +4474,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1468 + k * (53 ±0)` // Estimated: `6148 + k * (2514 ±0)` - // Minimum execution time: 91_781_000 picoseconds. - Weight::from_parts(72_937_060, 6148) - // Standard Error: 7_499 - .saturating_add(Weight::from_parts(1_672_052, 0).saturating_mul(k.into())) + // Minimum execution time: 124_271_000 picoseconds. + Weight::from_parts(141_164_876, 6148) + // Standard Error: 8_240 + .saturating_add(Weight::from_parts(1_406_147, 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)) @@ -4472,8 +4492,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `659` // Estimated: `9074` - // Minimum execution time: 27_120_000 picoseconds. - Weight::from_parts(28_123_000, 9074) + // Minimum execution time: 26_268_000 picoseconds. + Weight::from_parts(27_521_000, 9074) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -4501,8 +4521,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1070` // Estimated: `4535` - // Minimum execution time: 74_078_000 picoseconds. - Weight::from_parts(74_980_000, 4535) + // Minimum execution time: 71_282_000 picoseconds. + Weight::from_parts(72_975_000, 4535) .saturating_add(RocksDbWeight::get().reads(10_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -4518,8 +4538,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `809` // Estimated: `4274` - // Minimum execution time: 33_022_000 picoseconds. - Weight::from_parts(33_913_000, 4274) + // Minimum execution time: 32_099_000 picoseconds. + Weight::from_parts(33_262_000, 4274) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -4535,8 +4555,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `476` // Estimated: `3941` - // Minimum execution time: 17_613_000 picoseconds. - Weight::from_parts(18_094_000, 3941) + // Minimum execution time: 17_313_000 picoseconds. + Weight::from_parts(17_943_000, 3941) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } @@ -4566,8 +4586,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1929` // Estimated: `7869` - // Minimum execution time: 134_861_000 picoseconds. - Weight::from_parts(136_855_000, 7869) + // Minimum execution time: 134_200_000 picoseconds. + Weight::from_parts(136_214_000, 7869) .saturating_add(RocksDbWeight::get().reads(16_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } @@ -4577,8 +4597,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_685_000 picoseconds. - Weight::from_parts(3_006_000, 0) + // Minimum execution time: 2_745_000 picoseconds. + Weight::from_parts(2_856_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::RootClaimableThreshold` (r:0 w:1) @@ -4587,8 +4607,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_390_000 picoseconds. - Weight::from_parts(6_001_000, 0) + // Minimum execution time: 5_249_000 picoseconds. + Weight::from_parts(5_751_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::Owner` (r:1 w:0) @@ -4601,8 +4621,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `862` // Estimated: `4327` - // Minimum execution time: 26_600_000 picoseconds. - Weight::from_parts(27_432_000, 4327) + // Minimum execution time: 25_768_000 picoseconds. + Weight::from_parts(26_890_000, 4327) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -4676,10 +4696,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `2570` // Estimated: `8727` - // Minimum execution time: 565_736_000 picoseconds. - Weight::from_parts(586_314_000, 8727) - .saturating_add(RocksDbWeight::get().reads(36_u64)) - .saturating_add(RocksDbWeight::get().writes(18_u64)) + // Minimum execution time: 592_522_000 picoseconds. + Weight::from_parts(612_019_000, 8727) + .saturating_add(RocksDbWeight::get().reads(34_u64)) + .saturating_add(RocksDbWeight::get().writes(19_u64)) } /// Storage: `SubtensorModule::PendingChildKeyCooldown` (r:0 w:1) /// Proof: `SubtensorModule::PendingChildKeyCooldown` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) @@ -4687,8 +4707,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_735_000 picoseconds. - Weight::from_parts(3_056_000, 0) + // Minimum execution time: 2_815_000 picoseconds. + Weight::from_parts(2_935_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::Owner` (r:1 w:0) @@ -4715,11 +4735,11 @@ impl WeightInfo for () { /// Proof: `SubtensorModule::HotkeyLock` (`max_values`: None, `max_size`: None, mode: `Measured`) fn lock_stake() -> Weight { // Proof Size summary in bytes: - // Measured: `1651` - // Estimated: `5116` - // Minimum execution time: 95_959_000 picoseconds. - Weight::from_parts(98_204_000, 5116) - .saturating_add(RocksDbWeight::get().reads(11_u64)) + // Measured: `1463` + // Estimated: `4928` + // Minimum execution time: 90_288_000 picoseconds. + Weight::from_parts(91_720_000, 4928) + .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } /// Storage: `SubtensorModule::Owner` (r:2 w:0) @@ -4732,17 +4752,32 @@ impl WeightInfo for () { /// Proof: `SubtensorModule::DecayingLock` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::UnlockRate` (r:1 w:0) /// Proof: `SubtensorModule::UnlockRate` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::HotkeyLock` (r:1 w:1) + /// Proof: `SubtensorModule::HotkeyLock` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn unlock_stake() -> Weight { + // Proof Size summary in bytes: + // Measured: `978` + // Estimated: `6918` + // Minimum execution time: 70_882_000 picoseconds. + Weight::from_parts(71_814_000, 6918) + .saturating_add(RocksDbWeight::get().reads(5_u64)) + .saturating_add(RocksDbWeight::get().writes(2_u64)) + } + /// Storage: `SubtensorModule::Lock` (r:2 w:2) + /// Proof: `SubtensorModule::Lock` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubtensorModule::Owner` (r:2 w:0) + /// Proof: `SubtensorModule::Owner` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::MaturityRate` (r:1 w:0) /// Proof: `SubtensorModule::MaturityRate` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::HotkeyLock` (r:2 w:2) /// Proof: `SubtensorModule::HotkeyLock` (`max_values`: None, `max_size`: None, mode: `Measured`) fn move_lock() -> Weight { // Proof Size summary in bytes: - // Measured: `1366` - // Estimated: `7306` - // Minimum execution time: 109_825_000 picoseconds. - Weight::from_parts(111_929_000, 7306) - .saturating_add(RocksDbWeight::get().reads(10_u64)) + // Measured: `1302` + // Estimated: `7242` + // Minimum execution time: 92_212_000 picoseconds. + Weight::from_parts(93_754_000, 7242) + .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } } diff --git a/pallets/utility/src/weights.rs b/pallets/utility/src/weights.rs index 191c044e2d..801f9e04d8 100644 --- a/pallets/utility/src/weights.rs +++ b/pallets/utility/src/weights.rs @@ -2,7 +2,7 @@ //! Autogenerated weights for `pallet_subtensor_utility` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 49.1.0 -//! DATE: 2026-05-25, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2026-05-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runnervmg397c`, CPU: `AMD EPYC 7763 64-Core Processor` //! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: `1024` @@ -22,7 +22,7 @@ // --no-storage-info // --no-min-squares // --no-median-slopes -// --output=/tmp/tmp.2M827i01ht +// --output=/tmp/tmp.dOccYF6VnR // --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: 4_890_000 picoseconds. - Weight::from_parts(31_041_787, 3983) - // Standard Error: 3_736 - .saturating_add(Weight::from_parts(5_317_513, 0).saturating_mul(c.into())) + // Minimum execution time: 4_859_000 picoseconds. + Weight::from_parts(16_643_735, 3983) + // Standard Error: 2_503 + .saturating_add(Weight::from_parts(5_549_031, 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: 14_577_000 picoseconds. - Weight::from_parts(15_178_000, 3983) + // Minimum execution time: 14_928_000 picoseconds. + Weight::from_parts(15_659_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: 4_889_000 picoseconds. - Weight::from_parts(30_365_384, 3983) - // Standard Error: 3_742 - .saturating_add(Weight::from_parts(5_542_677, 0).saturating_mul(c.into())) + // Minimum execution time: 5_059_000 picoseconds. + Weight::from_parts(16_277_090, 3983) + // Standard Error: 2_427 + .saturating_add(Weight::from_parts(5_775_592, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(2_u64)) } fn dispatch_as() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_672_000 picoseconds. - Weight::from_parts(6_863_000, 0) + // Minimum execution time: 6_893_000 picoseconds. + Weight::from_parts(7_264_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: 4_768_000 picoseconds. - Weight::from_parts(30_889_962, 3983) - // Standard Error: 3_691 - .saturating_add(Weight::from_parts(5_322_546, 0).saturating_mul(c.into())) + // Minimum execution time: 4_989_000 picoseconds. + Weight::from_parts(17_865_449, 3983) + // Standard Error: 2_035 + .saturating_add(Weight::from_parts(5_539_749, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(2_u64)) } fn dispatch_as_fallible() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_592_000 picoseconds. - Weight::from_parts(6_943_000, 0) + // Minimum execution time: 6_863_000 picoseconds. + Weight::from_parts(7_304_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: 20_969_000 picoseconds. - Weight::from_parts(21_671_000, 3983) + // Minimum execution time: 21_600_000 picoseconds. + Weight::from_parts(22_061_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: 4_890_000 picoseconds. - Weight::from_parts(31_041_787, 3983) - // Standard Error: 3_736 - .saturating_add(Weight::from_parts(5_317_513, 0).saturating_mul(c.into())) + // Minimum execution time: 4_859_000 picoseconds. + Weight::from_parts(16_643_735, 3983) + // Standard Error: 2_503 + .saturating_add(Weight::from_parts(5_549_031, 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: 14_577_000 picoseconds. - Weight::from_parts(15_178_000, 3983) + // Minimum execution time: 14_928_000 picoseconds. + Weight::from_parts(15_659_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: 4_889_000 picoseconds. - Weight::from_parts(30_365_384, 3983) - // Standard Error: 3_742 - .saturating_add(Weight::from_parts(5_542_677, 0).saturating_mul(c.into())) + // Minimum execution time: 5_059_000 picoseconds. + Weight::from_parts(16_277_090, 3983) + // Standard Error: 2_427 + .saturating_add(Weight::from_parts(5_775_592, 0).saturating_mul(c.into())) .saturating_add(RocksDbWeight::get().reads(2_u64)) } fn dispatch_as() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_672_000 picoseconds. - Weight::from_parts(6_863_000, 0) + // Minimum execution time: 6_893_000 picoseconds. + Weight::from_parts(7_264_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: 4_768_000 picoseconds. - Weight::from_parts(30_889_962, 3983) - // Standard Error: 3_691 - .saturating_add(Weight::from_parts(5_322_546, 0).saturating_mul(c.into())) + // Minimum execution time: 4_989_000 picoseconds. + Weight::from_parts(17_865_449, 3983) + // Standard Error: 2_035 + .saturating_add(Weight::from_parts(5_539_749, 0).saturating_mul(c.into())) .saturating_add(RocksDbWeight::get().reads(2_u64)) } fn dispatch_as_fallible() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_592_000 picoseconds. - Weight::from_parts(6_943_000, 0) + // Minimum execution time: 6_863_000 picoseconds. + Weight::from_parts(7_304_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: 20_969_000 picoseconds. - Weight::from_parts(21_671_000, 3983) + // Minimum execution time: 21_600_000 picoseconds. + Weight::from_parts(22_061_000, 3983) .saturating_add(RocksDbWeight::get().reads(2_u64)) } }