diff --git a/pallets/parachain-staking/src/benchmarking.rs b/pallets/parachain-staking/src/benchmarking.rs index e28a985c36..0f5474d981 100644 --- a/pallets/parachain-staking/src/benchmarking.rs +++ b/pallets/parachain-staking/src/benchmarking.rs @@ -108,6 +108,7 @@ fn roll_to_and_author(round_delay: u32, author: T::AccountId) { now += 1u32.into(); } } + fn assert_last_event(generic_event: ::RuntimeEvent) { frame_system::Pallet::::assert_last_event(generic_event.into()); } @@ -782,6 +783,7 @@ benchmarks! { ); } + cancel_delegator_bond_less { let collator: T::AccountId = create_funded_collator::( "collator", @@ -818,12 +820,11 @@ benchmarks! { } // ON_INITIALIZE - round_transition_on_initialize { // TOTAL SELECTED COLLATORS PER ROUND let x in 8..100; // DELEGATIONS - let y in 0..(<::MaxTopDelegationsPerCandidate as Get>::get() * 100); + let y in 0..(<::MaxTopDelegationsPerCandidate as Get>::get() * 5); let max_delegators_per_collator= <::MaxTopDelegationsPerCandidate as Get>::get(); let max_delegations = x * max_delegators_per_collator; @@ -932,7 +933,7 @@ benchmarks! { // SET collators as authors for blocks from now - end while now < end { let author = collators[counter % collators.len()].clone(); - Pallet::::note_author(author); + Pallet::::note_author(author.clone()); >::on_finalize(>::block_number()); >::set_block_number( >::block_number() + 1u32.into() diff --git a/pallets/parachain-staking/src/lib.rs b/pallets/parachain-staking/src/lib.rs index 8c1a0e2b74..2798e9e6c5 100644 --- a/pallets/parachain-staking/src/lib.rs +++ b/pallets/parachain-staking/src/lib.rs @@ -1595,22 +1595,9 @@ pub mod pallet { .map(|mut bond| { bond.amount = match requests.get(&bond.owner) { None => bond.amount, - Some(DelegationAction::Revoke(_)) => { - log::warn!( - "reward for delegator '{:?}' set to zero due to pending \ - revoke request", - bond.owner - ); - BalanceOf::::zero() - }, - Some(DelegationAction::Decrease(amount)) => { - log::warn!( - "reward for delegator '{:?}' reduced by set amount due to pending \ - decrease request", - bond.owner - ); - bond.amount.saturating_sub(*amount) - }, + Some(DelegationAction::Revoke(_)) => BalanceOf::::zero(), + Some(DelegationAction::Decrease(amount)) => + bond.amount.saturating_sub(*amount), }; bond diff --git a/pallets/parachain-staking/src/weights.rs b/pallets/parachain-staking/src/weights.rs index b67b565050..c8cf02da8e 100644 --- a/pallets/parachain-staking/src/weights.rs +++ b/pallets/parachain-staking/src/weights.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for pallet_parachain_staking //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-30, STEPS: `2`, REPEAT: 5, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-11-22, STEPS: `30`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("litentry-dev"), DB CACHE: 20 // Executed Command: @@ -31,8 +31,8 @@ // --pallet=pallet_parachain_staking // --extrinsic=* // --heap-pages=4096 -// --steps=2 -// --repeat=5 +// --steps=30 +// --repeat=20 // --header=./LICENSE_HEADER // --template=./templates/benchmark/pallet-weight-template.hbs // --output=./pallets/parachain-staking/src/weights.rs @@ -87,55 +87,55 @@ pub struct LitentryWeight(PhantomData); impl WeightInfo for LitentryWeight { // Storage: ParachainStaking Candidates (r:1 w:1) fn add_candidates_whitelist(x: u32, ) -> Weight { - Weight::from_ref_time(16_474_000 as u64) - // Standard Error: 4_000 - .saturating_add(Weight::from_ref_time(211_000 as u64).saturating_mul(x as u64)) + Weight::from_ref_time(31_586_000 as u64) + // Standard Error: 3_956 + .saturating_add(Weight::from_ref_time(358_789 as u64).saturating_mul(x as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: ParachainStaking Candidates (r:1 w:1) fn remove_candidates_whitelist(x: u32, ) -> Weight { - Weight::from_ref_time(16_120_000 as u64) - // Standard Error: 11_000 - .saturating_add(Weight::from_ref_time(211_000 as u64).saturating_mul(x as u64)) + Weight::from_ref_time(31_618_000 as u64) + // Standard Error: 2_760 + .saturating_add(Weight::from_ref_time(376_927 as u64).saturating_mul(x as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: ParachainStaking InflationConfig (r:1 w:1) fn set_staking_expectations() -> Weight { - Weight::from_ref_time(16_982_000 as u64) + Weight::from_ref_time(32_913_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: ParachainStaking InflationConfig (r:1 w:1) // Storage: ParachainStaking Round (r:1 w:0) fn set_inflation() -> Weight { - Weight::from_ref_time(39_474_000 as u64) + Weight::from_ref_time(69_124_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: ParachainStaking ParachainBondInfo (r:1 w:1) fn set_parachain_bond_account() -> Weight { - Weight::from_ref_time(19_787_000 as u64) + Weight::from_ref_time(32_673_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: ParachainStaking ParachainBondInfo (r:1 w:1) fn set_parachain_bond_reserve_percent() -> Weight { - Weight::from_ref_time(15_699_000 as u64) + Weight::from_ref_time(31_697_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: ParachainStaking TotalSelected (r:1 w:1) // Storage: ParachainStaking Round (r:1 w:0) fn set_total_selected() -> Weight { - Weight::from_ref_time(17_543_000 as u64) + Weight::from_ref_time(32_917_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: ParachainStaking CollatorCommission (r:1 w:1) fn set_collator_commission() -> Weight { - Weight::from_ref_time(15_559_000 as u64) + Weight::from_ref_time(29_709_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -143,7 +143,7 @@ impl WeightInfo for LitentryWeight { // Storage: ParachainStaking TotalSelected (r:1 w:0) // Storage: ParachainStaking InflationConfig (r:1 w:1) fn set_blocks_per_round() -> Weight { - Weight::from_ref_time(22_572_000 as u64) + Weight::from_ref_time(40_380_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -156,9 +156,9 @@ impl WeightInfo for LitentryWeight { // Storage: ParachainStaking TopDelegations (r:0 w:1) // Storage: ParachainStaking BottomDelegations (r:0 w:1) fn join_candidates(x: u32, ) -> Weight { - Weight::from_ref_time(49_206_000 as u64) - // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(110_000 as u64).saturating_mul(x as u64)) + Weight::from_ref_time(83_396_000 as u64) + // Standard Error: 1_337 + .saturating_add(Weight::from_ref_time(213_918 as u64).saturating_mul(x as u64)) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } @@ -166,9 +166,9 @@ impl WeightInfo for LitentryWeight { // Storage: ParachainStaking Round (r:1 w:0) // Storage: ParachainStaking CandidatePool (r:1 w:1) fn schedule_leave_candidates(x: u32, ) -> Weight { - Weight::from_ref_time(27_913_000 as u64) - // Standard Error: 3_000 - .saturating_add(Weight::from_ref_time(73_000 as u64).saturating_mul(x as u64)) + Weight::from_ref_time(52_807_000 as u64) + // Standard Error: 1_520 + .saturating_add(Weight::from_ref_time(187_807 as u64).saturating_mul(x as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -181,34 +181,34 @@ impl WeightInfo for LitentryWeight { // Storage: ParachainStaking BottomDelegations (r:1 w:1) // Storage: ParachainStaking Total (r:1 w:1) fn execute_leave_candidates(x: u32, ) -> Weight { - Weight::from_ref_time(24_564_000 as u64) - // Standard Error: 263_000 - .saturating_add(Weight::from_ref_time(44_276_000 as u64).saturating_mul(x as u64)) - .saturating_add(T::DbWeight::get().reads(5 as u64)) + Weight::from_ref_time(150_617_000 as u64) + // Standard Error: 390_044 + .saturating_add(Weight::from_ref_time(53_179_616 as u64).saturating_mul(x as u64)) + .saturating_add(T::DbWeight::get().reads(9 as u64)) .saturating_add(T::DbWeight::get().reads((2 as u64).saturating_mul(x as u64))) - .saturating_add(T::DbWeight::get().writes(4 as u64)) + .saturating_add(T::DbWeight::get().writes(8 as u64)) .saturating_add(T::DbWeight::get().writes((2 as u64).saturating_mul(x as u64))) } // Storage: ParachainStaking CandidateInfo (r:1 w:1) // Storage: ParachainStaking CandidatePool (r:1 w:1) fn cancel_leave_candidates(x: u32, ) -> Weight { - Weight::from_ref_time(25_503_000 as u64) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(58_000 as u64).saturating_mul(x as u64)) + Weight::from_ref_time(48_633_000 as u64) + // Standard Error: 2_239 + .saturating_add(Weight::from_ref_time(205_980 as u64).saturating_mul(x as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: ParachainStaking CandidateInfo (r:1 w:1) // Storage: ParachainStaking CandidatePool (r:1 w:1) fn go_offline() -> Weight { - Weight::from_ref_time(23_424_000 as u64) + Weight::from_ref_time(45_679_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: ParachainStaking CandidateInfo (r:1 w:1) // Storage: ParachainStaking CandidatePool (r:1 w:1) fn go_online() -> Weight { - Weight::from_ref_time(23_774_000 as u64) + Weight::from_ref_time(45_303_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -217,14 +217,14 @@ impl WeightInfo for LitentryWeight { // Storage: ParachainStaking Total (r:1 w:1) // Storage: ParachainStaking CandidatePool (r:1 w:1) fn candidate_bond_more() -> Weight { - Weight::from_ref_time(41_267_000 as u64) + Weight::from_ref_time(73_015_000 as u64) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } // Storage: ParachainStaking CandidateInfo (r:1 w:1) // Storage: ParachainStaking Round (r:1 w:0) fn schedule_candidate_bond_less() -> Weight { - Weight::from_ref_time(21_891_000 as u64) + Weight::from_ref_time(43_332_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -234,13 +234,13 @@ impl WeightInfo for LitentryWeight { // Storage: ParachainStaking Total (r:1 w:1) // Storage: ParachainStaking CandidatePool (r:1 w:1) fn execute_candidate_bond_less() -> Weight { - Weight::from_ref_time(77_555_000 as u64) + Weight::from_ref_time(99_570_000 as u64) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } // Storage: ParachainStaking CandidateInfo (r:1 w:1) fn cancel_candidate_bond_less() -> Weight { - Weight::from_ref_time(20_007_000 as u64) + Weight::from_ref_time(39_928_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -251,11 +251,11 @@ impl WeightInfo for LitentryWeight { // Storage: ParachainStaking CandidatePool (r:1 w:1) // Storage: ParachainStaking Total (r:1 w:1) fn delegate(x: u32, y: u32, ) -> Weight { - Weight::from_ref_time(72_585_000 as u64) - // Standard Error: 61_000 - .saturating_add(Weight::from_ref_time(134_000 as u64).saturating_mul(x as u64)) - // Standard Error: 6_000 - .saturating_add(Weight::from_ref_time(46_000 as u64).saturating_mul(y as u64)) + Weight::from_ref_time(152_237_000 as u64) + // Standard Error: 7_678 + .saturating_add(Weight::from_ref_time(236_232 as u64).saturating_mul(x as u64)) + // Standard Error: 769 + .saturating_add(Weight::from_ref_time(127_378 as u64).saturating_mul(y as u64)) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } @@ -263,7 +263,7 @@ impl WeightInfo for LitentryWeight { // Storage: ParachainStaking Round (r:1 w:0) // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) fn schedule_leave_delegators() -> Weight { - Weight::from_ref_time(28_915_000 as u64) + Weight::from_ref_time(50_929_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -276,18 +276,18 @@ impl WeightInfo for LitentryWeight { // Storage: System Account (r:1 w:1) // Storage: ParachainStaking Total (r:1 w:1) fn execute_leave_delegators(x: u32, ) -> Weight { - Weight::from_ref_time(24_382_000 as u64) - // Standard Error: 487_000 - .saturating_add(Weight::from_ref_time(35_741_000 as u64).saturating_mul(x as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) + Weight::from_ref_time(130_636_000 as u64) + // Standard Error: 71_633 + .saturating_add(Weight::from_ref_time(43_296_909 as u64).saturating_mul(x as u64)) + .saturating_add(T::DbWeight::get().reads(8 as u64)) .saturating_add(T::DbWeight::get().reads((3 as u64).saturating_mul(x as u64))) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + .saturating_add(T::DbWeight::get().writes(7 as u64)) .saturating_add(T::DbWeight::get().writes((3 as u64).saturating_mul(x as u64))) } // Storage: ParachainStaking DelegatorState (r:1 w:1) // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) fn cancel_leave_delegators() -> Weight { - Weight::from_ref_time(29_114_000 as u64) + Weight::from_ref_time(53_562_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -295,7 +295,7 @@ impl WeightInfo for LitentryWeight { // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) // Storage: ParachainStaking Round (r:1 w:0) fn schedule_revoke_delegation() -> Weight { - Weight::from_ref_time(31_419_000 as u64) + Weight::from_ref_time(51_280_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -307,7 +307,7 @@ impl WeightInfo for LitentryWeight { // Storage: ParachainStaking CandidatePool (r:1 w:1) // Storage: ParachainStaking Total (r:1 w:1) fn delegator_bond_more() -> Weight { - Weight::from_ref_time(55_454_000 as u64) + Weight::from_ref_time(95_235_000 as u64) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } @@ -315,7 +315,7 @@ impl WeightInfo for LitentryWeight { // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) // Storage: ParachainStaking Round (r:1 w:0) fn schedule_delegator_bond_less() -> Weight { - Weight::from_ref_time(28_494_000 as u64) + Weight::from_ref_time(51_440_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -328,7 +328,7 @@ impl WeightInfo for LitentryWeight { // Storage: System Account (r:1 w:1) // Storage: ParachainStaking Total (r:1 w:1) fn execute_revoke_delegation() -> Weight { - Weight::from_ref_time(97_653_000 as u64) + Weight::from_ref_time(138_056_000 as u64) .saturating_add(T::DbWeight::get().reads(8 as u64)) .saturating_add(T::DbWeight::get().writes(7 as u64)) } @@ -341,21 +341,21 @@ impl WeightInfo for LitentryWeight { // Storage: ParachainStaking CandidatePool (r:1 w:1) // Storage: ParachainStaking Total (r:1 w:1) fn execute_delegator_bond_less() -> Weight { - Weight::from_ref_time(91_772_000 as u64) + Weight::from_ref_time(130_361_000 as u64) .saturating_add(T::DbWeight::get().reads(8 as u64)) .saturating_add(T::DbWeight::get().writes(7 as u64)) } // Storage: ParachainStaking DelegatorState (r:1 w:1) // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) fn cancel_revoke_delegation() -> Weight { - Weight::from_ref_time(26_039_000 as u64) + Weight::from_ref_time(50_064_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: ParachainStaking DelegatorState (r:1 w:1) // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) fn cancel_delegator_bond_less() -> Weight { - Weight::from_ref_time(50_124_000 as u64) + Weight::from_ref_time(75_067_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -368,24 +368,24 @@ impl WeightInfo for LitentryWeight { // Storage: ParachainStaking CollatorCommission (r:1 w:0) // Storage: ParachainStaking CandidatePool (r:1 w:0) // Storage: ParachainStaking TotalSelected (r:1 w:0) - // Storage: ParachainStaking CandidateInfo (r:9 w:0) - // Storage: ParachainStaking DelegationScheduledRequests (r:9 w:0) - // Storage: ParachainStaking TopDelegations (r:9 w:0) + // Storage: ParachainStaking CandidateInfo (r:8 w:0) + // Storage: ParachainStaking DelegationScheduledRequests (r:8 w:0) + // Storage: ParachainStaking TopDelegations (r:8 w:0) // Storage: ParachainStaking Total (r:1 w:0) // Storage: ParachainStaking AwardedPts (r:2 w:1) - // Storage: ParachainStaking AtStake (r:1 w:10) + // Storage: ParachainStaking AtStake (r:1 w:9) // Storage: System Account (r:1001 w:1001) // Storage: ParachainStaking SelectedCandidates (r:0 w:1) // Storage: ParachainStaking DelayedPayouts (r:0 w:1) fn round_transition_on_initialize(x: u32, y: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 5_991_000 - .saturating_add(Weight::from_ref_time(110_733_000 as u64).saturating_mul(x as u64)) - // Standard Error: 5_000 - .saturating_add(Weight::from_ref_time(251_000 as u64).saturating_mul(y as u64)) - .saturating_add(T::DbWeight::get().reads(17 as u64)) - .saturating_add(T::DbWeight::get().reads((3 as u64).saturating_mul(x as u64))) - .saturating_add(T::DbWeight::get().writes(9 as u64)) + Weight::from_ref_time(818_708_000 as u64) + // Standard Error: 1_936_078 + .saturating_add(Weight::from_ref_time(6_725_689 as u64).saturating_mul(x as u64)) + // Standard Error: 39_048 + .saturating_add(Weight::from_ref_time(233_534 as u64).saturating_mul(y as u64)) + .saturating_add(T::DbWeight::get().reads(47 as u64)) + .saturating_add(T::DbWeight::get().reads((2 as u64).saturating_mul(x as u64))) + .saturating_add(T::DbWeight::get().writes(19 as u64)) .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(x as u64))) } // Storage: ParachainStaking DelayedPayouts (r:1 w:0) @@ -394,9 +394,9 @@ impl WeightInfo for LitentryWeight { // Storage: ParachainStaking AtStake (r:1 w:1) // Storage: System Account (r:1 w:1) fn pay_one_collator_reward(y: u32, ) -> Weight { - Weight::from_ref_time(49_907_000 as u64) - // Standard Error: 31_000 - .saturating_add(Weight::from_ref_time(15_507_000 as u64).saturating_mul(y as u64)) + Weight::from_ref_time(75_956_000 as u64) + // Standard Error: 5_696 + .saturating_add(Weight::from_ref_time(20_359_782 as u64).saturating_mul(y as u64)) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(y as u64))) .saturating_add(T::DbWeight::get().writes(3 as u64)) @@ -404,7 +404,7 @@ impl WeightInfo for LitentryWeight { } // Storage: ParachainStaking Round (r:1 w:0) fn base_on_initialize() -> Weight { - Weight::from_ref_time(3_336_000 as u64) + Weight::from_ref_time(11_242_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) } } @@ -413,55 +413,55 @@ impl WeightInfo for LitentryWeight { impl WeightInfo for () { // Storage: ParachainStaking Candidates (r:1 w:1) fn add_candidates_whitelist(x: u32, ) -> Weight { - Weight::from_ref_time(16_474_000 as u64) - // Standard Error: 4_000 - .saturating_add(Weight::from_ref_time(211_000 as u64).saturating_mul(x as u64)) + Weight::from_ref_time(31_586_000 as u64) + // Standard Error: 3_956 + .saturating_add(Weight::from_ref_time(358_789 as u64).saturating_mul(x as u64)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: ParachainStaking Candidates (r:1 w:1) fn remove_candidates_whitelist(x: u32, ) -> Weight { - Weight::from_ref_time(16_120_000 as u64) - // Standard Error: 11_000 - .saturating_add(Weight::from_ref_time(211_000 as u64).saturating_mul(x as u64)) + Weight::from_ref_time(31_618_000 as u64) + // Standard Error: 2_760 + .saturating_add(Weight::from_ref_time(376_927 as u64).saturating_mul(x as u64)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: ParachainStaking InflationConfig (r:1 w:1) fn set_staking_expectations() -> Weight { - Weight::from_ref_time(16_982_000 as u64) + Weight::from_ref_time(32_913_000 as u64) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: ParachainStaking InflationConfig (r:1 w:1) // Storage: ParachainStaking Round (r:1 w:0) fn set_inflation() -> Weight { - Weight::from_ref_time(39_474_000 as u64) + Weight::from_ref_time(69_124_000 as u64) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: ParachainStaking ParachainBondInfo (r:1 w:1) fn set_parachain_bond_account() -> Weight { - Weight::from_ref_time(19_787_000 as u64) + Weight::from_ref_time(32_673_000 as u64) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: ParachainStaking ParachainBondInfo (r:1 w:1) fn set_parachain_bond_reserve_percent() -> Weight { - Weight::from_ref_time(15_699_000 as u64) + Weight::from_ref_time(31_697_000 as u64) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: ParachainStaking TotalSelected (r:1 w:1) // Storage: ParachainStaking Round (r:1 w:0) fn set_total_selected() -> Weight { - Weight::from_ref_time(17_543_000 as u64) + Weight::from_ref_time(32_917_000 as u64) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: ParachainStaking CollatorCommission (r:1 w:1) fn set_collator_commission() -> Weight { - Weight::from_ref_time(15_559_000 as u64) + Weight::from_ref_time(29_709_000 as u64) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } @@ -469,7 +469,7 @@ impl WeightInfo for () { // Storage: ParachainStaking TotalSelected (r:1 w:0) // Storage: ParachainStaking InflationConfig (r:1 w:1) fn set_blocks_per_round() -> Weight { - Weight::from_ref_time(22_572_000 as u64) + Weight::from_ref_time(40_380_000 as u64) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } @@ -482,9 +482,9 @@ impl WeightInfo for () { // Storage: ParachainStaking TopDelegations (r:0 w:1) // Storage: ParachainStaking BottomDelegations (r:0 w:1) fn join_candidates(x: u32, ) -> Weight { - Weight::from_ref_time(49_206_000 as u64) - // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(110_000 as u64).saturating_mul(x as u64)) + Weight::from_ref_time(83_396_000 as u64) + // Standard Error: 1_337 + .saturating_add(Weight::from_ref_time(213_918 as u64).saturating_mul(x as u64)) .saturating_add(RocksDbWeight::get().reads(6 as u64)) .saturating_add(RocksDbWeight::get().writes(6 as u64)) } @@ -492,9 +492,9 @@ impl WeightInfo for () { // Storage: ParachainStaking Round (r:1 w:0) // Storage: ParachainStaking CandidatePool (r:1 w:1) fn schedule_leave_candidates(x: u32, ) -> Weight { - Weight::from_ref_time(27_913_000 as u64) - // Standard Error: 3_000 - .saturating_add(Weight::from_ref_time(73_000 as u64).saturating_mul(x as u64)) + Weight::from_ref_time(52_807_000 as u64) + // Standard Error: 1_520 + .saturating_add(Weight::from_ref_time(187_807 as u64).saturating_mul(x as u64)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } @@ -507,34 +507,34 @@ impl WeightInfo for () { // Storage: ParachainStaking BottomDelegations (r:1 w:1) // Storage: ParachainStaking Total (r:1 w:1) fn execute_leave_candidates(x: u32, ) -> Weight { - Weight::from_ref_time(24_564_000 as u64) - // Standard Error: 263_000 - .saturating_add(Weight::from_ref_time(44_276_000 as u64).saturating_mul(x as u64)) - .saturating_add(RocksDbWeight::get().reads(5 as u64)) + Weight::from_ref_time(150_617_000 as u64) + // Standard Error: 390_044 + .saturating_add(Weight::from_ref_time(53_179_616 as u64).saturating_mul(x as u64)) + .saturating_add(RocksDbWeight::get().reads(9 as u64)) .saturating_add(RocksDbWeight::get().reads((2 as u64).saturating_mul(x as u64))) - .saturating_add(RocksDbWeight::get().writes(4 as u64)) + .saturating_add(RocksDbWeight::get().writes(8 as u64)) .saturating_add(RocksDbWeight::get().writes((2 as u64).saturating_mul(x as u64))) } // Storage: ParachainStaking CandidateInfo (r:1 w:1) // Storage: ParachainStaking CandidatePool (r:1 w:1) fn cancel_leave_candidates(x: u32, ) -> Weight { - Weight::from_ref_time(25_503_000 as u64) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(58_000 as u64).saturating_mul(x as u64)) + Weight::from_ref_time(48_633_000 as u64) + // Standard Error: 2_239 + .saturating_add(Weight::from_ref_time(205_980 as u64).saturating_mul(x as u64)) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } // Storage: ParachainStaking CandidateInfo (r:1 w:1) // Storage: ParachainStaking CandidatePool (r:1 w:1) fn go_offline() -> Weight { - Weight::from_ref_time(23_424_000 as u64) + Weight::from_ref_time(45_679_000 as u64) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } // Storage: ParachainStaking CandidateInfo (r:1 w:1) // Storage: ParachainStaking CandidatePool (r:1 w:1) fn go_online() -> Weight { - Weight::from_ref_time(23_774_000 as u64) + Weight::from_ref_time(45_303_000 as u64) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } @@ -543,14 +543,14 @@ impl WeightInfo for () { // Storage: ParachainStaking Total (r:1 w:1) // Storage: ParachainStaking CandidatePool (r:1 w:1) fn candidate_bond_more() -> Weight { - Weight::from_ref_time(41_267_000 as u64) + Weight::from_ref_time(73_015_000 as u64) .saturating_add(RocksDbWeight::get().reads(4 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) } // Storage: ParachainStaking CandidateInfo (r:1 w:1) // Storage: ParachainStaking Round (r:1 w:0) fn schedule_candidate_bond_less() -> Weight { - Weight::from_ref_time(21_891_000 as u64) + Weight::from_ref_time(43_332_000 as u64) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } @@ -560,13 +560,13 @@ impl WeightInfo for () { // Storage: ParachainStaking Total (r:1 w:1) // Storage: ParachainStaking CandidatePool (r:1 w:1) fn execute_candidate_bond_less() -> Weight { - Weight::from_ref_time(77_555_000 as u64) + Weight::from_ref_time(99_570_000 as u64) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) } // Storage: ParachainStaking CandidateInfo (r:1 w:1) fn cancel_candidate_bond_less() -> Weight { - Weight::from_ref_time(20_007_000 as u64) + Weight::from_ref_time(39_928_000 as u64) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } @@ -577,11 +577,11 @@ impl WeightInfo for () { // Storage: ParachainStaking CandidatePool (r:1 w:1) // Storage: ParachainStaking Total (r:1 w:1) fn delegate(x: u32, y: u32, ) -> Weight { - Weight::from_ref_time(72_585_000 as u64) - // Standard Error: 61_000 - .saturating_add(Weight::from_ref_time(134_000 as u64).saturating_mul(x as u64)) - // Standard Error: 6_000 - .saturating_add(Weight::from_ref_time(46_000 as u64).saturating_mul(y as u64)) + Weight::from_ref_time(152_237_000 as u64) + // Standard Error: 7_678 + .saturating_add(Weight::from_ref_time(236_232 as u64).saturating_mul(x as u64)) + // Standard Error: 769 + .saturating_add(Weight::from_ref_time(127_378 as u64).saturating_mul(y as u64)) .saturating_add(RocksDbWeight::get().reads(6 as u64)) .saturating_add(RocksDbWeight::get().writes(6 as u64)) } @@ -589,7 +589,7 @@ impl WeightInfo for () { // Storage: ParachainStaking Round (r:1 w:0) // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) fn schedule_leave_delegators() -> Weight { - Weight::from_ref_time(28_915_000 as u64) + Weight::from_ref_time(50_929_000 as u64) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } @@ -602,18 +602,18 @@ impl WeightInfo for () { // Storage: System Account (r:1 w:1) // Storage: ParachainStaking Total (r:1 w:1) fn execute_leave_delegators(x: u32, ) -> Weight { - Weight::from_ref_time(24_382_000 as u64) - // Standard Error: 487_000 - .saturating_add(Weight::from_ref_time(35_741_000 as u64).saturating_mul(x as u64)) - .saturating_add(RocksDbWeight::get().reads(2 as u64)) + Weight::from_ref_time(130_636_000 as u64) + // Standard Error: 71_633 + .saturating_add(Weight::from_ref_time(43_296_909 as u64).saturating_mul(x as u64)) + .saturating_add(RocksDbWeight::get().reads(8 as u64)) .saturating_add(RocksDbWeight::get().reads((3 as u64).saturating_mul(x as u64))) - .saturating_add(RocksDbWeight::get().writes(1 as u64)) + .saturating_add(RocksDbWeight::get().writes(7 as u64)) .saturating_add(RocksDbWeight::get().writes((3 as u64).saturating_mul(x as u64))) } // Storage: ParachainStaking DelegatorState (r:1 w:1) // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) fn cancel_leave_delegators() -> Weight { - Weight::from_ref_time(29_114_000 as u64) + Weight::from_ref_time(53_562_000 as u64) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } @@ -621,7 +621,7 @@ impl WeightInfo for () { // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) // Storage: ParachainStaking Round (r:1 w:0) fn schedule_revoke_delegation() -> Weight { - Weight::from_ref_time(31_419_000 as u64) + Weight::from_ref_time(51_280_000 as u64) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } @@ -633,7 +633,7 @@ impl WeightInfo for () { // Storage: ParachainStaking CandidatePool (r:1 w:1) // Storage: ParachainStaking Total (r:1 w:1) fn delegator_bond_more() -> Weight { - Weight::from_ref_time(55_454_000 as u64) + Weight::from_ref_time(95_235_000 as u64) .saturating_add(RocksDbWeight::get().reads(7 as u64)) .saturating_add(RocksDbWeight::get().writes(6 as u64)) } @@ -641,7 +641,7 @@ impl WeightInfo for () { // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) // Storage: ParachainStaking Round (r:1 w:0) fn schedule_delegator_bond_less() -> Weight { - Weight::from_ref_time(28_494_000 as u64) + Weight::from_ref_time(51_440_000 as u64) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } @@ -654,7 +654,7 @@ impl WeightInfo for () { // Storage: System Account (r:1 w:1) // Storage: ParachainStaking Total (r:1 w:1) fn execute_revoke_delegation() -> Weight { - Weight::from_ref_time(97_653_000 as u64) + Weight::from_ref_time(138_056_000 as u64) .saturating_add(RocksDbWeight::get().reads(8 as u64)) .saturating_add(RocksDbWeight::get().writes(7 as u64)) } @@ -667,21 +667,21 @@ impl WeightInfo for () { // Storage: ParachainStaking CandidatePool (r:1 w:1) // Storage: ParachainStaking Total (r:1 w:1) fn execute_delegator_bond_less() -> Weight { - Weight::from_ref_time(91_772_000 as u64) + Weight::from_ref_time(130_361_000 as u64) .saturating_add(RocksDbWeight::get().reads(8 as u64)) .saturating_add(RocksDbWeight::get().writes(7 as u64)) } // Storage: ParachainStaking DelegatorState (r:1 w:1) // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) fn cancel_revoke_delegation() -> Weight { - Weight::from_ref_time(26_039_000 as u64) + Weight::from_ref_time(50_064_000 as u64) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } // Storage: ParachainStaking DelegatorState (r:1 w:1) // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) fn cancel_delegator_bond_less() -> Weight { - Weight::from_ref_time(50_124_000 as u64) + Weight::from_ref_time(75_067_000 as u64) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } @@ -694,24 +694,24 @@ impl WeightInfo for () { // Storage: ParachainStaking CollatorCommission (r:1 w:0) // Storage: ParachainStaking CandidatePool (r:1 w:0) // Storage: ParachainStaking TotalSelected (r:1 w:0) - // Storage: ParachainStaking CandidateInfo (r:9 w:0) - // Storage: ParachainStaking DelegationScheduledRequests (r:9 w:0) - // Storage: ParachainStaking TopDelegations (r:9 w:0) + // Storage: ParachainStaking CandidateInfo (r:8 w:0) + // Storage: ParachainStaking DelegationScheduledRequests (r:8 w:0) + // Storage: ParachainStaking TopDelegations (r:8 w:0) // Storage: ParachainStaking Total (r:1 w:0) // Storage: ParachainStaking AwardedPts (r:2 w:1) - // Storage: ParachainStaking AtStake (r:1 w:10) + // Storage: ParachainStaking AtStake (r:1 w:9) // Storage: System Account (r:1001 w:1001) // Storage: ParachainStaking SelectedCandidates (r:0 w:1) // Storage: ParachainStaking DelayedPayouts (r:0 w:1) fn round_transition_on_initialize(x: u32, y: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 5_991_000 - .saturating_add(Weight::from_ref_time(110_733_000 as u64).saturating_mul(x as u64)) - // Standard Error: 5_000 - .saturating_add(Weight::from_ref_time(251_000 as u64).saturating_mul(y as u64)) - .saturating_add(RocksDbWeight::get().reads(17 as u64)) - .saturating_add(RocksDbWeight::get().reads((3 as u64).saturating_mul(x as u64))) - .saturating_add(RocksDbWeight::get().writes(9 as u64)) + Weight::from_ref_time(818_708_000 as u64) + // Standard Error: 1_936_078 + .saturating_add(Weight::from_ref_time(6_725_689 as u64).saturating_mul(x as u64)) + // Standard Error: 39_048 + .saturating_add(Weight::from_ref_time(233_534 as u64).saturating_mul(y as u64)) + .saturating_add(RocksDbWeight::get().reads(47 as u64)) + .saturating_add(RocksDbWeight::get().reads((2 as u64).saturating_mul(x as u64))) + .saturating_add(RocksDbWeight::get().writes(19 as u64)) .saturating_add(RocksDbWeight::get().writes((1 as u64).saturating_mul(x as u64))) } // Storage: ParachainStaking DelayedPayouts (r:1 w:0) @@ -720,9 +720,9 @@ impl WeightInfo for () { // Storage: ParachainStaking AtStake (r:1 w:1) // Storage: System Account (r:1 w:1) fn pay_one_collator_reward(y: u32, ) -> Weight { - Weight::from_ref_time(49_907_000 as u64) - // Standard Error: 31_000 - .saturating_add(Weight::from_ref_time(15_507_000 as u64).saturating_mul(y as u64)) + Weight::from_ref_time(75_956_000 as u64) + // Standard Error: 5_696 + .saturating_add(Weight::from_ref_time(20_359_782 as u64).saturating_mul(y as u64)) .saturating_add(RocksDbWeight::get().reads(6 as u64)) .saturating_add(RocksDbWeight::get().reads((1 as u64).saturating_mul(y as u64))) .saturating_add(RocksDbWeight::get().writes(3 as u64)) @@ -730,7 +730,7 @@ impl WeightInfo for () { } // Storage: ParachainStaking Round (r:1 w:0) fn base_on_initialize() -> Weight { - Weight::from_ref_time(3_336_000 as u64) + Weight::from_ref_time(11_242_000 as u64) .saturating_add(RocksDbWeight::get().reads(1 as u64)) } } diff --git a/runtime/litentry/Cargo.toml b/runtime/litentry/Cargo.toml index dd182bc439..7e6c71cade 100644 --- a/runtime/litentry/Cargo.toml +++ b/runtime/litentry/Cargo.toml @@ -121,9 +121,7 @@ runtime-benchmarks = [ "pallet-democracy/runtime-benchmarks", "pallet-membership/runtime-benchmarks", "pallet-multisig/runtime-benchmarks", - # This module timed out for some reason and had to be commented out temporarily - # https://github.com/litentry/litentry-parachain/actions/runs/3155868677/jobs/5134984739 - # "pallet-parachain-staking/runtime-benchmarks", + "pallet-parachain-staking/runtime-benchmarks", "pallet-preimage/runtime-benchmarks", "pallet-proxy/runtime-benchmarks", "pallet-scheduler/runtime-benchmarks", diff --git a/runtime/litentry/src/lib.rs b/runtime/litentry/src/lib.rs index 196ac586e5..1576eef962 100644 --- a/runtime/litentry/src/lib.rs +++ b/runtime/litentry/src/lib.rs @@ -937,9 +937,7 @@ mod benches { [pallet_scheduler, Scheduler] [pallet_preimage, Preimage] [pallet_session, SessionBench::] - // Since this module benchmark times out, comment it out for now - // https://github.com/litentry/litentry-parachain/actions/runs/3155868677/jobs/5134984739 - // [pallet_parachain_staking, ParachainStaking] + [pallet_parachain_staking, ParachainStaking] [cumulus_pallet_xcmp_queue, XcmpQueue] [pallet_bridge,ChainBridge] [pallet_bridge_transfer,BridgeTransfer] diff --git a/runtime/litentry/src/weights/pallet_parachain_staking.rs b/runtime/litentry/src/weights/pallet_parachain_staking.rs index d001275f16..dac1a9b7f3 100644 --- a/runtime/litentry/src/weights/pallet_parachain_staking.rs +++ b/runtime/litentry/src/weights/pallet_parachain_staking.rs @@ -14,27 +14,28 @@ // You should have received a copy of the GNU General Public License // along with Litentry. If not, see . -//! Autogenerated weights for `parachain_staking` +//! Autogenerated weights for `pallet_parachain_staking` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-07-12, STEPS: `5`, REPEAT: 10, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-11-23, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `parachain-benchmark`, CPU: `Intel(R) Xeon(R) Platinum 8175M CPU @ 2.50GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("litentry-dev"), DB CACHE: 20 // Executed Command: -// ./target/release/litentry-collator +// ./litentry-collator // benchmark // pallet // --chain=litentry-dev // --execution=wasm // --db-cache=20 // --wasm-execution=compiled -// --pallet=parachain_staking +// --pallet=pallet_parachain_staking // --extrinsic=* // --heap-pages=4096 -// --steps=5 -// --repeat=10 +// --steps=50 +// --repeat=20 // --header=./LICENSE_HEADER -// --output=./runtime/litentry/src/weights/parachain_staking.rs +// --output=./runtime/litentry/src/weights/pallet_parachain_staking.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -43,44 +44,62 @@ use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; -/// Weight functions for `parachain_staking`. +/// Weight functions for `pallet_parachain_staking`. pub struct WeightInfo(PhantomData); impl pallet_parachain_staking::WeightInfo for WeightInfo { + // Storage: ParachainStaking Candidates (r:1 w:1) + /// The range of component `x` is `[1, 100]`. + fn add_candidates_whitelist(x: u32, ) -> Weight { + Weight::from_ref_time(29_169_000 as u64) + // Standard Error: 2_933 + .saturating_add(Weight::from_ref_time(444_425 as u64).saturating_mul(x as u64)) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) + } + // Storage: ParachainStaking Candidates (r:1 w:1) + /// The range of component `x` is `[1, 100]`. + fn remove_candidates_whitelist(x: u32, ) -> Weight { + Weight::from_ref_time(29_490_000 as u64) + // Standard Error: 2_860 + .saturating_add(Weight::from_ref_time(414_338 as u64).saturating_mul(x as u64)) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) + } // Storage: ParachainStaking InflationConfig (r:1 w:1) fn set_staking_expectations() -> Weight { - Weight::from_ref_time(15_300_000 as u64) + Weight::from_ref_time(30_516_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: ParachainStaking InflationConfig (r:1 w:1) // Storage: ParachainStaking Round (r:1 w:0) fn set_inflation() -> Weight { - Weight::from_ref_time(43_400_000 as u64) + Weight::from_ref_time(82_254_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: ParachainStaking ParachainBondInfo (r:1 w:1) fn set_parachain_bond_account() -> Weight { - Weight::from_ref_time(14_900_000 as u64) + Weight::from_ref_time(29_979_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: ParachainStaking ParachainBondInfo (r:1 w:1) fn set_parachain_bond_reserve_percent() -> Weight { - Weight::from_ref_time(14_500_000 as u64) + Weight::from_ref_time(29_402_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: ParachainStaking TotalSelected (r:1 w:1) // Storage: ParachainStaking Round (r:1 w:0) fn set_total_selected() -> Weight { - Weight::from_ref_time(18_800_000 as u64) + Weight::from_ref_time(30_669_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: ParachainStaking CollatorCommission (r:1 w:1) fn set_collator_commission() -> Weight { - Weight::from_ref_time(17_000_000 as u64) + Weight::from_ref_time(28_496_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -88,122 +107,108 @@ impl pallet_parachain_staking::WeightInfo for WeightInf // Storage: ParachainStaking TotalSelected (r:1 w:0) // Storage: ParachainStaking InflationConfig (r:1 w:1) fn set_blocks_per_round() -> Weight { - Weight::from_ref_time(23_400_000 as u64) + Weight::from_ref_time(38_215_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } - fn add_candidates_whitelist(x: u32, ) -> Weight { - Weight::from_ref_time(76_974_000 as u64) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(112_000 as u64).saturating_mul(x as u64)) - .saturating_add(T::DbWeight::get().reads(6 as u64)) - .saturating_add(T::DbWeight::get().writes(8 as u64)) - } - fn remove_candidates_whitelist(x: u32, ) -> Weight { - Weight::from_ref_time(76_974_000 as u64) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(112_000 as u64).saturating_mul(x as u64)) - .saturating_add(T::DbWeight::get().reads(6 as u64)) - .saturating_add(T::DbWeight::get().writes(8 as u64)) - } + // Storage: ParachainStaking Candidates (r:1 w:0) // Storage: ParachainStaking CandidateInfo (r:1 w:1) // Storage: ParachainStaking DelegatorState (r:1 w:0) // Storage: ParachainStaking CandidatePool (r:1 w:1) // Storage: System Account (r:1 w:1) - // Storage: Balances Locks (r:1 w:1) // Storage: ParachainStaking Total (r:1 w:1) // Storage: ParachainStaking TopDelegations (r:0 w:1) - // Storage: ParachainStaking CollatorReserveToLockMigrations (r:0 w:1) // Storage: ParachainStaking BottomDelegations (r:0 w:1) + /// The range of component `x` is `[3, 1000]`. fn join_candidates(x: u32, ) -> Weight { - Weight::from_ref_time(89_407_000 as u64) - // Standard Error: 11_000 - .saturating_add(Weight::from_ref_time(138_000 as u64).saturating_mul(x as u64)) + Weight::from_ref_time(78_352_000 as u64) + // Standard Error: 1_111 + .saturating_add(Weight::from_ref_time(338_662 as u64).saturating_mul(x as u64)) .saturating_add(T::DbWeight::get().reads(6 as u64)) - .saturating_add(T::DbWeight::get().writes(8 as u64)) + .saturating_add(T::DbWeight::get().writes(6 as u64)) } // Storage: ParachainStaking CandidateInfo (r:1 w:1) // Storage: ParachainStaking Round (r:1 w:0) // Storage: ParachainStaking CandidatePool (r:1 w:1) + /// The range of component `x` is `[3, 1000]`. fn schedule_leave_candidates(x: u32, ) -> Weight { - Weight::from_ref_time(67_029_000 as u64) - // Standard Error: 12_000 - .saturating_add(Weight::from_ref_time(96_000 as u64).saturating_mul(x as u64)) + Weight::from_ref_time(48_516_000 as u64) + // Standard Error: 1_266 + .saturating_add(Weight::from_ref_time(308_746 as u64).saturating_mul(x as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: ParachainStaking CandidateInfo (r:1 w:1) // Storage: ParachainStaking Round (r:1 w:0) // Storage: ParachainStaking TopDelegations (r:1 w:1) - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Storage: Balances Locks (r:2 w:2) // Storage: System Account (r:2 w:2) + // Storage: ParachainStaking DelegatorState (r:1 w:1) // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) // Storage: ParachainStaking BottomDelegations (r:1 w:1) // Storage: ParachainStaking Total (r:1 w:1) + /// The range of component `x` is `[2, 1200]`. fn execute_leave_candidates(x: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 637_000 - .saturating_add(Weight::from_ref_time(41_134_000 as u64).saturating_mul(x as u64)) - .saturating_add(T::DbWeight::get().reads(5 as u64)) - .saturating_add(T::DbWeight::get().reads((3 as u64).saturating_mul(x as u64))) - .saturating_add(T::DbWeight::get().writes(4 as u64)) - .saturating_add(T::DbWeight::get().writes((3 as u64).saturating_mul(x as u64))) + Weight::from_ref_time(163_491_000 as u64) + // Standard Error: 359_349 + .saturating_add(Weight::from_ref_time(60_504_854 as u64).saturating_mul(x as u64)) + .saturating_add(T::DbWeight::get().reads(9 as u64)) + .saturating_add(T::DbWeight::get().reads((2 as u64).saturating_mul(x as u64))) + .saturating_add(T::DbWeight::get().writes(8 as u64)) + .saturating_add(T::DbWeight::get().writes((2 as u64).saturating_mul(x as u64))) } // Storage: ParachainStaking CandidateInfo (r:1 w:1) // Storage: ParachainStaking CandidatePool (r:1 w:1) + /// The range of component `x` is `[3, 1000]`. fn cancel_leave_candidates(x: u32, ) -> Weight { - Weight::from_ref_time(60_859_000 as u64) - // Standard Error: 11_000 - .saturating_add(Weight::from_ref_time(109_000 as u64).saturating_mul(x as u64)) + Weight::from_ref_time(45_830_000 as u64) + // Standard Error: 3_690 + .saturating_add(Weight::from_ref_time(440_829 as u64).saturating_mul(x as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: ParachainStaking CandidateInfo (r:1 w:1) // Storage: ParachainStaking CandidatePool (r:1 w:1) fn go_offline() -> Weight { - Weight::from_ref_time(24_300_000 as u64) + Weight::from_ref_time(42_660_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: ParachainStaking CandidateInfo (r:1 w:1) // Storage: ParachainStaking CandidatePool (r:1 w:1) fn go_online() -> Weight { - Weight::from_ref_time(23_400_000 as u64) + Weight::from_ref_time(41_748_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: ParachainStaking CandidateInfo (r:1 w:1) // Storage: System Account (r:1 w:1) // Storage: ParachainStaking Total (r:1 w:1) - // Storage: Balances Locks (r:1 w:1) // Storage: ParachainStaking CandidatePool (r:1 w:1) fn candidate_bond_more() -> Weight { - Weight::from_ref_time(48_900_000 as u64) - .saturating_add(T::DbWeight::get().reads(5 as u64)) - .saturating_add(T::DbWeight::get().writes(5 as u64)) + Weight::from_ref_time(69_829_000 as u64) + .saturating_add(T::DbWeight::get().reads(4 as u64)) + .saturating_add(T::DbWeight::get().writes(4 as u64)) } // Storage: ParachainStaking CandidateInfo (r:1 w:1) // Storage: ParachainStaking Round (r:1 w:0) fn schedule_candidate_bond_less() -> Weight { - Weight::from_ref_time(22_000_000 as u64) + Weight::from_ref_time(40_002_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: ParachainStaking CandidateInfo (r:1 w:1) // Storage: ParachainStaking Round (r:1 w:0) - // Storage: ParachainStaking Total (r:1 w:1) - // Storage: Balances Locks (r:1 w:1) // Storage: System Account (r:1 w:1) + // Storage: ParachainStaking Total (r:1 w:1) // Storage: ParachainStaking CandidatePool (r:1 w:1) fn execute_candidate_bond_less() -> Weight { - Weight::from_ref_time(88_200_000 as u64) - .saturating_add(T::DbWeight::get().reads(6 as u64)) - .saturating_add(T::DbWeight::get().writes(5 as u64)) + Weight::from_ref_time(111_567_000 as u64) + .saturating_add(T::DbWeight::get().reads(5 as u64)) + .saturating_add(T::DbWeight::get().writes(4 as u64)) } // Storage: ParachainStaking CandidateInfo (r:1 w:1) fn cancel_candidate_bond_less() -> Weight { - Weight::from_ref_time(19_600_000 as u64) + Weight::from_ref_time(36_842_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -212,21 +217,23 @@ impl pallet_parachain_staking::WeightInfo for WeightInf // Storage: ParachainStaking CandidateInfo (r:1 w:1) // Storage: ParachainStaking TopDelegations (r:1 w:1) // Storage: ParachainStaking CandidatePool (r:1 w:1) - // Storage: Balances Locks (r:1 w:1) // Storage: ParachainStaking Total (r:1 w:1) - // Storage: ParachainStaking DelegatorReserveToLockMigrations (r:0 w:1) - fn delegate(_x: u32, y: u32, ) -> Weight { - Weight::from_ref_time(180_632_000 as u64) - // Standard Error: 27_000 - .saturating_add(Weight::from_ref_time(35_000 as u64).saturating_mul(y as u64)) - .saturating_add(T::DbWeight::get().reads(7 as u64)) - .saturating_add(T::DbWeight::get().writes(8 as u64)) + /// The range of component `x` is `[3, 100]`. + /// The range of component `y` is `[2, 1000]`. + fn delegate(x: u32, y: u32, ) -> Weight { + Weight::from_ref_time(182_626_000 as u64) + // Standard Error: 14_039 + .saturating_add(Weight::from_ref_time(268_564 as u64).saturating_mul(x as u64)) + // Standard Error: 1_407 + .saturating_add(Weight::from_ref_time(247_435 as u64).saturating_mul(y as u64)) + .saturating_add(T::DbWeight::get().reads(6 as u64)) + .saturating_add(T::DbWeight::get().writes(6 as u64)) } // Storage: ParachainStaking DelegatorState (r:1 w:1) // Storage: ParachainStaking Round (r:1 w:0) // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) fn schedule_leave_delegators() -> Weight { - Weight::from_ref_time(30_800_000 as u64) + Weight::from_ref_time(46_835_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -236,22 +243,22 @@ impl pallet_parachain_staking::WeightInfo for WeightInf // Storage: ParachainStaking CandidateInfo (r:1 w:1) // Storage: ParachainStaking TopDelegations (r:1 w:1) // Storage: ParachainStaking CandidatePool (r:1 w:1) - // Storage: ParachainStaking Total (r:1 w:1) - // Storage: Balances Locks (r:1 w:1) // Storage: System Account (r:1 w:1) + // Storage: ParachainStaking Total (r:1 w:1) + /// The range of component `x` is `[2, 100]`. fn execute_leave_delegators(x: u32, ) -> Weight { - Weight::from_ref_time(22_286_000 as u64) - // Standard Error: 512_000 - .saturating_add(Weight::from_ref_time(33_062_000 as u64).saturating_mul(x as u64)) - .saturating_add(T::DbWeight::get().reads(3 as u64)) + Weight::from_ref_time(144_551_000 as u64) + // Standard Error: 83_239 + .saturating_add(Weight::from_ref_time(52_426_573 as u64).saturating_mul(x as u64)) + .saturating_add(T::DbWeight::get().reads(8 as u64)) .saturating_add(T::DbWeight::get().reads((3 as u64).saturating_mul(x as u64))) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + .saturating_add(T::DbWeight::get().writes(7 as u64)) .saturating_add(T::DbWeight::get().writes((3 as u64).saturating_mul(x as u64))) } // Storage: ParachainStaking DelegatorState (r:1 w:1) // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) fn cancel_leave_delegators() -> Weight { - Weight::from_ref_time(30_900_000 as u64) + Weight::from_ref_time(65_553_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -259,70 +266,67 @@ impl pallet_parachain_staking::WeightInfo for WeightInf // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) // Storage: ParachainStaking Round (r:1 w:0) fn schedule_revoke_delegation() -> Weight { - Weight::from_ref_time(29_300_000 as u64) + Weight::from_ref_time(60_913_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:0) // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Storage: System Account (r:1 w:1) - // Storage: Balances Locks (r:1 w:1) // Storage: ParachainStaking CandidateInfo (r:1 w:1) + // Storage: System Account (r:1 w:1) // Storage: ParachainStaking TopDelegations (r:1 w:1) // Storage: ParachainStaking CandidatePool (r:1 w:1) // Storage: ParachainStaking Total (r:1 w:1) fn delegator_bond_more() -> Weight { - Weight::from_ref_time(67_200_000 as u64) - .saturating_add(T::DbWeight::get().reads(8 as u64)) - .saturating_add(T::DbWeight::get().writes(7 as u64)) + Weight::from_ref_time(151_275_000 as u64) + .saturating_add(T::DbWeight::get().reads(7 as u64)) + .saturating_add(T::DbWeight::get().writes(6 as u64)) } // Storage: ParachainStaking DelegatorState (r:1 w:1) // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) // Storage: ParachainStaking Round (r:1 w:0) fn schedule_delegator_bond_less() -> Weight { - Weight::from_ref_time(34_600_000 as u64) + Weight::from_ref_time(57_708_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: ParachainStaking DelegatorState (r:1 w:1) // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) // Storage: ParachainStaking Round (r:1 w:0) - // Storage: Balances Locks (r:1 w:1) - // Storage: System Account (r:1 w:1) // Storage: ParachainStaking CandidateInfo (r:1 w:1) // Storage: ParachainStaking TopDelegations (r:1 w:1) // Storage: ParachainStaking CandidatePool (r:1 w:1) + // Storage: System Account (r:1 w:1) // Storage: ParachainStaking Total (r:1 w:1) fn execute_revoke_delegation() -> Weight { - Weight::from_ref_time(126_800_000 as u64) - .saturating_add(T::DbWeight::get().reads(9 as u64)) - .saturating_add(T::DbWeight::get().writes(8 as u64)) + Weight::from_ref_time(172_803_000 as u64) + .saturating_add(T::DbWeight::get().reads(8 as u64)) + .saturating_add(T::DbWeight::get().writes(7 as u64)) } // Storage: ParachainStaking DelegatorState (r:1 w:1) // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) // Storage: ParachainStaking Round (r:1 w:0) // Storage: ParachainStaking CandidateInfo (r:1 w:1) - // Storage: Balances Locks (r:1 w:1) // Storage: System Account (r:1 w:1) // Storage: ParachainStaking TopDelegations (r:1 w:1) // Storage: ParachainStaking CandidatePool (r:1 w:1) // Storage: ParachainStaking Total (r:1 w:1) fn execute_delegator_bond_less() -> Weight { - Weight::from_ref_time(122_600_000 as u64) - .saturating_add(T::DbWeight::get().reads(9 as u64)) - .saturating_add(T::DbWeight::get().writes(8 as u64)) + Weight::from_ref_time(166_335_000 as u64) + .saturating_add(T::DbWeight::get().reads(8 as u64)) + .saturating_add(T::DbWeight::get().writes(7 as u64)) } // Storage: ParachainStaking DelegatorState (r:1 w:1) // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) fn cancel_revoke_delegation() -> Weight { - Weight::from_ref_time(26_000_000 as u64) + Weight::from_ref_time(48_565_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: ParachainStaking DelegatorState (r:1 w:1) // Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) fn cancel_delegator_bond_less() -> Weight { - Weight::from_ref_time(65_600_000 as u64) + Weight::from_ref_time(101_335_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -330,26 +334,31 @@ impl pallet_parachain_staking::WeightInfo for WeightInf // Storage: ParachainStaking Points (r:1 w:0) // Storage: ParachainStaking Staked (r:1 w:2) // Storage: ParachainStaking InflationConfig (r:1 w:0) + // Storage: BridgeTransfer ExternalBalances (r:1 w:0) // Storage: ParachainStaking ParachainBondInfo (r:1 w:0) - // Storage: System Account (r:302 w:301) // Storage: ParachainStaking CollatorCommission (r:1 w:0) // Storage: ParachainStaking CandidatePool (r:1 w:0) // Storage: ParachainStaking TotalSelected (r:1 w:0) - // Storage: ParachainStaking CandidateInfo (r:9 w:0) - // Storage: ParachainStaking DelegationScheduledRequests (r:9 w:0) - // Storage: ParachainStaking TopDelegations (r:9 w:0) + // Storage: ParachainStaking CandidateInfo (r:8 w:0) + // Storage: ParachainStaking DelegationScheduledRequests (r:8 w:0) + // Storage: ParachainStaking TopDelegations (r:8 w:0) // Storage: ParachainStaking Total (r:1 w:0) // Storage: ParachainStaking AwardedPts (r:2 w:1) - // Storage: ParachainStaking AtStake (r:1 w:10) + // Storage: ParachainStaking AtStake (r:1 w:9) + // Storage: System Account (r:1001 w:1001) // Storage: ParachainStaking SelectedCandidates (r:0 w:1) // Storage: ParachainStaking DelayedPayouts (r:0 w:1) + /// The range of component `x` is `[8, 100]`. + /// The range of component `y` is `[0, 5000]`. fn round_transition_on_initialize(x: u32, y: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 4_678_000 - .saturating_add(Weight::from_ref_time(51_652_000 as u64).saturating_mul(x as u64)) - // Standard Error: 14_000 - .saturating_add(Weight::from_ref_time(336_000 as u64).saturating_mul(y as u64)) + Weight::from_ref_time(1_472_540_000 as u64) + // Standard Error: 1_664_214 + .saturating_add(Weight::from_ref_time(23_948_535 as u64).saturating_mul(x as u64)) + // Standard Error: 33_573 + .saturating_add(Weight::from_ref_time(167_308 as u64).saturating_mul(y as u64)) + .saturating_add(T::DbWeight::get().reads(41 as u64)) .saturating_add(T::DbWeight::get().reads((3 as u64).saturating_mul(x as u64))) + .saturating_add(T::DbWeight::get().writes(17 as u64)) .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(x as u64))) } // Storage: ParachainStaking DelayedPayouts (r:1 w:0) @@ -357,10 +366,11 @@ impl pallet_parachain_staking::WeightInfo for WeightInf // Storage: ParachainStaking AwardedPts (r:2 w:1) // Storage: ParachainStaking AtStake (r:1 w:1) // Storage: System Account (r:1 w:1) + /// The range of component `y` is `[0, 1000]`. fn pay_one_collator_reward(y: u32, ) -> Weight { - Weight::from_ref_time(47_782_000 as u64) - // Standard Error: 162_000 - .saturating_add(Weight::from_ref_time(17_751_000 as u64).saturating_mul(y as u64)) + Weight::from_ref_time(82_501_000 as u64) + // Standard Error: 165_332 + .saturating_add(Weight::from_ref_time(36_064_305 as u64).saturating_mul(y as u64)) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(y as u64))) .saturating_add(T::DbWeight::get().writes(3 as u64)) @@ -368,7 +378,7 @@ impl pallet_parachain_staking::WeightInfo for WeightInf } // Storage: ParachainStaking Round (r:1 w:0) fn base_on_initialize() -> Weight { - Weight::from_ref_time(4_000_000 as u64) + Weight::from_ref_time(12_268_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) } } diff --git a/scripts/benchmark-weight-local.sh b/scripts/benchmark-weight-local.sh index 71d1505e21..af0b17d263 100755 --- a/scripts/benchmark-weight-local.sh +++ b/scripts/benchmark-weight-local.sh @@ -48,17 +48,26 @@ case "$3" in ;; esac -./target/release/litentry-collator benchmark pallet \ - $CHAIN \ - --execution=wasm \ - --db-cache=20 \ - --wasm-execution=compiled \ - --pallet="$PALLET" \ - --extrinsic=* \ - --heap-pages=4096 \ - --steps=20 \ - --repeat=50 \ - --header=./LICENSE_HEADER \ - $TEMPLATE \ - $OUTPUT +if [[ $PALLET == *"parachain_staking"* ]]; then + echo "will run $PALLET benchmark code" + STEPS=25 + REPEAT=20 +else + echo "will run other pallet ($PALLET) benchmark code" + STEPS=20 + REPEAT=50 +fi +./target/release/litentry-collator benchmark pallet \ + $CHAIN \ + --execution=wasm \ + --db-cache=20 \ + --wasm-execution=compiled \ + --pallet="$PALLET" \ + --extrinsic=* \ + --heap-pages=4096 \ + --steps="$STEPS" \ + --repeat="$REPEAT" \ + --header=./LICENSE_HEADER \ + $TEMPLATE \ + $OUTPUT diff --git a/scripts/benchmark-weight-remote.sh b/scripts/benchmark-weight-remote.sh index a1ec5594cd..e010b9a79f 100755 --- a/scripts/benchmark-weight-remote.sh +++ b/scripts/benchmark-weight-remote.sh @@ -57,19 +57,31 @@ fi for p in $PALLETS; do echo "benchmarking $p ..." + + if [[ $p == *"parachain_staking"* ]]; then + echo "will run $p benchmark code" + STEPS=25 + REPEAT=20 + else + echo "will run other pallet ($p) benchmark code" + STEPS=20 + REPEAT=50 + fi + # filter out the flooding warnings from pallet_scheduler: # Warning: There are more items queued in the Scheduler than expected from the runtime configuration. # An update might be needed RUST_LOG=runtime::scheduler=error ./litentry-collator benchmark pallet \ - --chain=$1-dev \ - --execution=wasm \ - --db-cache=20 \ - --wasm-execution=compiled \ - --pallet="$p" \ - --extrinsic=* \ - --heap-pages=4096 \ - --steps=20 \ - --repeat=50 \ - --header=./LICENSE_HEADER \ - --output=./runtime/$1/src/weights/"$p".rs + --chain=$1-dev \ + --execution=wasm \ + --db-cache=20 \ + --wasm-execution=compiled \ + --pallet="$p" \ + --extrinsic=* \ + --heap-pages=4096 \ + --steps="$STEPS" \ + --repeat="$REPEAT" \ + --header=./LICENSE_HEADER \ + --output=./runtime/$1/src/weights/"$p".rs + done \ No newline at end of file