diff --git a/pallets/admin-utils/src/lib.rs b/pallets/admin-utils/src/lib.rs index 0e63a1f05a..23df61e05c 100644 --- a/pallets/admin-utils/src/lib.rs +++ b/pallets/admin-utils/src/lib.rs @@ -1532,28 +1532,17 @@ pub mod pallet { Ok(()) } - /// Change the SubnetOwnerHotkey for a given subnet. - /// - /// # Arguments - /// * `origin` - The origin of the call, which must be the subnet owner. - /// * `netuid` - The unique identifier for the subnet. - /// * `hotkey` - The new hotkey for the subnet owner. - /// - /// # Errors - /// * `BadOrigin` - If the caller is not the subnet owner or root account. - /// - /// # Weight - /// Weight is handled by the `#[pallet::weight]` attribute. - #[pallet::call_index(64)] - #[pallet::weight(Weight::from_parts(3_918_000, 0) // TODO: add benchmarks - .saturating_add(T::DbWeight::get().writes(1_u64)))] - pub fn sudo_set_subnet_owner_hotkey( - origin: OriginFor, - netuid: NetUid, - hotkey: ::AccountId, - ) -> DispatchResult { - pallet_subtensor::Pallet::::do_set_sn_owner_hotkey(origin, netuid, &hotkey) - } + // Deprecated for sudo_set_sn_owner_hotkey + // #[pallet::call_index(64)] + // #[pallet::weight(Weight::from_parts(3_918_000, 0) // TODO: add benchmarks + // .saturating_add(T::DbWeight::get().writes(1_u64)))] + // pub fn sudo_set_subnet_owner_hotkey( + // origin: OriginFor, + // netuid: NetUid, + // hotkey: ::AccountId, + // ) -> DispatchResult { + // pallet_subtensor::Pallet::::do_set_sn_owner_hotkey(origin, netuid, &hotkey) + // } /// /// diff --git a/pallets/limit-orders/src/weights.rs b/pallets/limit-orders/src/weights.rs index e8c24d30ba..cb643485ce 100644 --- a/pallets/limit-orders/src/weights.rs +++ b/pallets/limit-orders/src/weights.rs @@ -2,9 +2,9 @@ //! Autogenerated weights for `pallet_limit_orders` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 49.1.0 -//! DATE: 2026-06-11, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2026-06-24, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `runnervm3jyl0`, 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.h1ZElBJrCs +// --output=/tmp/tmp.hLmnlWyxQV // --template=/home/runner/work/subtensor/subtensor/.maintain/frame-weight-template.hbs #![cfg_attr(rustfmt, rustfmt_skip)] @@ -51,8 +51,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `66` // Estimated: `3522` - // Minimum execution time: 13_230_000 picoseconds. - Weight::from_parts(14_822_000, 3522) + // Minimum execution time: 15_309_000 picoseconds. + Weight::from_parts(16_030_000, 3522) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -62,8 +62,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_006_000 picoseconds. - Weight::from_parts(4_266_000, 0) + // Minimum execution time: 5_149_000 picoseconds. + Weight::from_parts(5_420_000, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `LimitOrders::LimitOrdersEnabled` (r:1 w:0) @@ -123,10 +123,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1134 + n * (283 ±0)` // Estimated: `6148 + n * (5158 ±0)` - // Minimum execution time: 597_854_000 picoseconds. - Weight::from_parts(61_768_457, 6148) - // Standard Error: 136_266 - .saturating_add(Weight::from_parts(520_180_782, 0).saturating_mul(n.into())) + // Minimum execution time: 573_493_000 picoseconds. + Weight::from_parts(37_709_904, 6148) + // Standard Error: 196_193 + .saturating_add(Weight::from_parts(499_740_014, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(17_u64)) .saturating_add(T::DbWeight::get().reads((11_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes(10_u64)) @@ -190,10 +190,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1263 + n * (283 ±0)` // Estimated: `8727 + n * (5158 ±0)` - // Minimum execution time: 747_334_000 picoseconds. - Weight::from_parts(499_718_496, 8727) - // Standard Error: 74_442 - .saturating_add(Weight::from_parts(259_134_004, 0).saturating_mul(n.into())) + // Minimum execution time: 717_240_000 picoseconds. + Weight::from_parts(552_675_417, 8727) + // Standard Error: 110_663 + .saturating_add(Weight::from_parts(241_301_726, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(25_u64)) .saturating_add(T::DbWeight::get().reads((10_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes(15_u64)) @@ -210,8 +210,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `66` // Estimated: `3522` - // Minimum execution time: 13_230_000 picoseconds. - Weight::from_parts(14_822_000, 3522) + // Minimum execution time: 15_309_000 picoseconds. + Weight::from_parts(16_030_000, 3522) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -221,8 +221,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_006_000 picoseconds. - Weight::from_parts(4_266_000, 0) + // Minimum execution time: 5_149_000 picoseconds. + Weight::from_parts(5_420_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `LimitOrders::LimitOrdersEnabled` (r:1 w:0) @@ -282,10 +282,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1134 + n * (283 ±0)` // Estimated: `6148 + n * (5158 ±0)` - // Minimum execution time: 597_854_000 picoseconds. - Weight::from_parts(61_768_457, 6148) - // Standard Error: 136_266 - .saturating_add(Weight::from_parts(520_180_782, 0).saturating_mul(n.into())) + // Minimum execution time: 573_493_000 picoseconds. + Weight::from_parts(37_709_904, 6148) + // Standard Error: 196_193 + .saturating_add(Weight::from_parts(499_740_014, 0).saturating_mul(n.into())) .saturating_add(RocksDbWeight::get().reads(17_u64)) .saturating_add(RocksDbWeight::get().reads((11_u64).saturating_mul(n.into()))) .saturating_add(RocksDbWeight::get().writes(10_u64)) @@ -349,10 +349,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1263 + n * (283 ±0)` // Estimated: `8727 + n * (5158 ±0)` - // Minimum execution time: 747_334_000 picoseconds. - Weight::from_parts(499_718_496, 8727) - // Standard Error: 74_442 - .saturating_add(Weight::from_parts(259_134_004, 0).saturating_mul(n.into())) + // Minimum execution time: 717_240_000 picoseconds. + Weight::from_parts(552_675_417, 8727) + // Standard Error: 110_663 + .saturating_add(Weight::from_parts(241_301_726, 0).saturating_mul(n.into())) .saturating_add(RocksDbWeight::get().reads(25_u64)) .saturating_add(RocksDbWeight::get().reads((10_u64).saturating_mul(n.into()))) .saturating_add(RocksDbWeight::get().writes(15_u64)) diff --git a/pallets/proxy/src/weights.rs b/pallets/proxy/src/weights.rs index 1885d8b3f6..af91cb7277 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-06-23, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2026-06-24, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runnervm7b5n9`, 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.y6dm1DHMCB +// --output=/tmp/tmp.y2xrvMbiMs // --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_629_000 picoseconds. - Weight::from_parts(28_026_265, 4254) - // Standard Error: 4_888 - .saturating_add(Weight::from_parts(53_205, 0).saturating_mul(p.into())) + // Minimum execution time: 26_189_000 picoseconds. + Weight::from_parts(27_505_550, 4254) + // Standard Error: 4_793 + .saturating_add(Weight::from_parts(69_619, 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: 52_588_000 picoseconds. - Weight::from_parts(53_234_507, 8615) - // Standard Error: 1_933 - .saturating_add(Weight::from_parts(228_831, 0).saturating_mul(a.into())) - // Standard Error: 7_745 - .saturating_add(Weight::from_parts(54_037, 0).saturating_mul(p.into())) + // Minimum execution time: 50_874_000 picoseconds. + Weight::from_parts(52_716_407, 8615) + // Standard Error: 2_189 + .saturating_add(Weight::from_parts(213_947, 0).saturating_mul(a.into())) + // Standard Error: 8_769 + .saturating_add(Weight::from_parts(39_570, 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,12 +113,12 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `299 + a * (68 ±0)` // Estimated: `8615` - // Minimum execution time: 26_049_000 picoseconds. - Weight::from_parts(25_595_226, 8615) - // Standard Error: 1_041 - .saturating_add(Weight::from_parts(205_163, 0).saturating_mul(a.into())) - // Standard Error: 4_172 - .saturating_add(Weight::from_parts(40_277, 0).saturating_mul(p.into())) + // Minimum execution time: 24_646_000 picoseconds. + Weight::from_parts(25_351_648, 8615) + // Standard Error: 1_263 + .saturating_add(Weight::from_parts(202_639, 0).saturating_mul(a.into())) + // Standard Error: 5_058 + .saturating_add(Weight::from_parts(17_145, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -132,12 +132,12 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `299 + a * (68 ±0)` // Estimated: `8615` - // Minimum execution time: 26_269_000 picoseconds. - Weight::from_parts(26_388_332, 8615) - // Standard Error: 1_181 - .saturating_add(Weight::from_parts(199_703, 0).saturating_mul(a.into())) - // Standard Error: 4_732 - .saturating_add(Weight::from_parts(17_846, 0).saturating_mul(p.into())) + // Minimum execution time: 24_686_000 picoseconds. + Weight::from_parts(25_447_040, 8615) + // Standard Error: 1_204 + .saturating_add(Weight::from_parts(197_519, 0).saturating_mul(a.into())) + // Standard Error: 4_824 + .saturating_add(Weight::from_parts(26_426, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -153,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: 33_873_000 picoseconds. - Weight::from_parts(34_286_251, 8615) - // Standard Error: 2_040 - .saturating_add(Weight::from_parts(194_092, 0).saturating_mul(a.into())) - // Standard Error: 8_174 - .saturating_add(Weight::from_parts(53_615, 0).saturating_mul(p.into())) + // Minimum execution time: 32_170_000 picoseconds. + Weight::from_parts(32_440_222, 8615) + // Standard Error: 1_515 + .saturating_add(Weight::from_parts(200_631, 0).saturating_mul(a.into())) + // Standard Error: 6_071 + .saturating_add(Weight::from_parts(68_700, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -169,10 +169,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `119 + p * (37 ±0)` // Estimated: `4254` - // Minimum execution time: 24_907_000 picoseconds. - Weight::from_parts(25_770_804, 4254) - // Standard Error: 2_400 - .saturating_add(Weight::from_parts(80_892, 0).saturating_mul(p.into())) + // Minimum execution time: 23_795_000 picoseconds. + Weight::from_parts(24_685_958, 4254) + // Standard Error: 3_450 + .saturating_add(Weight::from_parts(80_991, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -185,10 +185,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `119 + p * (37 ±0)` // Estimated: `4254` - // Minimum execution time: 26_690_000 picoseconds. - Weight::from_parts(27_827_049, 4254) - // Standard Error: 2_885 - .saturating_add(Weight::from_parts(64_054, 0).saturating_mul(p.into())) + // Minimum execution time: 25_578_000 picoseconds. + Weight::from_parts(26_614_984, 4254) + // Standard Error: 3_099 + .saturating_add(Weight::from_parts(59_205, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -199,10 +199,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `119 + p * (37 ±0)` // Estimated: `4254` - // Minimum execution time: 26_159_000 picoseconds. - Weight::from_parts(27_407_028, 4254) - // Standard Error: 3_009 - .saturating_add(Weight::from_parts(55_808, 0).saturating_mul(p.into())) + // Minimum execution time: 25_367_000 picoseconds. + Weight::from_parts(26_441_977, 4254) + // Standard Error: 4_077 + .saturating_add(Weight::from_parts(46_473, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -213,10 +213,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `139` // Estimated: `4254` - // Minimum execution time: 26_699_000 picoseconds. - Weight::from_parts(27_853_436, 4254) - // Standard Error: 3_475 - .saturating_add(Weight::from_parts(20_160, 0).saturating_mul(p.into())) + // Minimum execution time: 25_557_000 picoseconds. + Weight::from_parts(26_686_208, 4254) + // Standard Error: 3_588 + .saturating_add(Weight::from_parts(27_191, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -227,10 +227,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `156 + p * (37 ±0)` // Estimated: `4254` - // Minimum execution time: 25_437_000 picoseconds. - Weight::from_parts(26_529_087, 4254) - // Standard Error: 2_476 - .saturating_add(Weight::from_parts(48_014, 0).saturating_mul(p.into())) + // Minimum execution time: 24_695_000 picoseconds. + Weight::from_parts(25_826_161, 4254) + // Standard Error: 3_578 + .saturating_add(Weight::from_parts(40_613, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -244,8 +244,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `412` // Estimated: `8615` - // Minimum execution time: 46_066_000 picoseconds. - Weight::from_parts(46_757_000, 8615) + // Minimum execution time: 43_431_000 picoseconds. + Weight::from_parts(44_262_000, 8615) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -258,10 +258,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `119 + p * (37 ±0)` // Estimated: `4254` - // Minimum execution time: 13_585_000 picoseconds. - Weight::from_parts(14_259_931, 4254) - // Standard Error: 1_733 - .saturating_add(Weight::from_parts(42_799, 0).saturating_mul(p.into())) + // Minimum execution time: 13_275_000 picoseconds. + Weight::from_parts(14_036_984, 4254) + // Standard Error: 2_451 + .saturating_add(Weight::from_parts(40_086, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -282,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_629_000 picoseconds. - Weight::from_parts(28_026_265, 4254) - // Standard Error: 4_888 - .saturating_add(Weight::from_parts(53_205, 0).saturating_mul(p.into())) + // Minimum execution time: 26_189_000 picoseconds. + Weight::from_parts(27_505_550, 4254) + // Standard Error: 4_793 + .saturating_add(Weight::from_parts(69_619, 0).saturating_mul(p.into())) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) .saturating_add(Weight::from_parts(0, 37).saturating_mul(p.into())) @@ -308,12 +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: 52_588_000 picoseconds. - Weight::from_parts(53_234_507, 8615) - // Standard Error: 1_933 - .saturating_add(Weight::from_parts(228_831, 0).saturating_mul(a.into())) - // Standard Error: 7_745 - .saturating_add(Weight::from_parts(54_037, 0).saturating_mul(p.into())) + // Minimum execution time: 50_874_000 picoseconds. + Weight::from_parts(52_716_407, 8615) + // Standard Error: 2_189 + .saturating_add(Weight::from_parts(213_947, 0).saturating_mul(a.into())) + // Standard Error: 8_769 + .saturating_add(Weight::from_parts(39_570, 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())) @@ -329,12 +329,12 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `299 + a * (68 ±0)` // Estimated: `8615` - // Minimum execution time: 26_049_000 picoseconds. - Weight::from_parts(25_595_226, 8615) - // Standard Error: 1_041 - .saturating_add(Weight::from_parts(205_163, 0).saturating_mul(a.into())) - // Standard Error: 4_172 - .saturating_add(Weight::from_parts(40_277, 0).saturating_mul(p.into())) + // Minimum execution time: 24_646_000 picoseconds. + Weight::from_parts(25_351_648, 8615) + // Standard Error: 1_263 + .saturating_add(Weight::from_parts(202_639, 0).saturating_mul(a.into())) + // Standard Error: 5_058 + .saturating_add(Weight::from_parts(17_145, 0).saturating_mul(p.into())) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -348,12 +348,12 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `299 + a * (68 ±0)` // Estimated: `8615` - // Minimum execution time: 26_269_000 picoseconds. - Weight::from_parts(26_388_332, 8615) - // Standard Error: 1_181 - .saturating_add(Weight::from_parts(199_703, 0).saturating_mul(a.into())) - // Standard Error: 4_732 - .saturating_add(Weight::from_parts(17_846, 0).saturating_mul(p.into())) + // Minimum execution time: 24_686_000 picoseconds. + Weight::from_parts(25_447_040, 8615) + // Standard Error: 1_204 + .saturating_add(Weight::from_parts(197_519, 0).saturating_mul(a.into())) + // Standard Error: 4_824 + .saturating_add(Weight::from_parts(26_426, 0).saturating_mul(p.into())) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -369,12 +369,12 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `308 + a * (68 ±0) + p * (37 ±0)` // Estimated: `8615` - // Minimum execution time: 33_873_000 picoseconds. - Weight::from_parts(34_286_251, 8615) - // Standard Error: 2_040 - .saturating_add(Weight::from_parts(194_092, 0).saturating_mul(a.into())) - // Standard Error: 8_174 - .saturating_add(Weight::from_parts(53_615, 0).saturating_mul(p.into())) + // Minimum execution time: 32_170_000 picoseconds. + Weight::from_parts(32_440_222, 8615) + // Standard Error: 1_515 + .saturating_add(Weight::from_parts(200_631, 0).saturating_mul(a.into())) + // Standard Error: 6_071 + .saturating_add(Weight::from_parts(68_700, 0).saturating_mul(p.into())) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -385,10 +385,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `119 + p * (37 ±0)` // Estimated: `4254` - // Minimum execution time: 24_907_000 picoseconds. - Weight::from_parts(25_770_804, 4254) - // Standard Error: 2_400 - .saturating_add(Weight::from_parts(80_892, 0).saturating_mul(p.into())) + // Minimum execution time: 23_795_000 picoseconds. + Weight::from_parts(24_685_958, 4254) + // Standard Error: 3_450 + .saturating_add(Weight::from_parts(80_991, 0).saturating_mul(p.into())) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -401,10 +401,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `119 + p * (37 ±0)` // Estimated: `4254` - // Minimum execution time: 26_690_000 picoseconds. - Weight::from_parts(27_827_049, 4254) - // Standard Error: 2_885 - .saturating_add(Weight::from_parts(64_054, 0).saturating_mul(p.into())) + // Minimum execution time: 25_578_000 picoseconds. + Weight::from_parts(26_614_984, 4254) + // Standard Error: 3_099 + .saturating_add(Weight::from_parts(59_205, 0).saturating_mul(p.into())) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -415,10 +415,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `119 + p * (37 ±0)` // Estimated: `4254` - // Minimum execution time: 26_159_000 picoseconds. - Weight::from_parts(27_407_028, 4254) - // Standard Error: 3_009 - .saturating_add(Weight::from_parts(55_808, 0).saturating_mul(p.into())) + // Minimum execution time: 25_367_000 picoseconds. + Weight::from_parts(26_441_977, 4254) + // Standard Error: 4_077 + .saturating_add(Weight::from_parts(46_473, 0).saturating_mul(p.into())) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -429,10 +429,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `139` // Estimated: `4254` - // Minimum execution time: 26_699_000 picoseconds. - Weight::from_parts(27_853_436, 4254) - // Standard Error: 3_475 - .saturating_add(Weight::from_parts(20_160, 0).saturating_mul(p.into())) + // Minimum execution time: 25_557_000 picoseconds. + Weight::from_parts(26_686_208, 4254) + // Standard Error: 3_588 + .saturating_add(Weight::from_parts(27_191, 0).saturating_mul(p.into())) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -443,10 +443,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `156 + p * (37 ±0)` // Estimated: `4254` - // Minimum execution time: 25_437_000 picoseconds. - Weight::from_parts(26_529_087, 4254) - // Standard Error: 2_476 - .saturating_add(Weight::from_parts(48_014, 0).saturating_mul(p.into())) + // Minimum execution time: 24_695_000 picoseconds. + Weight::from_parts(25_826_161, 4254) + // Standard Error: 3_578 + .saturating_add(Weight::from_parts(40_613, 0).saturating_mul(p.into())) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -460,8 +460,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `412` // Estimated: `8615` - // Minimum execution time: 46_066_000 picoseconds. - Weight::from_parts(46_757_000, 8615) + // Minimum execution time: 43_431_000 picoseconds. + Weight::from_parts(44_262_000, 8615) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -474,10 +474,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `119 + p * (37 ±0)` // Estimated: `4254` - // Minimum execution time: 13_585_000 picoseconds. - Weight::from_parts(14_259_931, 4254) - // Standard Error: 1_733 - .saturating_add(Weight::from_parts(42_799, 0).saturating_mul(p.into())) + // Minimum execution time: 13_275_000 picoseconds. + Weight::from_parts(14_036_984, 4254) + // Standard Error: 2_451 + .saturating_add(Weight::from_parts(40_086, 0).saturating_mul(p.into())) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } diff --git a/pallets/subtensor/rpc/src/lib.rs b/pallets/subtensor/rpc/src/lib.rs index e00729151f..0c11869704 100644 --- a/pallets/subtensor/rpc/src/lib.rs +++ b/pallets/subtensor/rpc/src/lib.rs @@ -83,6 +83,9 @@ pub trait SubtensorCustomApi { ) -> RpcResult>; #[method(name = "subnetInfo_getSubnetState")] fn get_subnet_state(&self, netuid: NetUid, at: Option) -> RpcResult>; + + #[method(name = "subnetInfo_getBlockEmission")] + fn get_block_emission(&self, at: Option) -> RpcResult; #[method(name = "subnetInfo_getLockCost")] fn get_network_lock_cost(&self, at: Option) -> RpcResult; #[method(name = "subnetInfo_getSelectiveMetagraph")] @@ -467,6 +470,14 @@ where } } + fn get_block_emission(&self, at: Option<::Hash>) -> RpcResult { + let api = self.client.runtime_api(); + let at = at.unwrap_or_else(|| self.client.info().best_hash); + + api.get_block_emission(at) + .map_err(|e| Error::RuntimeError(format!("Unable to get block emission: {e:?}")).into()) + } + fn get_network_lock_cost(&self, at: Option<::Hash>) -> RpcResult { let api = self.client.runtime_api(); let at = at.unwrap_or_else(|| self.client.info().best_hash); diff --git a/pallets/subtensor/runtime-api/src/lib.rs b/pallets/subtensor/runtime-api/src/lib.rs index 2b95d59dc3..657bd9e3eb 100644 --- a/pallets/subtensor/runtime-api/src/lib.rs +++ b/pallets/subtensor/runtime-api/src/lib.rs @@ -61,6 +61,7 @@ sp_api::decl_runtime_apis! { fn get_subnet_to_prune() -> Option; fn get_subnet_account_id(netuid: NetUid) -> Option; fn get_next_epoch_start_block(netuid: NetUid) -> Option; + fn get_block_emission() -> TaoBalance; } pub trait StakeInfoRuntimeApi { diff --git a/pallets/subtensor/src/coinbase/block_emission.rs b/pallets/subtensor/src/coinbase/block_emission.rs index d4adcddbee..96e44dbcc4 100644 --- a/pallets/subtensor/src/coinbase/block_emission.rs +++ b/pallets/subtensor/src/coinbase/block_emission.rs @@ -77,9 +77,6 @@ impl Pallet { .saturating_mul(I96F32::saturating_from_num(DefaultBlockEmission::::get())); // Convert to u64 let block_emission_u64: u64 = block_emission.saturating_to_num::(); - if BlockEmission::::get() != block_emission_u64 { - BlockEmission::::put(block_emission_u64); - } Ok(block_emission_u64) } } diff --git a/pallets/subtensor/src/lib.rs b/pallets/subtensor/src/lib.rs index b1afef3401..8896ceaf0f 100644 --- a/pallets/subtensor/src/lib.rs +++ b/pallets/subtensor/src/lib.rs @@ -1284,6 +1284,7 @@ pub mod pallet { /// ==== Coinbase ==== /// ================== /// --- ITEM ( global_block_emission ) + #[deprecated(note = "Use calculate_block_emission() or the block emission RPC instead.")] #[pallet::storage] pub type BlockEmission = StorageValue<_, u64, ValueQuery, DefaultBlockEmission>; diff --git a/pallets/subtensor/src/staking/move_stake.rs b/pallets/subtensor/src/staking/move_stake.rs index b189c90968..e826f8484e 100644 --- a/pallets/subtensor/src/staking/move_stake.rs +++ b/pallets/subtensor/src/staking/move_stake.rs @@ -303,15 +303,6 @@ impl Pallet { maybe_allow_partial: Option, check_transfer_toggle: bool, ) -> Result { - // Cap the alpha_amount at available Alpha because user might be paying transaxtion fees - // in Alpha and their total is already reduced by now. - let alpha_available = Self::get_stake_for_hotkey_and_coldkey_on_subnet( - origin_hotkey, - origin_coldkey, - origin_netuid, - ); - let alpha_amount = alpha_amount.min(alpha_available); - // Calculate the maximum amount that can be executed let max_amount = if origin_netuid != destination_netuid { if let Some(limit_price) = maybe_limit_price { diff --git a/pallets/subtensor/src/tests/move_stake.rs b/pallets/subtensor/src/tests/move_stake.rs index 8265ec5e9d..67a37d1e07 100644 --- a/pallets/subtensor/src/tests/move_stake.rs +++ b/pallets/subtensor/src/tests/move_stake.rs @@ -1023,17 +1023,45 @@ fn test_do_transfer_insufficient_stake() { ) .unwrap(); - // Amount over available stake succeeds (because fees can be paid in Alpha, - // this limitation is removed) - let alpha = stake_amount * 2; - assert_ok!(SubtensorModule::do_transfer_stake( - RuntimeOrigin::signed(origin_coldkey), - destination_coldkey, - hotkey, + let origin_alpha_before = SubtensorModule::get_stake_for_hotkey_and_coldkey_on_subnet( + &hotkey, + &origin_coldkey, netuid, + ); + let destination_alpha_before = SubtensorModule::get_stake_for_hotkey_and_coldkey_on_subnet( + &hotkey, + &destination_coldkey, netuid, - alpha.into() - )); + ); + + let alpha = stake_amount * 2; + assert_noop!( + SubtensorModule::do_transfer_stake( + RuntimeOrigin::signed(origin_coldkey), + destination_coldkey, + hotkey, + netuid, + netuid, + alpha.into() + ), + Error::::NotEnoughStakeToWithdraw + ); + assert_eq!( + SubtensorModule::get_stake_for_hotkey_and_coldkey_on_subnet( + &hotkey, + &origin_coldkey, + netuid + ), + origin_alpha_before + ); + assert_eq!( + SubtensorModule::get_stake_for_hotkey_and_coldkey_on_subnet( + &hotkey, + &destination_coldkey, + netuid + ), + destination_alpha_before + ); }); } diff --git a/pallets/subtensor/src/weights.rs b/pallets/subtensor/src/weights.rs index 478c37ad7c..e4beabe817 100644 --- a/pallets/subtensor/src/weights.rs +++ b/pallets/subtensor/src/weights.rs @@ -2,7 +2,7 @@ //! Autogenerated weights for `pallet_subtensor` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 49.1.0 -//! DATE: 2026-06-23, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2026-06-24, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runnervm7b5n9`, 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.hYIH73ZUrd +// --output=/tmp/tmp.gIR6lC6qZk // --template=/home/runner/work/subtensor/subtensor/.maintain/frame-weight-template.hbs #![cfg_attr(rustfmt, rustfmt_skip)] @@ -185,8 +185,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1865` // Estimated: `6148` - // Minimum execution time: 343_840_000 picoseconds. - Weight::from_parts(349_872_000, 6148) + // Minimum execution time: 328_388_000 picoseconds. + Weight::from_parts(330_502_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: 15_317_357_000 picoseconds. - Weight::from_parts(15_513_610_000, 10327410) + // Minimum execution time: 15_066_222_000 picoseconds. + Weight::from_parts(15_359_235_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: 639_698_000 picoseconds. - Weight::from_parts(664_064_000, 8727) + // Minimum execution time: 630_738_000 picoseconds. + Weight::from_parts(657_709_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: 30_307_000 picoseconds. - Weight::from_parts(31_278_000, 4178) + // Minimum execution time: 29_935_000 picoseconds. + Weight::from_parts(31_428_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: 28_262_000 picoseconds. - Weight::from_parts(29_294_000, 4277) + // Minimum execution time: 28_453_000 picoseconds. + Weight::from_parts(29_284_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: 332_358_000 picoseconds. - Weight::from_parts(336_815_000, 6148) + // Minimum execution time: 327_477_000 picoseconds. + Weight::from_parts(331_344_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: 102_089_000 picoseconds. - Weight::from_parts(103_934_000, 4981) + // Minimum execution time: 100_676_000 picoseconds. + Weight::from_parts(103_852_000, 4981) .saturating_add(T::DbWeight::get().reads(19_u64)) .saturating_add(T::DbWeight::get().writes(16_u64)) } @@ -490,8 +490,6 @@ impl WeightInfo for SubstrateWeight { /// Proof: `SubtensorModule::NetworkLockReductionInterval` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::TotalIssuance` (r:1 w:0) /// Proof: `SubtensorModule::TotalIssuance` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `SubtensorModule::BlockEmission` (r:1 w:0) - /// Proof: `SubtensorModule::BlockEmission` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `System::Account` (r:2 w:2) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(104), added: 2579, mode: `MaxEncodedLen`) /// Storage: `SubtensorModule::SubnetMechanism` (r:1 w:1) @@ -586,9 +584,9 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1532` // Estimated: `9947` - // Minimum execution time: 271_405_000 picoseconds. - Weight::from_parts(277_125_000, 9947) - .saturating_add(T::DbWeight::get().reads(40_u64)) + // Minimum execution time: 267_616_000 picoseconds. + Weight::from_parts(272_414_000, 9947) + .saturating_add(T::DbWeight::get().reads(39_u64)) .saturating_add(T::DbWeight::get().writes(48_u64)) } /// Storage: `SubtensorModule::NetworksAdded` (r:1 w:0) @@ -621,8 +619,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1249` // Estimated: `4714` - // Minimum execution time: 67_886_000 picoseconds. - Weight::from_parts(69_049_000, 4714) + // Minimum execution time: 67_896_000 picoseconds. + Weight::from_parts(69_409_000, 4714) .saturating_add(T::DbWeight::get().reads(13_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -668,8 +666,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1650` // Estimated: `7590` - // Minimum execution time: 109_534_000 picoseconds. - Weight::from_parts(111_227_000, 7590) + // Minimum execution time: 109_312_000 picoseconds. + Weight::from_parts(110_735_000, 7590) .saturating_add(T::DbWeight::get().reads(19_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -679,8 +677,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_570_000 picoseconds. - Weight::from_parts(5_760_000, 0) + // Minimum execution time: 5_200_000 picoseconds. + Weight::from_parts(5_510_000, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::Owner` (r:1 w:0) @@ -701,8 +699,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1033` // Estimated: `4498` - // Minimum execution time: 52_527_000 picoseconds. - Weight::from_parts(53_870_000, 4498) + // Minimum execution time: 52_177_000 picoseconds. + Weight::from_parts(53_178_000, 4498) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -718,8 +716,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `694` // Estimated: `4159` - // Minimum execution time: 45_574_000 picoseconds. - Weight::from_parts(47_248_000, 4159) + // Minimum execution time: 46_146_000 picoseconds. + Weight::from_parts(47_278_000, 4159) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -757,6 +755,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 +767,9 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `2110` // Estimated: `13000` - // Minimum execution time: 284_379_000 picoseconds. - Weight::from_parts(288_156_000, 13000) - .saturating_add(T::DbWeight::get().reads(37_u64)) + // Minimum execution time: 288_044_000 picoseconds. + Weight::from_parts(290_288_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 +808,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 +822,9 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `2166` // Estimated: `13056` - // Minimum execution time: 308_323_000 picoseconds. - Weight::from_parts(312_301_000, 13056) - .saturating_add(T::DbWeight::get().reads(37_u64)) + // Minimum execution time: 309_453_000 picoseconds. + Weight::from_parts(315_114_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 +835,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `665` // Estimated: `4130` - // Minimum execution time: 22_442_000 picoseconds. - Weight::from_parts(23_293_000, 4130) + // Minimum execution time: 22_261_000 picoseconds. + Weight::from_parts(22_982_000, 4130) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -846,8 +848,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `613` // Estimated: `4078` - // Minimum execution time: 18_695_000 picoseconds. - Weight::from_parts(19_496_000, 4078) + // Minimum execution time: 18_805_000 picoseconds. + Weight::from_parts(20_077_000, 4078) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -859,8 +861,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 8_335_000 picoseconds. - Weight::from_parts(8_857_000, 0) + // Minimum execution time: 8_095_000 picoseconds. + Weight::from_parts(8_666_000, 0) .saturating_add(T::DbWeight::get().writes(2_u64)) } /// Storage: `SubtensorModule::CommitRevealWeightsEnabled` (r:1 w:0) @@ -905,8 +907,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `2155` // Estimated: `8095` - // Minimum execution time: 412_226_000 picoseconds. - Weight::from_parts(421_363_000, 8095) + // Minimum execution time: 403_027_000 picoseconds. + Weight::from_parts(424_947_000, 8095) .saturating_add(T::DbWeight::get().reads(19_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -940,8 +942,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1754` // Estimated: `5219` - // Minimum execution time: 169_976_000 picoseconds. - Weight::from_parts(172_139_000, 5219) + // Minimum execution time: 171_027_000 picoseconds. + Weight::from_parts(172_711_000, 5219) .saturating_add(T::DbWeight::get().reads(13_u64)) .saturating_add(T::DbWeight::get().writes(6_u64)) } @@ -973,8 +975,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1754` // Estimated: `5219` - // Minimum execution time: 166_359_000 picoseconds. - Weight::from_parts(168_964_000, 5219) + // Minimum execution time: 166_909_000 picoseconds. + Weight::from_parts(168_933_000, 5219) .saturating_add(T::DbWeight::get().reads(12_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -994,8 +996,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1118` // Estimated: `4583` - // Minimum execution time: 38_482_000 picoseconds. - Weight::from_parts(39_454_000, 4583) + // Minimum execution time: 38_882_000 picoseconds. + Weight::from_parts(39_442_000, 4583) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -1065,8 +1067,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `2226` // Estimated: `8727` - // Minimum execution time: 829_031_000 picoseconds. - Weight::from_parts(853_005_000, 8727) + // Minimum execution time: 810_081_000 picoseconds. + Weight::from_parts(833_084_000, 8727) .saturating_add(T::DbWeight::get().reads(32_u64)) .saturating_add(T::DbWeight::get().writes(16_u64)) } @@ -1102,8 +1104,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1979` // Estimated: `7919` - // Minimum execution time: 214_819_000 picoseconds. - Weight::from_parts(216_061_000, 7919) + // Minimum execution time: 210_109_000 picoseconds. + Weight::from_parts(212_274_000, 7919) .saturating_add(T::DbWeight::get().reads(19_u64)) .saturating_add(T::DbWeight::get().writes(7_u64)) } @@ -1159,8 +1161,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `2142` // Estimated: `10557` - // Minimum execution time: 544_281_000 picoseconds. - Weight::from_parts(569_198_000, 10557) + // Minimum execution time: 539_440_000 picoseconds. + Weight::from_parts(562_672_000, 10557) .saturating_add(T::DbWeight::get().reads(28_u64)) .saturating_add(T::DbWeight::get().writes(13_u64)) } @@ -1214,8 +1216,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `2176` // Estimated: `10591` - // Minimum execution time: 717_343_000 picoseconds. - Weight::from_parts(740_696_000, 10591) + // Minimum execution time: 713_632_000 picoseconds. + Weight::from_parts(740_663_000, 10591) .saturating_add(T::DbWeight::get().reads(27_u64)) .saturating_add(T::DbWeight::get().writes(13_u64)) } @@ -1287,8 +1289,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `2662` // Estimated: `11077` - // Minimum execution time: 921_853_000 picoseconds. - Weight::from_parts(944_515_000, 11077) + // Minimum execution time: 920_946_000 picoseconds. + Weight::from_parts(928_060_000, 11077) .saturating_add(T::DbWeight::get().reads(47_u64)) .saturating_add(T::DbWeight::get().writes(24_u64)) } @@ -1314,8 +1316,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 +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: `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_634_000 picoseconds. + Weight::from_parts(246_506_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 +1403,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `2505` // Estimated: `10920` - // Minimum execution time: 717_052_000 picoseconds. - Weight::from_parts(742_019_000, 10920) + // Minimum execution time: 696_210_000 picoseconds. + Weight::from_parts(723_230_000, 10920) .saturating_add(T::DbWeight::get().reads(47_u64)) .saturating_add(T::DbWeight::get().writes(24_u64)) } @@ -1442,8 +1442,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1300` // Estimated: `4765` - // Minimum execution time: 144_628_000 picoseconds. - Weight::from_parts(147_224_000, 4765) + // Minimum execution time: 143_045_000 picoseconds. + Weight::from_parts(144_588_000, 4765) .saturating_add(T::DbWeight::get().reads(15_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -1483,8 +1483,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1455` // Estimated: `7395` - // Minimum execution time: 100_516_000 picoseconds. - Weight::from_parts(103_092_000, 7395) + // Minimum execution time: 99_704_000 picoseconds. + Weight::from_parts(102_130_000, 7395) .saturating_add(T::DbWeight::get().reads(16_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -1500,8 +1500,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `830` // Estimated: `4295` - // Minimum execution time: 29_324_000 picoseconds. - Weight::from_parts(29_895_000, 4295) + // Minimum execution time: 28_883_000 picoseconds. + Weight::from_parts(30_347_000, 4295) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -1519,8 +1519,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `923` // Estimated: `4388` - // Minimum execution time: 36_257_000 picoseconds. - Weight::from_parts(37_710_000, 4388) + // Minimum execution time: 35_906_000 picoseconds. + Weight::from_parts(36_938_000, 4388) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -1544,8 +1544,6 @@ impl WeightInfo for SubstrateWeight { /// Proof: `SubtensorModule::NetworkLockReductionInterval` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::TotalIssuance` (r:1 w:0) /// Proof: `SubtensorModule::TotalIssuance` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `SubtensorModule::BlockEmission` (r:1 w:0) - /// Proof: `SubtensorModule::BlockEmission` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::SubnetMechanism` (r:1 w:1) /// Proof: `SubtensorModule::SubnetMechanism` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::SubnetAlphaIn` (r:1 w:1) @@ -1640,9 +1638,9 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1468` // Estimated: `9883` - // Minimum execution time: 270_502_000 picoseconds. - Weight::from_parts(275_041_000, 9883) - .saturating_add(T::DbWeight::get().reads(39_u64)) + // Minimum execution time: 268_618_000 picoseconds. + Weight::from_parts(275_570_000, 9883) + .saturating_add(T::DbWeight::get().reads(38_u64)) .saturating_add(T::DbWeight::get().writes(47_u64)) } /// Storage: `SubtensorModule::Uids` (r:1 w:0) @@ -1655,8 +1653,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `684` // Estimated: `4149` - // Minimum execution time: 29_786_000 picoseconds. - Weight::from_parts(30_617_000, 4149) + // Minimum execution time: 29_695_000 picoseconds. + Weight::from_parts(30_757_000, 4149) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -1670,8 +1668,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `889` // Estimated: `6829` - // Minimum execution time: 31_168_000 picoseconds. - Weight::from_parts(32_040_000, 6829) + // Minimum execution time: 31_669_000 picoseconds. + Weight::from_parts(32_631_000, 6829) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -1683,8 +1681,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `595` // Estimated: `4060` - // Minimum execution time: 17_122_000 picoseconds. - Weight::from_parts(17_513_000, 4060) + // Minimum execution time: 17_793_000 picoseconds. + Weight::from_parts(18_304_000, 4060) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -1766,8 +1764,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `3172` // Estimated: `28912` - // Minimum execution time: 1_227_100_000 picoseconds. - Weight::from_parts(1_242_038_000, 28912) + // Minimum execution time: 1_209_451_000 picoseconds. + Weight::from_parts(1_220_841_000, 28912) .saturating_add(T::DbWeight::get().reads(182_u64)) .saturating_add(T::DbWeight::get().writes(99_u64)) } @@ -1781,8 +1779,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `818` // Estimated: `4283` - // Minimum execution time: 24_556_000 picoseconds. - Weight::from_parts(25_337_000, 4283) + // Minimum execution time: 25_246_000 picoseconds. + Weight::from_parts(25_878_000, 4283) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -1796,8 +1794,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `774` // Estimated: `9189` - // Minimum execution time: 25_918_000 picoseconds. - Weight::from_parts(26_830_000, 9189) + // Minimum execution time: 27_030_000 picoseconds. + Weight::from_parts(28_102_000, 9189) .saturating_add(T::DbWeight::get().reads(6_u64)) } /// Storage: `SubtensorModule::Owner` (r:1 w:0) @@ -1858,8 +1856,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `2235` // Estimated: `11306` - // Minimum execution time: 674_042_000 picoseconds. - Weight::from_parts(700_873_000, 11306) + // Minimum execution time: 667_567_000 picoseconds. + Weight::from_parts(691_331_000, 11306) .saturating_add(T::DbWeight::get().reads(43_u64)) .saturating_add(T::DbWeight::get().writes(25_u64)) } @@ -1913,8 +1911,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `2176` // Estimated: `10591` - // Minimum execution time: 731_620_000 picoseconds. - Weight::from_parts(754_292_000, 10591) + // Minimum execution time: 721_907_000 picoseconds. + Weight::from_parts(749_488_000, 10591) .saturating_add(T::DbWeight::get().reads(27_u64)) .saturating_add(T::DbWeight::get().writes(13_u64)) } @@ -1946,8 +1944,6 @@ impl WeightInfo for SubstrateWeight { /// Proof: `SubtensorModule::NetworkLockReductionInterval` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::TotalIssuance` (r:1 w:0) /// Proof: `SubtensorModule::TotalIssuance` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `SubtensorModule::BlockEmission` (r:1 w:0) - /// Proof: `SubtensorModule::BlockEmission` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::SubnetMechanism` (r:1 w:1) /// Proof: `SubtensorModule::SubnetMechanism` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::SubnetAlphaIn` (r:1 w:1) @@ -2053,11 +2049,11 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1835 + k * (44 ±0)` // Estimated: `10256 + k * (2579 ±0)` - // Minimum execution time: 475_774_000 picoseconds. - Weight::from_parts(309_598_986, 10256) - // Standard Error: 26_969 - .saturating_add(Weight::from_parts(46_027_026, 0).saturating_mul(k.into())) - .saturating_add(T::DbWeight::get().reads(49_u64)) + // Minimum execution time: 472_506_000 picoseconds. + Weight::from_parts(230_127_504, 10256) + // Standard Error: 51_934 + .saturating_add(Weight::from_parts(46_730_014, 0).saturating_mul(k.into())) + .saturating_add(T::DbWeight::get().reads(48_u64)) .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(k.into()))) .saturating_add(T::DbWeight::get().writes(53_u64)) .saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(k.into()))) @@ -2086,10 +2082,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1501 + k * (53 ±0)` // Estimated: `6148 + k * (2529 ±0)` - // Minimum execution time: 127_077_000 picoseconds. - Weight::from_parts(146_402_779, 6148) - // Standard Error: 3_377 - .saturating_add(Weight::from_parts(1_566_532, 0).saturating_mul(k.into())) + // Minimum execution time: 93_584_000 picoseconds. + Weight::from_parts(94_083_076, 6148) + // Standard Error: 6_178 + .saturating_add(Weight::from_parts(1_554_561, 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 +2100,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `659` // Estimated: `9074` - // Minimum execution time: 27_300_000 picoseconds. - Weight::from_parts(28_313_000, 9074) + // Minimum execution time: 26_389_000 picoseconds. + Weight::from_parts(28_382_000, 9074) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -2141,8 +2137,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1248` // Estimated: `4713` - // Minimum execution time: 85_228_000 picoseconds. - Weight::from_parts(86_951_000, 4713) + // Minimum execution time: 84_036_000 picoseconds. + Weight::from_parts(85_989_000, 4713) .saturating_add(T::DbWeight::get().reads(14_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -2158,8 +2154,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `809` // Estimated: `4274` - // Minimum execution time: 32_871_000 picoseconds. - Weight::from_parts(33_853_000, 4274) + // Minimum execution time: 33_031_000 picoseconds. + Weight::from_parts(33_852_000, 4274) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -2175,8 +2171,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `476` // Estimated: `3941` - // Minimum execution time: 17_463_000 picoseconds. - Weight::from_parts(18_283_000, 3941) + // Minimum execution time: 17_142_000 picoseconds. + Weight::from_parts(17_974_000, 3941) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -2204,10 +2200,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: 136_093_000 picoseconds. - Weight::from_parts(138_999_000, 7875) + // Measured: `1969` + // Estimated: `7909` + // Minimum execution time: 135_911_000 picoseconds. + Weight::from_parts(139_088_000, 7909) .saturating_add(T::DbWeight::get().reads(16_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -2217,8 +2213,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_545_000 picoseconds. - Weight::from_parts(2_735_000, 0) + // Minimum execution time: 2_595_000 picoseconds. + Weight::from_parts(2_765_000, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::RootClaimableThreshold` (r:0 w:1) @@ -2227,8 +2223,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_229_000 picoseconds. - Weight::from_parts(5_681_000, 0) + // Minimum execution time: 5_140_000 picoseconds. + Weight::from_parts(5_831_000, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::Owner` (r:1 w:0) @@ -2241,8 +2237,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `899` // Estimated: `4364` - // Minimum execution time: 26_870_000 picoseconds. - Weight::from_parts(28_023_000, 4364) + // Minimum execution time: 27_250_000 picoseconds. + Weight::from_parts(28_202_000, 4364) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -2314,8 +2310,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `2229` // Estimated: `8727` - // Minimum execution time: 945_077_000 picoseconds. - Weight::from_parts(967_308_000, 8727) + // Minimum execution time: 939_851_000 picoseconds. + Weight::from_parts(946_223_000, 8727) .saturating_add(T::DbWeight::get().reads(33_u64)) .saturating_add(T::DbWeight::get().writes(17_u64)) } @@ -2325,8 +2321,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_585_000 picoseconds. - Weight::from_parts(2_805_000, 0) + // Minimum execution time: 2_634_000 picoseconds. + Weight::from_parts(2_886_000, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::Owner` (r:1 w:0) @@ -2367,8 +2363,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1715` // Estimated: `7655` - // Minimum execution time: 114_744_000 picoseconds. - Weight::from_parts(115_995_000, 7655) + // Minimum execution time: 115_915_000 picoseconds. + Weight::from_parts(116_686_000, 7655) .saturating_add(T::DbWeight::get().reads(17_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -2398,8 +2394,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1399` // Estimated: `7339` - // Minimum execution time: 147_815_000 picoseconds. - Weight::from_parts(149_819_000, 7339) + // Minimum execution time: 147_714_000 picoseconds. + Weight::from_parts(149_006_000, 7339) .saturating_add(T::DbWeight::get().reads(14_u64)) .saturating_add(T::DbWeight::get().writes(6_u64)) } @@ -2413,8 +2409,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `950` // Estimated: `4415` - // Minimum execution time: 665_186_000 picoseconds. - Weight::from_parts(684_242_000, 4415) + // Minimum execution time: 665_262_000 picoseconds. + Weight::from_parts(683_967_000, 4415) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -2434,8 +2430,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `975` // Estimated: `4440` - // Minimum execution time: 45_394_000 picoseconds. - Weight::from_parts(46_407_000, 4440) + // Minimum execution time: 44_743_000 picoseconds. + Weight::from_parts(46_106_000, 4440) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -2459,8 +2455,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `899` // Estimated: `4364` - // Minimum execution time: 38_362_000 picoseconds. - Weight::from_parts(39_193_000, 4364) + // Minimum execution time: 37_910_000 picoseconds. + Weight::from_parts(39_443_000, 4364) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -2484,8 +2480,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `982` // Estimated: `4447` - // Minimum execution time: 41_588_000 picoseconds. - Weight::from_parts(42_539_000, 4447) + // Minimum execution time: 41_466_000 picoseconds. + Weight::from_parts(42_479_000, 4447) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -2497,8 +2493,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `733` // Estimated: `4198` - // Minimum execution time: 16_832_000 picoseconds. - Weight::from_parts(17_583_000, 4198) + // Minimum execution time: 16_952_000 picoseconds. + Weight::from_parts(17_353_000, 4198) .saturating_add(T::DbWeight::get().reads(2_u64)) } /// Storage: `SubtensorModule::SubnetOwnerHotkey` (r:1 w:0) @@ -2525,8 +2521,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1731` // Estimated: `7671` - // Minimum execution time: 52_046_000 picoseconds. - Weight::from_parts(52_958_000, 7671) + // Minimum execution time: 52_477_000 picoseconds. + Weight::from_parts(53_489_000, 7671) .saturating_add(T::DbWeight::get().reads(11_u64)) } /// Storage: `SubtensorModule::CommitRevealWeightsEnabled` (r:1 w:0) @@ -2547,8 +2543,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1019` // Estimated: `4484` - // Minimum execution time: 34_995_000 picoseconds. - Weight::from_parts(35_376_000, 4484) + // Minimum execution time: 34_825_000 picoseconds. + Weight::from_parts(35_857_000, 4484) .saturating_add(T::DbWeight::get().reads(7_u64)) } /// Storage: `SubtensorModule::MinDelegateTake` (r:1 w:0) @@ -2561,8 +2557,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `721` // Estimated: `4186` - // Minimum execution time: 14_998_000 picoseconds. - Weight::from_parts(15_378_000, 4186) + // Minimum execution time: 15_038_000 picoseconds. + Weight::from_parts(15_419_000, 4186) .saturating_add(T::DbWeight::get().reads(3_u64)) } /// Storage: `SubtensorModule::Uids` (r:1 w:0) @@ -2575,8 +2571,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `647` // Estimated: `4112` - // Minimum execution time: 18_775_000 picoseconds. - Weight::from_parts(19_035_000, 4112) + // Minimum execution time: 18_795_000 picoseconds. + Weight::from_parts(19_206_000, 4112) .saturating_add(T::DbWeight::get().reads(3_u64)) } /// Storage: `SubtensorModule::Uids` (r:1 w:0) @@ -2588,7 +2584,7 @@ impl WeightInfo for SubstrateWeight { // Measured: `652` // Estimated: `4117` // Minimum execution time: 15_018_000 picoseconds. - Weight::from_parts(15_448_000, 4117) + Weight::from_parts(15_529_000, 4117) .saturating_add(T::DbWeight::get().reads(2_u64)) } } @@ -2673,8 +2669,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1865` // Estimated: `6148` - // Minimum execution time: 343_840_000 picoseconds. - Weight::from_parts(349_872_000, 6148) + // Minimum execution time: 328_388_000 picoseconds. + Weight::from_parts(330_502_000, 6148) .saturating_add(RocksDbWeight::get().reads(34_u64)) .saturating_add(RocksDbWeight::get().writes(29_u64)) } @@ -2716,8 +2712,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `188820` // Estimated: `10327410` - // Minimum execution time: 15_317_357_000 picoseconds. - Weight::from_parts(15_513_610_000, 10327410) + // Minimum execution time: 15_066_222_000 picoseconds. + Weight::from_parts(15_359_235_000, 10327410) .saturating_add(RocksDbWeight::get().reads(4112_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -2787,8 +2783,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `2226` // Estimated: `8727` - // Minimum execution time: 639_698_000 picoseconds. - Weight::from_parts(664_064_000, 8727) + // Minimum execution time: 630_738_000 picoseconds. + Weight::from_parts(657_709_000, 8727) .saturating_add(RocksDbWeight::get().reads(32_u64)) .saturating_add(RocksDbWeight::get().writes(16_u64)) } @@ -2802,8 +2798,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `713` // Estimated: `4178` - // Minimum execution time: 30_307_000 picoseconds. - Weight::from_parts(31_278_000, 4178) + // Minimum execution time: 29_935_000 picoseconds. + Weight::from_parts(31_428_000, 4178) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -2817,8 +2813,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `812` // Estimated: `4277` - // Minimum execution time: 28_262_000 picoseconds. - Weight::from_parts(29_294_000, 4277) + // Minimum execution time: 28_453_000 picoseconds. + Weight::from_parts(29_284_000, 4277) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -2900,8 +2896,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1798` // Estimated: `6148` - // Minimum execution time: 332_358_000 picoseconds. - Weight::from_parts(336_815_000, 6148) + // Minimum execution time: 327_477_000 picoseconds. + Weight::from_parts(331_344_000, 6148) .saturating_add(RocksDbWeight::get().reads(34_u64)) .saturating_add(RocksDbWeight::get().writes(29_u64)) } @@ -2953,8 +2949,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1516` // Estimated: `4981` - // Minimum execution time: 102_089_000 picoseconds. - Weight::from_parts(103_934_000, 4981) + // Minimum execution time: 100_676_000 picoseconds. + Weight::from_parts(103_852_000, 4981) .saturating_add(RocksDbWeight::get().reads(19_u64)) .saturating_add(RocksDbWeight::get().writes(16_u64)) } @@ -2978,8 +2974,6 @@ impl WeightInfo for () { /// Proof: `SubtensorModule::NetworkLockReductionInterval` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::TotalIssuance` (r:1 w:0) /// Proof: `SubtensorModule::TotalIssuance` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `SubtensorModule::BlockEmission` (r:1 w:0) - /// Proof: `SubtensorModule::BlockEmission` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `System::Account` (r:2 w:2) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(104), added: 2579, mode: `MaxEncodedLen`) /// Storage: `SubtensorModule::SubnetMechanism` (r:1 w:1) @@ -3074,9 +3068,9 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1532` // Estimated: `9947` - // Minimum execution time: 271_405_000 picoseconds. - Weight::from_parts(277_125_000, 9947) - .saturating_add(RocksDbWeight::get().reads(40_u64)) + // Minimum execution time: 267_616_000 picoseconds. + Weight::from_parts(272_414_000, 9947) + .saturating_add(RocksDbWeight::get().reads(39_u64)) .saturating_add(RocksDbWeight::get().writes(48_u64)) } /// Storage: `SubtensorModule::NetworksAdded` (r:1 w:0) @@ -3109,8 +3103,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1249` // Estimated: `4714` - // Minimum execution time: 67_886_000 picoseconds. - Weight::from_parts(69_049_000, 4714) + // Minimum execution time: 67_896_000 picoseconds. + Weight::from_parts(69_409_000, 4714) .saturating_add(RocksDbWeight::get().reads(13_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -3156,8 +3150,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1650` // Estimated: `7590` - // Minimum execution time: 109_534_000 picoseconds. - Weight::from_parts(111_227_000, 7590) + // Minimum execution time: 109_312_000 picoseconds. + Weight::from_parts(110_735_000, 7590) .saturating_add(RocksDbWeight::get().reads(19_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -3167,8 +3161,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_570_000 picoseconds. - Weight::from_parts(5_760_000, 0) + // Minimum execution time: 5_200_000 picoseconds. + Weight::from_parts(5_510_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::Owner` (r:1 w:0) @@ -3189,8 +3183,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1033` // Estimated: `4498` - // Minimum execution time: 52_527_000 picoseconds. - Weight::from_parts(53_870_000, 4498) + // Minimum execution time: 52_177_000 picoseconds. + Weight::from_parts(53_178_000, 4498) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -3206,8 +3200,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `694` // Estimated: `4159` - // Minimum execution time: 45_574_000 picoseconds. - Weight::from_parts(47_248_000, 4159) + // Minimum execution time: 46_146_000 picoseconds. + Weight::from_parts(47_278_000, 4159) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -3245,6 +3239,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 +3251,9 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `2110` // Estimated: `13000` - // Minimum execution time: 284_379_000 picoseconds. - Weight::from_parts(288_156_000, 13000) - .saturating_add(RocksDbWeight::get().reads(37_u64)) + // Minimum execution time: 288_044_000 picoseconds. + Weight::from_parts(290_288_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 +3292,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 +3306,9 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `2166` // Estimated: `13056` - // Minimum execution time: 308_323_000 picoseconds. - Weight::from_parts(312_301_000, 13056) - .saturating_add(RocksDbWeight::get().reads(37_u64)) + // Minimum execution time: 309_453_000 picoseconds. + Weight::from_parts(315_114_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 +3319,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `665` // Estimated: `4130` - // Minimum execution time: 22_442_000 picoseconds. - Weight::from_parts(23_293_000, 4130) + // Minimum execution time: 22_261_000 picoseconds. + Weight::from_parts(22_982_000, 4130) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -3334,8 +3332,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `613` // Estimated: `4078` - // Minimum execution time: 18_695_000 picoseconds. - Weight::from_parts(19_496_000, 4078) + // Minimum execution time: 18_805_000 picoseconds. + Weight::from_parts(20_077_000, 4078) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -3347,8 +3345,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 8_335_000 picoseconds. - Weight::from_parts(8_857_000, 0) + // Minimum execution time: 8_095_000 picoseconds. + Weight::from_parts(8_666_000, 0) .saturating_add(RocksDbWeight::get().writes(2_u64)) } /// Storage: `SubtensorModule::CommitRevealWeightsEnabled` (r:1 w:0) @@ -3393,8 +3391,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `2155` // Estimated: `8095` - // Minimum execution time: 412_226_000 picoseconds. - Weight::from_parts(421_363_000, 8095) + // Minimum execution time: 403_027_000 picoseconds. + Weight::from_parts(424_947_000, 8095) .saturating_add(RocksDbWeight::get().reads(19_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -3428,8 +3426,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1754` // Estimated: `5219` - // Minimum execution time: 169_976_000 picoseconds. - Weight::from_parts(172_139_000, 5219) + // Minimum execution time: 171_027_000 picoseconds. + Weight::from_parts(172_711_000, 5219) .saturating_add(RocksDbWeight::get().reads(13_u64)) .saturating_add(RocksDbWeight::get().writes(6_u64)) } @@ -3461,8 +3459,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1754` // Estimated: `5219` - // Minimum execution time: 166_359_000 picoseconds. - Weight::from_parts(168_964_000, 5219) + // Minimum execution time: 166_909_000 picoseconds. + Weight::from_parts(168_933_000, 5219) .saturating_add(RocksDbWeight::get().reads(12_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } @@ -3482,8 +3480,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1118` // Estimated: `4583` - // Minimum execution time: 38_482_000 picoseconds. - Weight::from_parts(39_454_000, 4583) + // Minimum execution time: 38_882_000 picoseconds. + Weight::from_parts(39_442_000, 4583) .saturating_add(RocksDbWeight::get().reads(5_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -3553,8 +3551,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `2226` // Estimated: `8727` - // Minimum execution time: 829_031_000 picoseconds. - Weight::from_parts(853_005_000, 8727) + // Minimum execution time: 810_081_000 picoseconds. + Weight::from_parts(833_084_000, 8727) .saturating_add(RocksDbWeight::get().reads(32_u64)) .saturating_add(RocksDbWeight::get().writes(16_u64)) } @@ -3590,8 +3588,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1979` // Estimated: `7919` - // Minimum execution time: 214_819_000 picoseconds. - Weight::from_parts(216_061_000, 7919) + // Minimum execution time: 210_109_000 picoseconds. + Weight::from_parts(212_274_000, 7919) .saturating_add(RocksDbWeight::get().reads(19_u64)) .saturating_add(RocksDbWeight::get().writes(7_u64)) } @@ -3647,8 +3645,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `2142` // Estimated: `10557` - // Minimum execution time: 544_281_000 picoseconds. - Weight::from_parts(569_198_000, 10557) + // Minimum execution time: 539_440_000 picoseconds. + Weight::from_parts(562_672_000, 10557) .saturating_add(RocksDbWeight::get().reads(28_u64)) .saturating_add(RocksDbWeight::get().writes(13_u64)) } @@ -3702,8 +3700,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `2176` // Estimated: `10591` - // Minimum execution time: 717_343_000 picoseconds. - Weight::from_parts(740_696_000, 10591) + // Minimum execution time: 713_632_000 picoseconds. + Weight::from_parts(740_663_000, 10591) .saturating_add(RocksDbWeight::get().reads(27_u64)) .saturating_add(RocksDbWeight::get().writes(13_u64)) } @@ -3775,8 +3773,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `2662` // Estimated: `11077` - // Minimum execution time: 921_853_000 picoseconds. - Weight::from_parts(944_515_000, 11077) + // Minimum execution time: 920_946_000 picoseconds. + Weight::from_parts(928_060_000, 11077) .saturating_add(RocksDbWeight::get().reads(47_u64)) .saturating_add(RocksDbWeight::get().writes(24_u64)) } @@ -3802,8 +3800,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 +3812,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_634_000 picoseconds. + Weight::from_parts(246_506_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 +3887,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `2505` // Estimated: `10920` - // Minimum execution time: 717_052_000 picoseconds. - Weight::from_parts(742_019_000, 10920) + // Minimum execution time: 696_210_000 picoseconds. + Weight::from_parts(723_230_000, 10920) .saturating_add(RocksDbWeight::get().reads(47_u64)) .saturating_add(RocksDbWeight::get().writes(24_u64)) } @@ -3930,8 +3926,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1300` // Estimated: `4765` - // Minimum execution time: 144_628_000 picoseconds. - Weight::from_parts(147_224_000, 4765) + // Minimum execution time: 143_045_000 picoseconds. + Weight::from_parts(144_588_000, 4765) .saturating_add(RocksDbWeight::get().reads(15_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -3971,8 +3967,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1455` // Estimated: `7395` - // Minimum execution time: 100_516_000 picoseconds. - Weight::from_parts(103_092_000, 7395) + // Minimum execution time: 99_704_000 picoseconds. + Weight::from_parts(102_130_000, 7395) .saturating_add(RocksDbWeight::get().reads(16_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -3988,8 +3984,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `830` // Estimated: `4295` - // Minimum execution time: 29_324_000 picoseconds. - Weight::from_parts(29_895_000, 4295) + // Minimum execution time: 28_883_000 picoseconds. + Weight::from_parts(30_347_000, 4295) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -4007,8 +4003,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `923` // Estimated: `4388` - // Minimum execution time: 36_257_000 picoseconds. - Weight::from_parts(37_710_000, 4388) + // Minimum execution time: 35_906_000 picoseconds. + Weight::from_parts(36_938_000, 4388) .saturating_add(RocksDbWeight::get().reads(5_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -4032,8 +4028,6 @@ impl WeightInfo for () { /// Proof: `SubtensorModule::NetworkLockReductionInterval` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::TotalIssuance` (r:1 w:0) /// Proof: `SubtensorModule::TotalIssuance` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `SubtensorModule::BlockEmission` (r:1 w:0) - /// Proof: `SubtensorModule::BlockEmission` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::SubnetMechanism` (r:1 w:1) /// Proof: `SubtensorModule::SubnetMechanism` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::SubnetAlphaIn` (r:1 w:1) @@ -4128,9 +4122,9 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1468` // Estimated: `9883` - // Minimum execution time: 270_502_000 picoseconds. - Weight::from_parts(275_041_000, 9883) - .saturating_add(RocksDbWeight::get().reads(39_u64)) + // Minimum execution time: 268_618_000 picoseconds. + Weight::from_parts(275_570_000, 9883) + .saturating_add(RocksDbWeight::get().reads(38_u64)) .saturating_add(RocksDbWeight::get().writes(47_u64)) } /// Storage: `SubtensorModule::Uids` (r:1 w:0) @@ -4143,8 +4137,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `684` // Estimated: `4149` - // Minimum execution time: 29_786_000 picoseconds. - Weight::from_parts(30_617_000, 4149) + // Minimum execution time: 29_695_000 picoseconds. + Weight::from_parts(30_757_000, 4149) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -4158,8 +4152,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `889` // Estimated: `6829` - // Minimum execution time: 31_168_000 picoseconds. - Weight::from_parts(32_040_000, 6829) + // Minimum execution time: 31_669_000 picoseconds. + Weight::from_parts(32_631_000, 6829) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -4171,8 +4165,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `595` // Estimated: `4060` - // Minimum execution time: 17_122_000 picoseconds. - Weight::from_parts(17_513_000, 4060) + // Minimum execution time: 17_793_000 picoseconds. + Weight::from_parts(18_304_000, 4060) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -4254,8 +4248,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `3172` // Estimated: `28912` - // Minimum execution time: 1_227_100_000 picoseconds. - Weight::from_parts(1_242_038_000, 28912) + // Minimum execution time: 1_209_451_000 picoseconds. + Weight::from_parts(1_220_841_000, 28912) .saturating_add(RocksDbWeight::get().reads(182_u64)) .saturating_add(RocksDbWeight::get().writes(99_u64)) } @@ -4269,8 +4263,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `818` // Estimated: `4283` - // Minimum execution time: 24_556_000 picoseconds. - Weight::from_parts(25_337_000, 4283) + // Minimum execution time: 25_246_000 picoseconds. + Weight::from_parts(25_878_000, 4283) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -4284,8 +4278,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `774` // Estimated: `9189` - // Minimum execution time: 25_918_000 picoseconds. - Weight::from_parts(26_830_000, 9189) + // Minimum execution time: 27_030_000 picoseconds. + Weight::from_parts(28_102_000, 9189) .saturating_add(RocksDbWeight::get().reads(6_u64)) } /// Storage: `SubtensorModule::Owner` (r:1 w:0) @@ -4346,8 +4340,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `2235` // Estimated: `11306` - // Minimum execution time: 674_042_000 picoseconds. - Weight::from_parts(700_873_000, 11306) + // Minimum execution time: 667_567_000 picoseconds. + Weight::from_parts(691_331_000, 11306) .saturating_add(RocksDbWeight::get().reads(43_u64)) .saturating_add(RocksDbWeight::get().writes(25_u64)) } @@ -4401,8 +4395,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `2176` // Estimated: `10591` - // Minimum execution time: 731_620_000 picoseconds. - Weight::from_parts(754_292_000, 10591) + // Minimum execution time: 721_907_000 picoseconds. + Weight::from_parts(749_488_000, 10591) .saturating_add(RocksDbWeight::get().reads(27_u64)) .saturating_add(RocksDbWeight::get().writes(13_u64)) } @@ -4434,8 +4428,6 @@ impl WeightInfo for () { /// Proof: `SubtensorModule::NetworkLockReductionInterval` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::TotalIssuance` (r:1 w:0) /// Proof: `SubtensorModule::TotalIssuance` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `SubtensorModule::BlockEmission` (r:1 w:0) - /// Proof: `SubtensorModule::BlockEmission` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::SubnetMechanism` (r:1 w:1) /// Proof: `SubtensorModule::SubnetMechanism` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SubtensorModule::SubnetAlphaIn` (r:1 w:1) @@ -4541,11 +4533,11 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1835 + k * (44 ±0)` // Estimated: `10256 + k * (2579 ±0)` - // Minimum execution time: 475_774_000 picoseconds. - Weight::from_parts(309_598_986, 10256) - // Standard Error: 26_969 - .saturating_add(Weight::from_parts(46_027_026, 0).saturating_mul(k.into())) - .saturating_add(RocksDbWeight::get().reads(49_u64)) + // Minimum execution time: 472_506_000 picoseconds. + Weight::from_parts(230_127_504, 10256) + // Standard Error: 51_934 + .saturating_add(Weight::from_parts(46_730_014, 0).saturating_mul(k.into())) + .saturating_add(RocksDbWeight::get().reads(48_u64)) .saturating_add(RocksDbWeight::get().reads((2_u64).saturating_mul(k.into()))) .saturating_add(RocksDbWeight::get().writes(53_u64)) .saturating_add(RocksDbWeight::get().writes((2_u64).saturating_mul(k.into()))) @@ -4574,10 +4566,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1501 + k * (53 ±0)` // Estimated: `6148 + k * (2529 ±0)` - // Minimum execution time: 127_077_000 picoseconds. - Weight::from_parts(146_402_779, 6148) - // Standard Error: 3_377 - .saturating_add(Weight::from_parts(1_566_532, 0).saturating_mul(k.into())) + // Minimum execution time: 93_584_000 picoseconds. + Weight::from_parts(94_083_076, 6148) + // Standard Error: 6_178 + .saturating_add(Weight::from_parts(1_554_561, 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 +4584,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `659` // Estimated: `9074` - // Minimum execution time: 27_300_000 picoseconds. - Weight::from_parts(28_313_000, 9074) + // Minimum execution time: 26_389_000 picoseconds. + Weight::from_parts(28_382_000, 9074) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -4629,8 +4621,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1248` // Estimated: `4713` - // Minimum execution time: 85_228_000 picoseconds. - Weight::from_parts(86_951_000, 4713) + // Minimum execution time: 84_036_000 picoseconds. + Weight::from_parts(85_989_000, 4713) .saturating_add(RocksDbWeight::get().reads(14_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -4646,8 +4638,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `809` // Estimated: `4274` - // Minimum execution time: 32_871_000 picoseconds. - Weight::from_parts(33_853_000, 4274) + // Minimum execution time: 33_031_000 picoseconds. + Weight::from_parts(33_852_000, 4274) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -4663,8 +4655,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `476` // Estimated: `3941` - // Minimum execution time: 17_463_000 picoseconds. - Weight::from_parts(18_283_000, 3941) + // Minimum execution time: 17_142_000 picoseconds. + Weight::from_parts(17_974_000, 3941) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } @@ -4692,10 +4684,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: 136_093_000 picoseconds. - Weight::from_parts(138_999_000, 7875) + // Measured: `1969` + // Estimated: `7909` + // Minimum execution time: 135_911_000 picoseconds. + Weight::from_parts(139_088_000, 7909) .saturating_add(RocksDbWeight::get().reads(16_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } @@ -4705,8 +4697,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_545_000 picoseconds. - Weight::from_parts(2_735_000, 0) + // Minimum execution time: 2_595_000 picoseconds. + Weight::from_parts(2_765_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::RootClaimableThreshold` (r:0 w:1) @@ -4715,8 +4707,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_229_000 picoseconds. - Weight::from_parts(5_681_000, 0) + // Minimum execution time: 5_140_000 picoseconds. + Weight::from_parts(5_831_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::Owner` (r:1 w:0) @@ -4729,8 +4721,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `899` // Estimated: `4364` - // Minimum execution time: 26_870_000 picoseconds. - Weight::from_parts(28_023_000, 4364) + // Minimum execution time: 27_250_000 picoseconds. + Weight::from_parts(28_202_000, 4364) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -4802,8 +4794,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `2229` // Estimated: `8727` - // Minimum execution time: 945_077_000 picoseconds. - Weight::from_parts(967_308_000, 8727) + // Minimum execution time: 939_851_000 picoseconds. + Weight::from_parts(946_223_000, 8727) .saturating_add(RocksDbWeight::get().reads(33_u64)) .saturating_add(RocksDbWeight::get().writes(17_u64)) } @@ -4813,8 +4805,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_585_000 picoseconds. - Weight::from_parts(2_805_000, 0) + // Minimum execution time: 2_634_000 picoseconds. + Weight::from_parts(2_886_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `SubtensorModule::Owner` (r:1 w:0) @@ -4855,8 +4847,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1715` // Estimated: `7655` - // Minimum execution time: 114_744_000 picoseconds. - Weight::from_parts(115_995_000, 7655) + // Minimum execution time: 115_915_000 picoseconds. + Weight::from_parts(116_686_000, 7655) .saturating_add(RocksDbWeight::get().reads(17_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -4886,8 +4878,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1399` // Estimated: `7339` - // Minimum execution time: 147_815_000 picoseconds. - Weight::from_parts(149_819_000, 7339) + // Minimum execution time: 147_714_000 picoseconds. + Weight::from_parts(149_006_000, 7339) .saturating_add(RocksDbWeight::get().reads(14_u64)) .saturating_add(RocksDbWeight::get().writes(6_u64)) } @@ -4901,8 +4893,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `950` // Estimated: `4415` - // Minimum execution time: 665_186_000 picoseconds. - Weight::from_parts(684_242_000, 4415) + // Minimum execution time: 665_262_000 picoseconds. + Weight::from_parts(683_967_000, 4415) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -4922,8 +4914,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `975` // Estimated: `4440` - // Minimum execution time: 45_394_000 picoseconds. - Weight::from_parts(46_407_000, 4440) + // Minimum execution time: 44_743_000 picoseconds. + Weight::from_parts(46_106_000, 4440) .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -4947,8 +4939,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `899` // Estimated: `4364` - // Minimum execution time: 38_362_000 picoseconds. - Weight::from_parts(39_193_000, 4364) + // Minimum execution time: 37_910_000 picoseconds. + Weight::from_parts(39_443_000, 4364) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -4972,8 +4964,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `982` // Estimated: `4447` - // Minimum execution time: 41_588_000 picoseconds. - Weight::from_parts(42_539_000, 4447) + // Minimum execution time: 41_466_000 picoseconds. + Weight::from_parts(42_479_000, 4447) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -4985,8 +4977,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `733` // Estimated: `4198` - // Minimum execution time: 16_832_000 picoseconds. - Weight::from_parts(17_583_000, 4198) + // Minimum execution time: 16_952_000 picoseconds. + Weight::from_parts(17_353_000, 4198) .saturating_add(RocksDbWeight::get().reads(2_u64)) } /// Storage: `SubtensorModule::SubnetOwnerHotkey` (r:1 w:0) @@ -5013,8 +5005,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1731` // Estimated: `7671` - // Minimum execution time: 52_046_000 picoseconds. - Weight::from_parts(52_958_000, 7671) + // Minimum execution time: 52_477_000 picoseconds. + Weight::from_parts(53_489_000, 7671) .saturating_add(RocksDbWeight::get().reads(11_u64)) } /// Storage: `SubtensorModule::CommitRevealWeightsEnabled` (r:1 w:0) @@ -5035,8 +5027,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1019` // Estimated: `4484` - // Minimum execution time: 34_995_000 picoseconds. - Weight::from_parts(35_376_000, 4484) + // Minimum execution time: 34_825_000 picoseconds. + Weight::from_parts(35_857_000, 4484) .saturating_add(RocksDbWeight::get().reads(7_u64)) } /// Storage: `SubtensorModule::MinDelegateTake` (r:1 w:0) @@ -5049,8 +5041,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `721` // Estimated: `4186` - // Minimum execution time: 14_998_000 picoseconds. - Weight::from_parts(15_378_000, 4186) + // Minimum execution time: 15_038_000 picoseconds. + Weight::from_parts(15_419_000, 4186) .saturating_add(RocksDbWeight::get().reads(3_u64)) } /// Storage: `SubtensorModule::Uids` (r:1 w:0) @@ -5063,8 +5055,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `647` // Estimated: `4112` - // Minimum execution time: 18_775_000 picoseconds. - Weight::from_parts(19_035_000, 4112) + // Minimum execution time: 18_795_000 picoseconds. + Weight::from_parts(19_206_000, 4112) .saturating_add(RocksDbWeight::get().reads(3_u64)) } /// Storage: `SubtensorModule::Uids` (r:1 w:0) @@ -5076,7 +5068,7 @@ impl WeightInfo for () { // Measured: `652` // Estimated: `4117` // Minimum execution time: 15_018_000 picoseconds. - Weight::from_parts(15_448_000, 4117) + Weight::from_parts(15_529_000, 4117) .saturating_add(RocksDbWeight::get().reads(2_u64)) } } diff --git a/pallets/transaction-fee/src/tests/mod.rs b/pallets/transaction-fee/src/tests/mod.rs index f452634cfe..20b1247938 100644 --- a/pallets/transaction-fee/src/tests/mod.rs +++ b/pallets/transaction-fee/src/tests/mod.rs @@ -10,6 +10,7 @@ use sp_runtime::{ transaction_validity::{InvalidTransaction, TransactionValidityError}, }; use subtensor_runtime_common::AlphaBalance; +use subtensor_swap_interface::SwapHandler; use mock::*; mod mock; @@ -1258,6 +1259,135 @@ fn test_transfer_stake_fees_alpha() { }); } +// cargo test --package subtensor-transaction-fee --lib -- tests::test_transfer_stake_full_amount_fails_when_alpha_fee_reduces_available_stake --exact --show-output +#[test] +fn test_transfer_stake_full_amount_fails_when_alpha_fee_reduces_available_stake() { + new_test_ext().execute_with(|| { + let destination_coldkey = U256::from(100000); + let stake_amount = TAO; + let sn = setup_subnets(2, 2); + setup_stake( + sn.subnets[0].netuid, + &sn.coldkey, + &sn.hotkeys[0], + stake_amount, + ); + + let current_balance = Balances::free_balance(sn.coldkey); + remove_balance_from_coldkey_account(&sn.coldkey, current_balance); + assert_eq!(Balances::free_balance(sn.coldkey), TaoBalance::ZERO); + + let alpha_before = SubtensorModule::get_stake_for_hotkey_and_coldkey_on_subnet( + &sn.hotkeys[0], + &sn.coldkey, + sn.subnets[0].netuid, + ); + let call = RuntimeCall::SubtensorModule(pallet_subtensor::Call::transfer_stake { + destination_coldkey, + hotkey: sn.hotkeys[0], + origin_netuid: sn.subnets[0].netuid, + destination_netuid: sn.subnets[1].netuid, + alpha_amount: alpha_before, + }); + let info = call.get_dispatch_info(); + let ext = pallet_transaction_payment::ChargeTransactionPayment::::from(0.into()); + + let inner = ext + .dispatch_transaction(RuntimeOrigin::signed(sn.coldkey).into(), call, &info, 0, 0) + .expect("alpha fee payment should validate"); + assert_eq!( + inner.unwrap_err().error, + Error::::NotEnoughStakeToWithdraw.into() + ); + + let alpha_after = SubtensorModule::get_stake_for_hotkey_and_coldkey_on_subnet( + &sn.hotkeys[0], + &sn.coldkey, + sn.subnets[0].netuid, + ); + let actual_alpha_fee = alpha_before - alpha_after; + assert!(actual_alpha_fee > AlphaBalance::ZERO); + assert_eq!( + SubtensorModule::get_stake_for_hotkey_and_coldkey_on_subnet( + &sn.hotkeys[0], + &destination_coldkey, + sn.subnets[1].netuid, + ), + AlphaBalance::ZERO + ); + }); + + new_test_ext().execute_with(|| { + let destination_coldkey = U256::from(100000); + let stake_amount = TAO; + let sn = setup_subnets(2, 2); + setup_stake( + sn.subnets[0].netuid, + &sn.coldkey, + &sn.hotkeys[0], + stake_amount, + ); + + let current_balance = Balances::free_balance(sn.coldkey); + remove_balance_from_coldkey_account(&sn.coldkey, current_balance); + assert_eq!(Balances::free_balance(sn.coldkey), TaoBalance::ZERO); + + let alpha_before = SubtensorModule::get_stake_for_hotkey_and_coldkey_on_subnet( + &sn.hotkeys[0], + &sn.coldkey, + sn.subnets[0].netuid, + ); + let full_amount_call = + RuntimeCall::SubtensorModule(pallet_subtensor::Call::transfer_stake { + destination_coldkey, + hotkey: sn.hotkeys[0], + origin_netuid: sn.subnets[0].netuid, + destination_netuid: sn.subnets[1].netuid, + alpha_amount: alpha_before, + }); + let info = full_amount_call.get_dispatch_info(); + let tao_fee = pallet_transaction_payment::Pallet::::compute_fee(0, &info, 0.into()); + let alpha_fee = pallet_subtensor_swap::Pallet::::get_alpha_amount_for_tao( + sn.subnets[0].netuid, + tao_fee, + ); + assert!(alpha_fee > AlphaBalance::ZERO); + + let transfer_amount = alpha_before - alpha_fee; + let call = RuntimeCall::SubtensorModule(pallet_subtensor::Call::transfer_stake { + destination_coldkey, + hotkey: sn.hotkeys[0], + origin_netuid: sn.subnets[0].netuid, + destination_netuid: sn.subnets[1].netuid, + alpha_amount: transfer_amount, + }); + let info = call.get_dispatch_info(); + let ext = pallet_transaction_payment::ChargeTransactionPayment::::from(0.into()); + + let inner = ext + .dispatch_transaction(RuntimeOrigin::signed(sn.coldkey).into(), call, &info, 0, 0) + .expect("alpha fee payment should validate"); + assert_ok!(inner); + + assert_eq!(Balances::free_balance(sn.coldkey), TaoBalance::ZERO); + assert_eq!( + SubtensorModule::get_stake_for_hotkey_and_coldkey_on_subnet( + &sn.hotkeys[0], + &sn.coldkey, + sn.subnets[0].netuid, + ), + AlphaBalance::ZERO + ); + assert!( + SubtensorModule::get_stake_for_hotkey_and_coldkey_on_subnet( + &sn.hotkeys[0], + &destination_coldkey, + sn.subnets[1].netuid, + ) > AlphaBalance::ZERO + ); + }); +} + // cargo test --package subtensor-transaction-fee --lib -- tests::test_swap_stake_fees_alpha --exact --show-output #[test] fn test_swap_stake_fees_alpha() { diff --git a/pallets/utility/src/weights.rs b/pallets/utility/src/weights.rs index 928aef0269..f8b6187fa8 100644 --- a/pallets/utility/src/weights.rs +++ b/pallets/utility/src/weights.rs @@ -22,7 +22,7 @@ // --no-storage-info // --no-min-squares // --no-median-slopes -// --output=/tmp/tmp.5J6YDU3hE3 +// --output=/tmp/tmp.cSCDxV4Ihz // --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_638_000 picoseconds. - Weight::from_parts(19_446_696, 3983) - // Standard Error: 1_676 - .saturating_add(Weight::from_parts(5_450_264, 0).saturating_mul(c.into())) + // Minimum execution time: 5_059_000 picoseconds. + Weight::from_parts(17_296_401, 3983) + // Standard Error: 1_652 + .saturating_add(Weight::from_parts(6_062_970, 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_878_000 picoseconds. - Weight::from_parts(15_378_000, 3983) + // Minimum execution time: 15_679_000 picoseconds. + Weight::from_parts(16_070_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_588_000 picoseconds. - Weight::from_parts(13_428_230, 3983) - // Standard Error: 2_092 - .saturating_add(Weight::from_parts(5_663_250, 0).saturating_mul(c.into())) + // Minimum execution time: 5_100_000 picoseconds. + Weight::from_parts(21_219_754, 3983) + // Standard Error: 2_134 + .saturating_add(Weight::from_parts(6_279_706, 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_542_000 picoseconds. - Weight::from_parts(6_893_000, 0) + // Minimum execution time: 7_184_000 picoseconds. + Weight::from_parts(7_484_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_699_000 picoseconds. - Weight::from_parts(12_134_867, 3983) - // Standard Error: 3_490 - .saturating_add(Weight::from_parts(5_477_293, 0).saturating_mul(c.into())) + // Minimum execution time: 5_070_000 picoseconds. + Weight::from_parts(21_829_014, 3983) + // Standard Error: 2_304 + .saturating_add(Weight::from_parts(6_047_455, 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_813_000 picoseconds. - Weight::from_parts(7_113_000, 0) + // Minimum execution time: 7_094_000 picoseconds. + Weight::from_parts(7_434_000, 0) } /// Storage: `SafeMode::EnteredUntil` (r:1 w:0) /// Proof: `SafeMode::EnteredUntil` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) @@ -127,8 +127,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `518` // Estimated: `3983` - // Minimum execution time: 21_140_000 picoseconds. - Weight::from_parts(21_831_000, 3983) + // Minimum execution time: 22_653_000 picoseconds. + Weight::from_parts(23_143_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_638_000 picoseconds. - Weight::from_parts(19_446_696, 3983) - // Standard Error: 1_676 - .saturating_add(Weight::from_parts(5_450_264, 0).saturating_mul(c.into())) + // Minimum execution time: 5_059_000 picoseconds. + Weight::from_parts(17_296_401, 3983) + // Standard Error: 1_652 + .saturating_add(Weight::from_parts(6_062_970, 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_878_000 picoseconds. - Weight::from_parts(15_378_000, 3983) + // Minimum execution time: 15_679_000 picoseconds. + Weight::from_parts(16_070_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_588_000 picoseconds. - Weight::from_parts(13_428_230, 3983) - // Standard Error: 2_092 - .saturating_add(Weight::from_parts(5_663_250, 0).saturating_mul(c.into())) + // Minimum execution time: 5_100_000 picoseconds. + Weight::from_parts(21_219_754, 3983) + // Standard Error: 2_134 + .saturating_add(Weight::from_parts(6_279_706, 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_542_000 picoseconds. - Weight::from_parts(6_893_000, 0) + // Minimum execution time: 7_184_000 picoseconds. + Weight::from_parts(7_484_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_699_000 picoseconds. - Weight::from_parts(12_134_867, 3983) - // Standard Error: 3_490 - .saturating_add(Weight::from_parts(5_477_293, 0).saturating_mul(c.into())) + // Minimum execution time: 5_070_000 picoseconds. + Weight::from_parts(21_829_014, 3983) + // Standard Error: 2_304 + .saturating_add(Weight::from_parts(6_047_455, 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_813_000 picoseconds. - Weight::from_parts(7_113_000, 0) + // Minimum execution time: 7_094_000 picoseconds. + Weight::from_parts(7_434_000, 0) } /// Storage: `SafeMode::EnteredUntil` (r:1 w:0) /// Proof: `SafeMode::EnteredUntil` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) @@ -214,8 +214,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `518` // Estimated: `3983` - // Minimum execution time: 21_140_000 picoseconds. - Weight::from_parts(21_831_000, 3983) + // Minimum execution time: 22_653_000 picoseconds. + Weight::from_parts(23_143_000, 3983) .saturating_add(RocksDbWeight::get().reads(2_u64)) } } diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index a39c473880..ac4da43b3b 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -234,7 +234,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: 423, + spec_version: 424, impl_version: 1, apis: RUNTIME_API_VERSIONS, transaction_version: 1, @@ -669,7 +669,6 @@ subtensor_macros::define_proxy_filters! { SubtensorModule::update_symbol, } except { AdminUtils::sudo_set_sn_owner_hotkey, - AdminUtils::sudo_set_subnet_owner_hotkey, } NonCritical => deny { @@ -2537,6 +2536,13 @@ impl_runtime_apis! { fn get_next_epoch_start_block(netuid: NetUid) -> Option { SubtensorModule::get_next_epoch_start_block(netuid) } + + fn get_block_emission() -> TaoBalance { + match SubtensorModule::calculate_block_emission() { + Ok(block_emission) => block_emission.into(), + Err(_) => TaoBalance::ZERO, + } + } } impl subtensor_custom_rpc_runtime_api::StakeInfoRuntimeApi for Runtime { diff --git a/runtime/tests/ghsa_repro.rs b/runtime/tests/ghsa_repro.rs index aa8651ba75..f153fc83ec 100644 --- a/runtime/tests/ghsa_repro.rs +++ b/runtime/tests/ghsa_repro.rs @@ -73,12 +73,6 @@ fn set_sn_owner_hotkey_c67() -> RuntimeCall { hotkey: acct(), }) } -fn set_subnet_owner_hotkey_c64() -> RuntimeCall { - RuntimeCall::AdminUtils(pallet_admin_utils::Call::sudo_set_subnet_owner_hotkey { - netuid: Default::default(), - hotkey: acct(), - }) -} /// GHSA-2026-001 — NonTransfer and NonFungible proxies (the two "cannot move my funds" /// types) ALLOW the new coldkey-swap lifecycle, so a restricted delegate can take over @@ -149,17 +143,10 @@ fn ghsa_2026_002_nonfungible_allows_swap_hotkey_v2_gap() { } /// GHSA-2026-003 — the Owner proxy excepts sudo_set_sn_owner_hotkey (call 67) but the -/// duplicate alias sudo_set_subnet_owner_hotkey (call 64) is allowed by the AdminUtils::* -/// wildcard, bypassing the carve-out. #[test] fn ghsa_2026_003_owner_proxy_set_owner_hotkey_alias_bypass() { assert!( !ProxyType::Owner.filter(&set_sn_owner_hotkey_c67()), "precondition: Owner correctly excepts sudo_set_sn_owner_hotkey (call 67)" ); - assert!( - !ProxyType::Owner.filter(&set_subnet_owner_hotkey_c64()), - "regression (GHSA-2026-003 fixed): Owner must DENY the alias sudo_set_subnet_owner_hotkey (call 64), \ - which calls the same do_set_sn_owner_hotkey backend" - ); }