diff --git a/pallets/staking/src/benchmarking.rs b/pallets/staking/src/benchmarking.rs index 986ad2f98..d31e956af 100644 --- a/pallets/staking/src/benchmarking.rs +++ b/pallets/staking/src/benchmarking.rs @@ -370,7 +370,13 @@ benchmarks! { let caller: T::AccountId = whitelisted_caller(); let validator_ids = create_validators::(100, 1); - let signers_ids = create_validators::((MAX_SIGNERS - 1) as u32, SEED); + let second_signer: T::AccountId = account("second_signer", 0, SEED); + let second_signer_id = + ::ValidatorId::try_from(second_signer.clone()) + .or(Err(Error::::InvalidValidatorId)) + .unwrap(); + // let mut signers = //create_validators::((MAX_SIGNERS - 1) as u32, SEED); + let mut signers = vec![second_signer_id.clone(); c as usize]; // For the purpose of the bench these values don't actually matter, we just care that there's a // storage entry available @@ -384,30 +390,15 @@ benchmarks! { .or(Err(Error::::InvalidValidatorId)) .unwrap(); - let second_signer: T::AccountId = account("second_signer", 10000000, SEED); - let second_signer_id = - ::ValidatorId::try_from(second_signer.clone()) - .or(Err(Error::::InvalidValidatorId)) - .unwrap(); - - // full signer list leaving room for one extra validator - let mut signers = signers_ids; // place new signer in the signers struct in different locations to calculate random selection // re-run // as well validators may be dropped before chosen - signers[l as usize % c as usize] = validator_id.clone(); - - // for signer in signers.clone() { - // validator_ids[l as usize % c as usize] = signer - // } - for i in 0 .. v { - if i as usize > signers.len() - 1 { - break; - } + signers[l as usize % c as usize] = validator_ids[l as usize % c as usize].clone(); + + for i in 0 .. c { signers[i as usize] = validator_ids[i as usize].clone(); } Signers::::put(signers.clone()); - signers.push(second_signer_id.clone()); }: { let _ = Staking::::new_session_handler(&validator_ids); } diff --git a/pallets/staking/src/lib.rs b/pallets/staking/src/lib.rs index dd5a5aba3..64e0a7e83 100644 --- a/pallets/staking/src/lib.rs +++ b/pallets/staking/src/lib.rs @@ -779,7 +779,11 @@ pub mod pallet { jump_start_details.parent_key_threshold = signers_info.threshold }); - weight = ::WeightInfo::new_session(current_signers.len() as u32, count); + weight = ::WeightInfo::new_session( + current_signers.len() as u32, + count, + remove_index_len as u32, + ); Ok(weight) } diff --git a/pallets/staking/src/weights.rs b/pallets/staking/src/weights.rs index f14dd2dec..576eec409 100644 --- a/pallets/staking/src/weights.rs +++ b/pallets/staking/src/weights.rs @@ -62,7 +62,7 @@ pub trait WeightInfo { fn confirm_key_reshare_confirmed(c: u32) -> Weight; fn confirm_key_reshare_completed() -> Weight; fn new_session_base_weight(s: u32) -> Weight; - fn new_session(c: u32, l: u32) -> Weight; + fn new_session(c: u32, l: u32, v: u32) -> Weight; fn on_initialize(s: u32, ) -> Weight; } @@ -299,13 +299,18 @@ impl WeightInfo for SubstrateWeight { } /// Storage: `StakingExtension::Signers` (r:1 w:0) /// Proof: `StakingExtension::Signers` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Parameters::SignersInfo` (r:1 w:0) + /// Proof: `Parameters::SignersInfo` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// The range of component `s` is `[2, 15]`. fn new_session_base_weight(s: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `254 + s * (32 ±0)` - // Estimated: `1739 + s * (32 ±0)` - // Minimum execution time: 7_000_000 picoseconds. - Weight::from_parts(7_682_879, 0) - .saturating_add(Weight::from_parts(0, 1739)) + // Measured: `266 + s * (32 ±0)` + // Estimated: `1751 + s * (32 ±0)` + // Minimum execution time: 5_000_000 picoseconds. + Weight::from_parts(5_772_373, 0) + .saturating_add(Weight::from_parts(0, 1751)) + // Standard Error: 22_735 + .saturating_add(Weight::from_parts(15_564, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(Weight::from_parts(0, 32).saturating_mul(s.into())) } @@ -313,32 +318,31 @@ impl WeightInfo for SubstrateWeight { /// Proof: `StakingExtension::Signers` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `Parameters::SignersInfo` (r:1 w:0) /// Proof: `Parameters::SignersInfo` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `Babe::NextRandomness` (r:1 w:0) - /// Proof: `Babe::NextRandomness` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`) - /// Storage: `Babe::EpochStart` (r:1 w:0) - /// Proof: `Babe::EpochStart` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) /// Storage: `StakingExtension::JumpStartProgress` (r:1 w:1) /// Proof: `StakingExtension::JumpStartProgress` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `StakingExtension::ReshareData` (r:0 w:1) /// Proof: `StakingExtension::ReshareData` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `StakingExtension::NextSigners` (r:0 w:1) /// Proof: `StakingExtension::NextSigners` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Babe::NextRandomness` (r:1 w:0) + /// Proof: `Babe::NextRandomness` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`) + /// Storage: `Babe::EpochStart` (r:1 w:0) + /// Proof: `Babe::EpochStart` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) /// The range of component `c` is `[1, 14]`. /// The range of component `l` is `[0, 15]`. - fn new_session(c: u32, l: u32, ) -> Weight { + /// The range of component `v` is `[0, 15]`. + fn new_session(c: u32, l: u32, v: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `482 + c * (32 ±0)` - // Estimated: `1966 + c * (32 ±0)` - // Minimum execution time: 13_000_000 picoseconds. - Weight::from_parts(12_791_889, 0) - .saturating_add(Weight::from_parts(0, 1966)) - // Standard Error: 22_917 - .saturating_add(Weight::from_parts(65_067, 0).saturating_mul(c.into())) - // Standard Error: 19_636 - .saturating_add(Weight::from_parts(30_071, 0).saturating_mul(l.into())) + // Measured: `508 + c * (16 ±0)` + // Estimated: `2027 + c * (16 ±1) + l * (50 ±0) + v * (50 ±0)` + // Minimum execution time: 9_000_000 picoseconds. + Weight::from_parts(17_877_994, 0) + .saturating_add(Weight::from_parts(0, 2027)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(3)) - .saturating_add(Weight::from_parts(0, 32).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(0, 16).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(0, 50).saturating_mul(l.into())) + .saturating_add(Weight::from_parts(0, 50).saturating_mul(v.into())) } /// Storage: `StakingExtension::ValidationQueue` (r:251 w:250) /// Proof: `StakingExtension::ValidationQueue` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -598,13 +602,18 @@ impl WeightInfo for () { } /// Storage: `StakingExtension::Signers` (r:1 w:0) /// Proof: `StakingExtension::Signers` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Parameters::SignersInfo` (r:1 w:0) + /// Proof: `Parameters::SignersInfo` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// The range of component `s` is `[2, 15]`. fn new_session_base_weight(s: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `254 + s * (32 ±0)` - // Estimated: `1739 + s * (32 ±0)` - // Minimum execution time: 7_000_000 picoseconds. - Weight::from_parts(7_682_879, 0) - .saturating_add(Weight::from_parts(0, 1739)) + // Measured: `266 + s * (32 ±0)` + // Estimated: `1751 + s * (32 ±0)` + // Minimum execution time: 5_000_000 picoseconds. + Weight::from_parts(5_772_373, 0) + .saturating_add(Weight::from_parts(0, 1751)) + // Standard Error: 22_735 + .saturating_add(Weight::from_parts(15_564, 0).saturating_mul(s.into())) .saturating_add(RocksDbWeight::get().reads(2)) .saturating_add(Weight::from_parts(0, 32).saturating_mul(s.into())) } @@ -612,32 +621,31 @@ impl WeightInfo for () { /// Proof: `StakingExtension::Signers` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `Parameters::SignersInfo` (r:1 w:0) /// Proof: `Parameters::SignersInfo` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `Babe::NextRandomness` (r:1 w:0) - /// Proof: `Babe::NextRandomness` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`) - /// Storage: `Babe::EpochStart` (r:1 w:0) - /// Proof: `Babe::EpochStart` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) /// Storage: `StakingExtension::JumpStartProgress` (r:1 w:1) /// Proof: `StakingExtension::JumpStartProgress` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `StakingExtension::ReshareData` (r:0 w:1) /// Proof: `StakingExtension::ReshareData` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `StakingExtension::NextSigners` (r:0 w:1) /// Proof: `StakingExtension::NextSigners` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Babe::NextRandomness` (r:1 w:0) + /// Proof: `Babe::NextRandomness` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`) + /// Storage: `Babe::EpochStart` (r:1 w:0) + /// Proof: `Babe::EpochStart` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) /// The range of component `c` is `[1, 14]`. /// The range of component `l` is `[0, 15]`. - fn new_session(c: u32, l: u32, ) -> Weight { + /// The range of component `v` is `[0, 15]`. + fn new_session(c: u32, l: u32, v: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `482 + c * (32 ±0)` - // Estimated: `1966 + c * (32 ±0)` - // Minimum execution time: 13_000_000 picoseconds. - Weight::from_parts(12_791_889, 0) - .saturating_add(Weight::from_parts(0, 1966)) - // Standard Error: 22_917 - .saturating_add(Weight::from_parts(65_067, 0).saturating_mul(c.into())) - // Standard Error: 19_636 - .saturating_add(Weight::from_parts(30_071, 0).saturating_mul(l.into())) + // Measured: `508 + c * (16 ±0)` + // Estimated: `2027 + c * (16 ±1) + l * (50 ±0) + v * (50 ±0)` + // Minimum execution time: 9_000_000 picoseconds. + Weight::from_parts(17_877_994, 0) + .saturating_add(Weight::from_parts(0, 2027)) .saturating_add(RocksDbWeight::get().reads(5)) .saturating_add(RocksDbWeight::get().writes(3)) - .saturating_add(Weight::from_parts(0, 32).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(0, 16).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(0, 50).saturating_mul(l.into())) + .saturating_add(Weight::from_parts(0, 50).saturating_mul(v.into())) } /// Storage: `StakingExtension::ValidationQueue` (r:251 w:250) /// Proof: `StakingExtension::ValidationQueue` (`max_values`: None, `max_size`: None, mode: `Measured`) diff --git a/runtime/src/weights/pallet_staking_extension.rs b/runtime/src/weights/pallet_staking_extension.rs index c3f10c44c..13fb2fb81 100644 --- a/runtime/src/weights/pallet_staking_extension.rs +++ b/runtime/src/weights/pallet_staking_extension.rs @@ -16,9 +16,9 @@ //! Autogenerated weights for `pallet_staking_extension` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 33.0.0 -//! DATE: 2024-10-03, STEPS: `25`, REPEAT: `10`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-10-17, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ip-172-31-28-93`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz` +//! HOSTNAME: `Jesses-MacBook-Pro.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: @@ -27,14 +27,11 @@ // pallet // --chain // dev -// --wasm-execution=compiled // --pallet=pallet_staking_extension // --extrinsic=* -// --steps=25 -// --repeat=10 +// --steps=5 +// --repeat=2 // --header=.maintain/AGPL-3.0-header.txt -// --template -// .maintain/frame-weight-template.hbs // --output=./runtime/src/weights/ #![cfg_attr(rustfmt, rustfmt_skip)] @@ -58,8 +55,8 @@ impl pallet_staking_extension::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `1421` // Estimated: `4886` - // Minimum execution time: 37_448_000 picoseconds. - Weight::from_parts(39_440_000, 0) + // Minimum execution time: 23_000_000 picoseconds. + Weight::from_parts(25_000_000, 0) .saturating_add(Weight::from_parts(0, 4886)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) @@ -78,10 +75,12 @@ impl pallet_staking_extension::WeightInfo for WeightInf fn change_threshold_accounts(s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `1599 + s * (32 ±0)` - // Estimated: `5063 + s * (32 ±0)` - // Minimum execution time: 45_995_000 picoseconds. - Weight::from_parts(48_726_051, 0) - .saturating_add(Weight::from_parts(0, 5063)) + // Estimated: `5062 + s * (32 ±0)` + // Minimum execution time: 29_000_000 picoseconds. + Weight::from_parts(29_411_602, 0) + .saturating_add(Weight::from_parts(0, 5062)) + // Standard Error: 26_568 + .saturating_add(Weight::from_parts(40_055, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(2)) .saturating_add(Weight::from_parts(0, 32).saturating_mul(s.into())) @@ -114,13 +113,13 @@ impl pallet_staking_extension::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `2140 + n * (32 ±0) + s * (64 ±0)` // Estimated: `4764 + n * (32 ±0) + s * (64 ±0)` - // Minimum execution time: 115_452_000 picoseconds. - Weight::from_parts(116_623_730, 0) + // Minimum execution time: 75_000_000 picoseconds. + Weight::from_parts(75_636_482, 0) .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 33_652 - .saturating_add(Weight::from_parts(194_540, 0).saturating_mul(s.into())) - // Standard Error: 31_703 - .saturating_add(Weight::from_parts(188_097, 0).saturating_mul(n.into())) + // Standard Error: 179_756 + .saturating_add(Weight::from_parts(66_938, 0).saturating_mul(s.into())) + // Standard Error: 173_022 + .saturating_add(Weight::from_parts(89_861, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(11)) .saturating_add(T::DbWeight::get().writes(4)) .saturating_add(Weight::from_parts(0, 32).saturating_mul(n.into())) @@ -152,13 +151,13 @@ impl pallet_staking_extension::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `1985 + c * (64 ±0) + n * (32 ±0)` // Estimated: `6248 + c * (64 ±0) + n * (32 ±0)` - // Minimum execution time: 95_779_000 picoseconds. - Weight::from_parts(96_617_815, 0) + // Minimum execution time: 59_000_000 picoseconds. + Weight::from_parts(55_944_951, 0) .saturating_add(Weight::from_parts(0, 6248)) - // Standard Error: 23_179 - .saturating_add(Weight::from_parts(168_714, 0).saturating_mul(c.into())) - // Standard Error: 21_837 - .saturating_add(Weight::from_parts(185_817, 0).saturating_mul(n.into())) + // Standard Error: 204_369 + .saturating_add(Weight::from_parts(228_013, 0).saturating_mul(c.into())) + // Standard Error: 196_712 + .saturating_add(Weight::from_parts(371_213, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(11)) .saturating_add(T::DbWeight::get().writes(6)) .saturating_add(Weight::from_parts(0, 64).saturating_mul(c.into())) @@ -188,13 +187,13 @@ impl pallet_staking_extension::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `1655 + c * (64 ±0) + n * (32 ±0)` // Estimated: `4764 + c * (64 ±0) + n * (32 ±0)` - // Minimum execution time: 77_414_000 picoseconds. - Weight::from_parts(77_758_089, 0) + // Minimum execution time: 50_000_000 picoseconds. + Weight::from_parts(49_699_348, 0) .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 24_246 - .saturating_add(Weight::from_parts(184_017, 0).saturating_mul(c.into())) - // Standard Error: 22_842 - .saturating_add(Weight::from_parts(181_804, 0).saturating_mul(n.into())) + // Standard Error: 98_741 + .saturating_add(Weight::from_parts(156_840, 0).saturating_mul(c.into())) + // Standard Error: 95_041 + .saturating_add(Weight::from_parts(112_011, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(Weight::from_parts(0, 64).saturating_mul(c.into())) @@ -232,8 +231,8 @@ impl pallet_staking_extension::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `2141` // Estimated: `6248` - // Minimum execution time: 112_405_000 picoseconds. - Weight::from_parts(116_028_000, 0) + // Minimum execution time: 71_000_000 picoseconds. + Weight::from_parts(71_000_000, 0) .saturating_add(Weight::from_parts(0, 6248)) .saturating_add(T::DbWeight::get().reads(15)) .saturating_add(T::DbWeight::get().writes(8)) @@ -246,8 +245,8 @@ impl pallet_staking_extension::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `353` // Estimated: `3818` - // Minimum execution time: 16_110_000 picoseconds. - Weight::from_parts(16_488_000, 0) + // Minimum execution time: 10_000_000 picoseconds. + Weight::from_parts(11_000_000, 0) .saturating_add(Weight::from_parts(0, 3818)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -260,15 +259,13 @@ impl pallet_staking_extension::WeightInfo for WeightInf fn confirm_key_reshare_confirmed(c: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `830 + c * (32 ±0)` - // Estimated: `4320 + c * (30 ±0)` - // Minimum execution time: 18_737_000 picoseconds. - Weight::from_parts(20_163_892, 0) - .saturating_add(Weight::from_parts(0, 4320)) - // Standard Error: 7_914 - .saturating_add(Weight::from_parts(37_314, 0).saturating_mul(c.into())) + // Estimated: `4331 + c * (29 ±1)` + // Minimum execution time: 11_000_000 picoseconds. + Weight::from_parts(12_414_364, 0) + .saturating_add(Weight::from_parts(0, 4331)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) - .saturating_add(Weight::from_parts(0, 30).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(0, 29).saturating_mul(c.into())) } /// Storage: `StakingExtension::ThresholdToStash` (r:1 w:0) /// Proof: `StakingExtension::ThresholdToStash` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -282,8 +279,8 @@ impl pallet_staking_extension::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `1342` // Estimated: `4807` - // Minimum execution time: 21_013_000 picoseconds. - Weight::from_parts(21_965_000, 0) + // Minimum execution time: 12_000_000 picoseconds. + Weight::from_parts(13_000_000, 0) .saturating_add(Weight::from_parts(0, 4807)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(3)) @@ -297,11 +294,11 @@ impl pallet_staking_extension::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `266 + s * (32 ±0)` // Estimated: `1751 + s * (32 ±0)` - // Minimum execution time: 7_529_000 picoseconds. - Weight::from_parts(7_865_217, 0) + // Minimum execution time: 5_000_000 picoseconds. + Weight::from_parts(5_772_373, 0) .saturating_add(Weight::from_parts(0, 1751)) - // Standard Error: 2_909 - .saturating_add(Weight::from_parts(15_094, 0).saturating_mul(s.into())) + // Standard Error: 22_735 + .saturating_add(Weight::from_parts(15_564, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(Weight::from_parts(0, 32).saturating_mul(s.into())) } @@ -309,30 +306,31 @@ impl pallet_staking_extension::WeightInfo for WeightInf /// Proof: `StakingExtension::Signers` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `Parameters::SignersInfo` (r:1 w:0) /// Proof: `Parameters::SignersInfo` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `Babe::NextRandomness` (r:1 w:0) - /// Proof: `Babe::NextRandomness` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`) - /// Storage: `Babe::EpochStart` (r:1 w:0) - /// Proof: `Babe::EpochStart` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) /// Storage: `StakingExtension::JumpStartProgress` (r:1 w:1) /// Proof: `StakingExtension::JumpStartProgress` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `StakingExtension::ReshareData` (r:0 w:1) /// Proof: `StakingExtension::ReshareData` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `StakingExtension::NextSigners` (r:0 w:1) /// Proof: `StakingExtension::NextSigners` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Babe::NextRandomness` (r:1 w:0) + /// Proof: `Babe::NextRandomness` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`) + /// Storage: `Babe::EpochStart` (r:1 w:0) + /// Proof: `Babe::EpochStart` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) /// The range of component `c` is `[1, 14]`. /// The range of component `l` is `[0, 15]`. - fn new_session(c: u32, _l: u32, ) -> Weight { + /// The range of component `v` is `[0, 15]`. + fn new_session(c: u32, l: u32, v: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `494 + c * (32 ±0)` - // Estimated: `1979 + c * (32 ±0)` - // Minimum execution time: 19_313_000 picoseconds. - Weight::from_parts(20_259_262, 0) - .saturating_add(Weight::from_parts(0, 1979)) - // Standard Error: 7_972 - .saturating_add(Weight::from_parts(49_077, 0).saturating_mul(c.into())) + // Measured: `508 + c * (16 ±0)` + // Estimated: `2027 + c * (16 ±1) + l * (50 ±0) + v * (50 ±0)` + // Minimum execution time: 9_000_000 picoseconds. + Weight::from_parts(17_877_994, 0) + .saturating_add(Weight::from_parts(0, 2027)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(3)) - .saturating_add(Weight::from_parts(0, 32).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(0, 16).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(0, 50).saturating_mul(l.into())) + .saturating_add(Weight::from_parts(0, 50).saturating_mul(v.into())) } /// Storage: `StakingExtension::CounterForValidationQueue` (r:1 w:1) /// Proof: `StakingExtension::CounterForValidationQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) @@ -345,17 +343,17 @@ impl pallet_staking_extension::WeightInfo for WeightInf /// The range of component `s` is `[1, 250]`. fn on_initialize(s: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `373 + s * (188 ±0)` - // Estimated: `3839 + s * (2664 ±0)` - // Minimum execution time: 25_320_000 picoseconds. - Weight::from_parts(10_261_196, 0) - .saturating_add(Weight::from_parts(0, 3839)) - // Standard Error: 18_602 - .saturating_add(Weight::from_parts(10_970_560, 0).saturating_mul(s.into())) + // Measured: `370 + s * (188 ±0)` + // Estimated: `3832 + s * (2664 ±0)` + // Minimum execution time: 16_000_000 picoseconds. + Weight::from_parts(552_625, 0) + .saturating_add(Weight::from_parts(0, 3832)) + // Standard Error: 76_700 + .saturating_add(Weight::from_parts(7_130_570, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(s.into()))) .saturating_add(T::DbWeight::get().writes(2)) .saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(s.into()))) .saturating_add(Weight::from_parts(0, 2664).saturating_mul(s.into())) } -} \ No newline at end of file +}