Bound staking storage items (#12230)

* replace pallet level unboundedness to individual storage items

* bound structs

* bounding history depth

* defensive error

* use the era history depth from config

* clean up history depth from storage in v11

* keep the name HistoryDepth for the new configuration value

* use u32 for history depth in node runtime

* improve doc comments

* add HistoryDepth to mock runtimes with pallet-staking

* rustfmt

* refactor and doc improve

* apply re-benchmarked weight for staking

* pr feedback improvements

* test for claimed rewards following the expected bounds

* refactor test to calculate first and last reward era programmatically

* verify previous eras cannot be claimed

* add migration v12

* ".git/.scripts/bench-bot.sh" pallet dev pallet_staking

* fix compiler error

* corrupting history depth does not lead to catastrophic issue

* fix new line

* remove unused import

* fmt

* add test to document scenario where history depth is reduced without migration

* fmt

* Update frame/staking/src/lib.rs

Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>

* Update frame/staking/src/migrations.rs

Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>

* doc for all storage items bounded by HistoryDepth

* Update frame/staking/src/pallet/mod.rs

Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>

* Update frame/staking/src/tests.rs

Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>

* pr feedback fixes

* Update frame/staking/src/tests.rs

Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>

* remove extra checks

* fix merge

* fmt

Co-authored-by: command-bot <>
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
Co-authored-by: kianenigma <kian@parity.io>
This commit is contained in:
Ankan
2022-09-21 10:57:02 +02:00
committed by GitHub
parent 86198c5471
commit c6a9abcc68
16 changed files with 669 additions and 483 deletions
+269 -276
View File
@@ -18,22 +18,24 @@
//! Autogenerated weights for pallet_staking
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2022-05-24, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2022-09-19, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! HOSTNAME: `bm3`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024
// Executed Command:
// ./target/production/substrate
// /home/benchbot/cargo_target_dir/production/substrate
// benchmark
// pallet
// --chain=dev
// --steps=50
// --repeat=20
// --pallet=pallet_staking
// --extrinsic=*
// --execution=wasm
// --wasm-execution=compiled
// --template=./.maintain/frame-weight-template.hbs
// --heap-pages=4096
// --pallet=pallet_staking
// --chain=dev
// --output=./frame/staking/src/weights.rs
// --template=./.maintain/frame-weight-template.hbs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
@@ -65,7 +67,6 @@ pub trait WeightInfo {
fn payout_stakers_dead_controller(n: u32, ) -> Weight;
fn payout_stakers_alive_staked(n: u32, ) -> Weight;
fn rebond(l: u32, ) -> Weight;
fn set_history_depth(e: u32, ) -> Weight;
fn reap_stash(s: u32, ) -> Weight;
fn new_era(v: u32, n: u32, ) -> Weight;
fn get_npos_voters(v: u32, n: u32, s: u32, ) -> Weight;
@@ -82,21 +83,20 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Staking Bonded (r:1 w:1)
// Storage: Staking Ledger (r:1 w:1)
// Storage: Staking CurrentEra (r:1 w:0)
// Storage: Staking HistoryDepth (r:1 w:0)
// Storage: Balances Locks (r:1 w:1)
// Storage: Staking Payee (r:0 w:1)
fn bond() -> Weight {
Weight::from_ref_time(43_992_000 as u64)
.saturating_add(T::DbWeight::get().reads(5 as u64))
Weight::from_ref_time(52_281_000 as u64)
.saturating_add(T::DbWeight::get().reads(4 as u64))
.saturating_add(T::DbWeight::get().writes(4 as u64))
}
// Storage: Staking Bonded (r:1 w:0)
// Storage: Staking Ledger (r:1 w:1)
// Storage: Balances Locks (r:1 w:1)
// Storage: BagsList ListNodes (r:3 w:3)
// Storage: BagsList ListBags (r:2 w:2)
// Storage: VoterBagsList ListNodes (r:3 w:3)
// Storage: VoterBagsList ListBags (r:2 w:2)
fn bond_extra() -> Weight {
Weight::from_ref_time(75_827_000 as u64)
Weight::from_ref_time(89_748_000 as u64)
.saturating_add(T::DbWeight::get().reads(8 as u64))
.saturating_add(T::DbWeight::get().writes(7 as u64))
}
@@ -106,11 +106,11 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Staking CurrentEra (r:1 w:0)
// Storage: Balances Locks (r:1 w:1)
// Storage: System Account (r:1 w:1)
// Storage: BagsList ListNodes (r:3 w:3)
// Storage: VoterBagsList ListNodes (r:3 w:3)
// Storage: Staking Bonded (r:1 w:0)
// Storage: BagsList ListBags (r:2 w:2)
// Storage: VoterBagsList ListBags (r:2 w:2)
fn unbond() -> Weight {
Weight::from_ref_time(81_075_000 as u64)
Weight::from_ref_time(94_782_000 as u64)
.saturating_add(T::DbWeight::get().reads(12 as u64))
.saturating_add(T::DbWeight::get().writes(8 as u64))
}
@@ -118,10 +118,11 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Staking CurrentEra (r:1 w:0)
// Storage: Balances Locks (r:1 w:1)
// Storage: System Account (r:1 w:1)
/// The range of component `s` is `[0, 100]`.
fn withdraw_unbonded_update(s: u32, ) -> Weight {
Weight::from_ref_time(35_763_000 as u64)
// Standard Error: 0
.saturating_add(Weight::from_ref_time(57_000 as u64).saturating_mul(s as u64))
Weight::from_ref_time(44_499_000 as u64)
// Standard Error: 387
.saturating_add(Weight::from_ref_time(72_726 as u64).saturating_mul(s as u64))
.saturating_add(T::DbWeight::get().reads(4 as u64))
.saturating_add(T::DbWeight::get().writes(3 as u64))
}
@@ -132,14 +133,17 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Staking Validators (r:1 w:0)
// Storage: Staking Nominators (r:1 w:1)
// Storage: Staking CounterForNominators (r:1 w:1)
// Storage: BagsList ListNodes (r:2 w:2)
// Storage: BagsList ListBags (r:1 w:1)
// Storage: BagsList CounterForListNodes (r:1 w:1)
// Storage: VoterBagsList ListNodes (r:2 w:2)
// Storage: VoterBagsList ListBags (r:1 w:1)
// Storage: VoterBagsList CounterForListNodes (r:1 w:1)
// Storage: System Account (r:1 w:1)
// Storage: Balances Locks (r:1 w:1)
// Storage: Staking Payee (r:0 w:1)
fn withdraw_unbonded_kill(_s: u32, ) -> Weight {
Weight::from_ref_time(66_938_000 as u64)
/// The range of component `s` is `[0, 100]`.
fn withdraw_unbonded_kill(s: u32, ) -> Weight {
Weight::from_ref_time(83_230_000 as u64)
// Standard Error: 612
.saturating_add(Weight::from_ref_time(10_289 as u64).saturating_mul(s as u64))
.saturating_add(T::DbWeight::get().reads(13 as u64))
.saturating_add(T::DbWeight::get().writes(11 as u64))
}
@@ -150,23 +154,25 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Staking MaxValidatorsCount (r:1 w:0)
// Storage: Staking Nominators (r:1 w:0)
// Storage: Staking Bonded (r:1 w:0)
// Storage: BagsList ListNodes (r:1 w:1)
// Storage: BagsList ListBags (r:1 w:1)
// Storage: BagsList CounterForListNodes (r:1 w:1)
// Storage: VoterBagsList ListNodes (r:1 w:1)
// Storage: VoterBagsList ListBags (r:1 w:1)
// Storage: VoterBagsList CounterForListNodes (r:1 w:1)
// Storage: Staking CounterForValidators (r:1 w:1)
fn validate() -> Weight {
Weight::from_ref_time(52_943_000 as u64)
Weight::from_ref_time(64_430_000 as u64)
.saturating_add(T::DbWeight::get().reads(11 as u64))
.saturating_add(T::DbWeight::get().writes(5 as u64))
}
// Storage: Staking Ledger (r:1 w:0)
// Storage: Staking Nominators (r:1 w:1)
/// The range of component `k` is `[1, 128]`.
fn kick(k: u32, ) -> Weight {
Weight::from_ref_time(23_264_000 as u64)
// Standard Error: 11_000
.saturating_add(Weight::from_ref_time(8_006_000 as u64).saturating_mul(k as u64))
.saturating_add(T::DbWeight::get().reads(1 as u64))
Weight::from_ref_time(42_030_000 as u64)
// Standard Error: 5_873
.saturating_add(Weight::from_ref_time(6_747_156 as u64).saturating_mul(k as u64))
.saturating_add(T::DbWeight::get().reads(2 as u64))
.saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(k as u64)))
.saturating_add(T::DbWeight::get().writes(1 as u64))
.saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(k as u64)))
}
// Storage: Staking Ledger (r:1 w:0)
@@ -176,15 +182,16 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Staking Validators (r:2 w:0)
// Storage: Staking CurrentEra (r:1 w:0)
// Storage: Staking Bonded (r:1 w:0)
// Storage: BagsList ListNodes (r:2 w:2)
// Storage: BagsList ListBags (r:1 w:1)
// Storage: BagsList CounterForListNodes (r:1 w:1)
// Storage: VoterBagsList ListNodes (r:2 w:2)
// Storage: VoterBagsList ListBags (r:1 w:1)
// Storage: VoterBagsList CounterForListNodes (r:1 w:1)
// Storage: Staking CounterForNominators (r:1 w:1)
/// The range of component `n` is `[1, 16]`.
fn nominate(n: u32, ) -> Weight {
Weight::from_ref_time(56_596_000 as u64)
// Standard Error: 14_000
.saturating_add(Weight::from_ref_time(3_644_000 as u64).saturating_mul(n as u64))
.saturating_add(T::DbWeight::get().reads(12 as u64))
Weight::from_ref_time(70_834_000 as u64)
// Standard Error: 4_405
.saturating_add(Weight::from_ref_time(2_583_120 as u64).saturating_mul(n as u64))
.saturating_add(T::DbWeight::get().reads(13 as u64))
.saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(n as u64)))
.saturating_add(T::DbWeight::get().writes(6 as u64))
}
@@ -192,53 +199,54 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Staking Validators (r:1 w:0)
// Storage: Staking Nominators (r:1 w:1)
// Storage: Staking CounterForNominators (r:1 w:1)
// Storage: BagsList ListNodes (r:2 w:2)
// Storage: BagsList ListBags (r:1 w:1)
// Storage: BagsList CounterForListNodes (r:1 w:1)
// Storage: VoterBagsList ListNodes (r:2 w:2)
// Storage: VoterBagsList ListBags (r:1 w:1)
// Storage: VoterBagsList CounterForListNodes (r:1 w:1)
fn chill() -> Weight {
Weight::from_ref_time(51_117_000 as u64)
Weight::from_ref_time(63_328_000 as u64)
.saturating_add(T::DbWeight::get().reads(8 as u64))
.saturating_add(T::DbWeight::get().writes(6 as u64))
}
// Storage: Staking Ledger (r:1 w:0)
// Storage: Staking Payee (r:0 w:1)
fn set_payee() -> Weight {
Weight::from_ref_time(11_223_000 as u64)
Weight::from_ref_time(17_763_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: Staking Bonded (r:1 w:1)
// Storage: Staking Ledger (r:2 w:2)
fn set_controller() -> Weight {
Weight::from_ref_time(19_826_000 as u64)
Weight::from_ref_time(26_163_000 as u64)
.saturating_add(T::DbWeight::get().reads(3 as u64))
.saturating_add(T::DbWeight::get().writes(3 as u64))
}
// Storage: Staking ValidatorCount (r:0 w:1)
fn set_validator_count() -> Weight {
Weight::from_ref_time(3_789_000 as u64)
Weight::from_ref_time(4_842_000 as u64)
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: Staking ForceEra (r:0 w:1)
fn force_no_eras() -> Weight {
Weight::from_ref_time(3_793_000 as u64)
Weight::from_ref_time(4_974_000 as u64)
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: Staking ForceEra (r:0 w:1)
fn force_new_era() -> Weight {
Weight::from_ref_time(3_802_000 as u64)
Weight::from_ref_time(5_039_000 as u64)
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: Staking ForceEra (r:0 w:1)
fn force_new_era_always() -> Weight {
Weight::from_ref_time(3_762_000 as u64)
Weight::from_ref_time(4_950_000 as u64)
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: Staking Invulnerables (r:0 w:1)
/// The range of component `v` is `[0, 1000]`.
fn set_invulnerables(v: u32, ) -> Weight {
Weight::from_ref_time(4_318_000 as u64)
// Standard Error: 0
.saturating_add(Weight::from_ref_time(10_000 as u64).saturating_mul(v as u64))
Weight::from_ref_time(5_150_000 as u64)
// Standard Error: 30
.saturating_add(Weight::from_ref_time(10_540 as u64).saturating_mul(v as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: Staking Bonded (r:1 w:1)
@@ -246,32 +254,33 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Staking Validators (r:1 w:0)
// Storage: Staking Nominators (r:1 w:1)
// Storage: Staking CounterForNominators (r:1 w:1)
// Storage: BagsList ListNodes (r:2 w:2)
// Storage: BagsList ListBags (r:1 w:1)
// Storage: BagsList CounterForListNodes (r:1 w:1)
// Storage: VoterBagsList ListNodes (r:2 w:2)
// Storage: VoterBagsList ListBags (r:1 w:1)
// Storage: VoterBagsList CounterForListNodes (r:1 w:1)
// Storage: System Account (r:1 w:1)
// Storage: Balances Locks (r:1 w:1)
// Storage: Staking Ledger (r:0 w:1)
// Storage: Staking Payee (r:0 w:1)
// Storage: Staking SpanSlash (r:0 w:2)
/// The range of component `s` is `[0, 100]`.
fn force_unstake(s: u32, ) -> Weight {
Weight::from_ref_time(65_265_000 as u64)
// Standard Error: 1_000
.saturating_add(Weight::from_ref_time(1_029_000 as u64).saturating_mul(s as u64))
Weight::from_ref_time(76_282_000 as u64)
// Standard Error: 2_397
.saturating_add(Weight::from_ref_time(1_137_934 as u64).saturating_mul(s as u64))
.saturating_add(T::DbWeight::get().reads(11 as u64))
.saturating_add(T::DbWeight::get().writes(12 as u64))
.saturating_add(T::DbWeight::get().writes(11 as u64))
.saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(s as u64)))
}
// Storage: Staking UnappliedSlashes (r:1 w:1)
/// The range of component `s` is `[1, 1000]`.
fn cancel_deferred_slash(s: u32, ) -> Weight {
Weight::from_ref_time(903_312_000 as u64)
// Standard Error: 56_000
.saturating_add(Weight::from_ref_time(4_968_000 as u64).saturating_mul(s as u64))
Weight::from_ref_time(93_690_000 as u64)
// Standard Error: 43_203
.saturating_add(Weight::from_ref_time(6_149_862 as u64).saturating_mul(s as u64))
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: Staking CurrentEra (r:1 w:0)
// Storage: Staking HistoryDepth (r:1 w:0)
// Storage: Staking ErasValidatorReward (r:1 w:0)
// Storage: Staking Bonded (r:2 w:0)
// Storage: Staking Ledger (r:1 w:1)
@@ -280,17 +289,17 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Staking ErasValidatorPrefs (r:1 w:0)
// Storage: Staking Payee (r:2 w:0)
// Storage: System Account (r:2 w:2)
/// The range of component `n` is `[1, 256]`.
fn payout_stakers_dead_controller(n: u32, ) -> Weight {
Weight::from_ref_time(87_569_000 as u64)
// Standard Error: 14_000
.saturating_add(Weight::from_ref_time(24_232_000 as u64).saturating_mul(n as u64))
.saturating_add(T::DbWeight::get().reads(10 as u64))
Weight::from_ref_time(151_647_000 as u64)
// Standard Error: 8_237
.saturating_add(Weight::from_ref_time(21_296_415 as u64).saturating_mul(n as u64))
.saturating_add(T::DbWeight::get().reads(12 as u64))
.saturating_add(T::DbWeight::get().reads((3 as u64).saturating_mul(n as u64)))
.saturating_add(T::DbWeight::get().writes(2 as u64))
.saturating_add(T::DbWeight::get().writes(3 as u64))
.saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(n as u64)))
}
// Storage: Staking CurrentEra (r:1 w:0)
// Storage: Staking HistoryDepth (r:1 w:0)
// Storage: Staking ErasValidatorReward (r:1 w:0)
// Storage: Staking Bonded (r:2 w:0)
// Storage: Staking Ledger (r:2 w:2)
@@ -300,45 +309,30 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Staking Payee (r:2 w:0)
// Storage: System Account (r:2 w:2)
// Storage: Balances Locks (r:2 w:2)
/// The range of component `n` is `[1, 256]`.
fn payout_stakers_alive_staked(n: u32, ) -> Weight {
Weight::from_ref_time(98_839_000 as u64)
// Standard Error: 21_000
.saturating_add(Weight::from_ref_time(34_480_000 as u64).saturating_mul(n as u64))
.saturating_add(T::DbWeight::get().reads(11 as u64))
Weight::from_ref_time(197_310_000 as u64)
// Standard Error: 13_818
.saturating_add(Weight::from_ref_time(30_053_043 as u64).saturating_mul(n as u64))
.saturating_add(T::DbWeight::get().reads(15 as u64))
.saturating_add(T::DbWeight::get().reads((5 as u64).saturating_mul(n as u64)))
.saturating_add(T::DbWeight::get().writes(3 as u64))
.saturating_add(T::DbWeight::get().writes(6 as u64))
.saturating_add(T::DbWeight::get().writes((3 as u64).saturating_mul(n as u64)))
}
// Storage: Staking Ledger (r:1 w:1)
// Storage: Balances Locks (r:1 w:1)
// Storage: System Account (r:1 w:1)
// Storage: BagsList ListNodes (r:3 w:3)
// Storage: VoterBagsList ListNodes (r:3 w:3)
// Storage: Staking Bonded (r:1 w:0)
// Storage: BagsList ListBags (r:2 w:2)
// Storage: VoterBagsList ListBags (r:2 w:2)
/// The range of component `l` is `[1, 32]`.
fn rebond(l: u32, ) -> Weight {
Weight::from_ref_time(74_865_000 as u64)
// Standard Error: 3_000
.saturating_add(Weight::from_ref_time(64_000 as u64).saturating_mul(l as u64))
Weight::from_ref_time(89_469_000 as u64)
// Standard Error: 1_197
.saturating_add(Weight::from_ref_time(74_212 as u64).saturating_mul(l as u64))
.saturating_add(T::DbWeight::get().reads(9 as u64))
.saturating_add(T::DbWeight::get().writes(8 as u64))
}
// Storage: Staking CurrentEra (r:1 w:0)
// Storage: Staking HistoryDepth (r:1 w:1)
// Storage: Staking ErasStakersClipped (r:0 w:2)
// Storage: Staking ErasValidatorPrefs (r:0 w:2)
// Storage: Staking ErasValidatorReward (r:0 w:1)
// Storage: Staking ErasRewardPoints (r:0 w:1)
// Storage: Staking ErasStakers (r:0 w:2)
// Storage: Staking ErasTotalStake (r:0 w:1)
// Storage: Staking ErasStartSessionIndex (r:0 w:1)
fn set_history_depth(e: u32, ) -> Weight {
Weight::from_ref_time(0 as u64)
// Standard Error: 62_000
.saturating_add(Weight::from_ref_time(22_829_000 as u64).saturating_mul(e as u64))
.saturating_add(T::DbWeight::get().reads(2 as u64))
.saturating_add(T::DbWeight::get().writes(4 as u64))
.saturating_add(T::DbWeight::get().writes((7 as u64).saturating_mul(e as u64)))
}
// Storage: System Account (r:1 w:1)
// Storage: Staking Bonded (r:1 w:1)
// Storage: Staking Ledger (r:1 w:1)
@@ -346,24 +340,25 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Staking Validators (r:1 w:0)
// Storage: Staking Nominators (r:1 w:1)
// Storage: Staking CounterForNominators (r:1 w:1)
// Storage: BagsList ListNodes (r:2 w:2)
// Storage: BagsList ListBags (r:1 w:1)
// Storage: BagsList CounterForListNodes (r:1 w:1)
// Storage: VoterBagsList ListNodes (r:2 w:2)
// Storage: VoterBagsList ListBags (r:1 w:1)
// Storage: VoterBagsList CounterForListNodes (r:1 w:1)
// Storage: Balances Locks (r:1 w:1)
// Storage: Staking Payee (r:0 w:1)
// Storage: Staking SpanSlash (r:0 w:1)
/// The range of component `s` is `[1, 100]`.
fn reap_stash(s: u32, ) -> Weight {
Weight::from_ref_time(70_933_000 as u64)
// Standard Error: 1_000
.saturating_add(Weight::from_ref_time(1_021_000 as u64).saturating_mul(s as u64))
Weight::from_ref_time(88_333_000 as u64)
// Standard Error: 1_567
.saturating_add(Weight::from_ref_time(1_101_099 as u64).saturating_mul(s as u64))
.saturating_add(T::DbWeight::get().reads(12 as u64))
.saturating_add(T::DbWeight::get().writes(12 as u64))
.saturating_add(T::DbWeight::get().writes(13 as u64))
.saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(s as u64)))
}
// Storage: BagsList CounterForListNodes (r:1 w:0)
// Storage: VoterBagsList CounterForListNodes (r:1 w:0)
// Storage: Staking SlashingSpans (r:1 w:0)
// Storage: BagsList ListBags (r:200 w:0)
// Storage: BagsList ListNodes (r:101 w:0)
// Storage: VoterBagsList ListBags (r:200 w:0)
// Storage: VoterBagsList ListNodes (r:101 w:0)
// Storage: Staking Nominators (r:101 w:0)
// Storage: Staking Validators (r:2 w:0)
// Storage: Staking Bonded (r:101 w:0)
@@ -372,52 +367,54 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Staking ValidatorCount (r:1 w:0)
// Storage: Staking MinimumValidatorCount (r:1 w:0)
// Storage: Staking CurrentEra (r:1 w:1)
// Storage: Staking HistoryDepth (r:1 w:0)
// Storage: Staking ErasStakersClipped (r:0 w:1)
// Storage: Staking ErasValidatorPrefs (r:0 w:1)
// Storage: Staking ErasStakers (r:0 w:1)
// Storage: Staking ErasTotalStake (r:0 w:1)
// Storage: Staking ErasStartSessionIndex (r:0 w:1)
/// The range of component `v` is `[1, 10]`.
/// The range of component `n` is `[1, 100]`.
fn new_era(v: u32, n: u32, ) -> Weight {
Weight::from_ref_time(0 as u64)
// Standard Error: 897_000
.saturating_add(Weight::from_ref_time(213_100_000 as u64).saturating_mul(v as u64))
// Standard Error: 45_000
.saturating_add(Weight::from_ref_time(31_123_000 as u64).saturating_mul(n as u64))
.saturating_add(T::DbWeight::get().reads(208 as u64))
.saturating_add(T::DbWeight::get().reads((5 as u64).saturating_mul(v as u64)))
Weight::from_ref_time(572_530_000 as u64)
// Standard Error: 3_166_542
.saturating_add(Weight::from_ref_time(101_354_358 as u64).saturating_mul(v as u64))
// Standard Error: 315_238
.saturating_add(Weight::from_ref_time(15_565_319 as u64).saturating_mul(n as u64))
.saturating_add(T::DbWeight::get().reads(261 as u64))
.saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(v as u64)))
.saturating_add(T::DbWeight::get().reads((4 as u64).saturating_mul(n as u64)))
.saturating_add(T::DbWeight::get().writes(3 as u64))
.saturating_add(T::DbWeight::get().writes(6 as u64))
.saturating_add(T::DbWeight::get().writes((3 as u64).saturating_mul(v as u64)))
}
// Storage: BagsList CounterForListNodes (r:1 w:0)
// Storage: VoterBagsList CounterForListNodes (r:1 w:0)
// Storage: Staking SlashingSpans (r:21 w:0)
// Storage: BagsList ListBags (r:200 w:0)
// Storage: BagsList ListNodes (r:1500 w:0)
// Storage: VoterBagsList ListBags (r:200 w:0)
// Storage: VoterBagsList ListNodes (r:1500 w:0)
// Storage: Staking Nominators (r:1500 w:0)
// Storage: Staking Validators (r:500 w:0)
// Storage: Staking Bonded (r:1500 w:0)
// Storage: Staking Ledger (r:1500 w:0)
fn get_npos_voters(v: u32, n: u32, s: u32, ) -> Weight {
Weight::from_ref_time(0 as u64)
// Standard Error: 116_000
.saturating_add(Weight::from_ref_time(23_745_000 as u64).saturating_mul(v as u64))
// Standard Error: 116_000
.saturating_add(Weight::from_ref_time(22_497_000 as u64).saturating_mul(n as u64))
// Standard Error: 3_968_000
.saturating_add(Weight::from_ref_time(20_676_000 as u64).saturating_mul(s as u64))
.saturating_add(T::DbWeight::get().reads(202 as u64))
.saturating_add(T::DbWeight::get().reads((5 as u64).saturating_mul(v as u64)))
.saturating_add(T::DbWeight::get().reads((4 as u64).saturating_mul(n as u64)))
.saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(s as u64)))
/// The range of component `v` is `[500, 1000]`.
/// The range of component `n` is `[500, 1000]`.
/// The range of component `s` is `[1, 20]`.
fn get_npos_voters(v: u32, n: u32, _s: u32, ) -> Weight {
Weight::from_ref_time(24_930_788_000 as u64)
// Standard Error: 266_386
.saturating_add(Weight::from_ref_time(6_687_552 as u64).saturating_mul(v as u64))
// Standard Error: 266_386
.saturating_add(Weight::from_ref_time(6_839_134 as u64).saturating_mul(n as u64))
.saturating_add(T::DbWeight::get().reads(6722 as u64))
.saturating_add(T::DbWeight::get().reads((2 as u64).saturating_mul(v as u64)))
.saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(n as u64)))
}
// Storage: Staking CounterForValidators (r:1 w:0)
// Storage: Staking Validators (r:501 w:0)
/// The range of component `v` is `[500, 1000]`.
fn get_npos_targets(v: u32, ) -> Weight {
Weight::from_ref_time(0 as u64)
// Standard Error: 36_000
.saturating_add(Weight::from_ref_time(8_097_000 as u64).saturating_mul(v as u64))
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(v as u64)))
Weight::from_ref_time(4_864_727_000 as u64)
// Standard Error: 54_240
.saturating_add(Weight::from_ref_time(3_319_738 as u64).saturating_mul(v as u64))
.saturating_add(T::DbWeight::get().reads(502 as u64))
}
// Storage: Staking MinCommission (r:0 w:1)
// Storage: Staking MinValidatorBond (r:0 w:1)
@@ -426,7 +423,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Staking MaxNominatorsCount (r:0 w:1)
// Storage: Staking MinNominatorBond (r:0 w:1)
fn set_staking_configs_all_set() -> Weight {
Weight::from_ref_time(7_041_000 as u64)
Weight::from_ref_time(10_141_000 as u64)
.saturating_add(T::DbWeight::get().writes(6 as u64))
}
// Storage: Staking MinCommission (r:0 w:1)
@@ -436,7 +433,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Staking MaxNominatorsCount (r:0 w:1)
// Storage: Staking MinNominatorBond (r:0 w:1)
fn set_staking_configs_all_remove() -> Weight {
Weight::from_ref_time(6_495_000 as u64)
Weight::from_ref_time(8_993_000 as u64)
.saturating_add(T::DbWeight::get().writes(6 as u64))
}
// Storage: Staking Ledger (r:1 w:0)
@@ -446,18 +443,18 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Staking CounterForNominators (r:1 w:1)
// Storage: Staking MinNominatorBond (r:1 w:0)
// Storage: Staking Validators (r:1 w:0)
// Storage: BagsList ListNodes (r:2 w:2)
// Storage: BagsList ListBags (r:1 w:1)
// Storage: BagsList CounterForListNodes (r:1 w:1)
// Storage: VoterBagsList ListNodes (r:2 w:2)
// Storage: VoterBagsList ListBags (r:1 w:1)
// Storage: VoterBagsList CounterForListNodes (r:1 w:1)
fn chill_other() -> Weight {
Weight::from_ref_time(62_014_000 as u64)
Weight::from_ref_time(79_082_000 as u64)
.saturating_add(T::DbWeight::get().reads(11 as u64))
.saturating_add(T::DbWeight::get().writes(6 as u64))
}
// Storage: Staking MinCommission (r:1 w:0)
// Storage: Staking Validators (r:1 w:1)
fn force_apply_min_commission() -> Weight {
Weight::from_ref_time(12_814_000 as u64)
Weight::from_ref_time(19_265_000 as u64)
.saturating_add(T::DbWeight::get().reads(2 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
@@ -468,21 +465,20 @@ impl WeightInfo for () {
// Storage: Staking Bonded (r:1 w:1)
// Storage: Staking Ledger (r:1 w:1)
// Storage: Staking CurrentEra (r:1 w:0)
// Storage: Staking HistoryDepth (r:1 w:0)
// Storage: Balances Locks (r:1 w:1)
// Storage: Staking Payee (r:0 w:1)
fn bond() -> Weight {
Weight::from_ref_time(43_992_000 as u64)
.saturating_add(RocksDbWeight::get().reads(5 as u64))
Weight::from_ref_time(52_281_000 as u64)
.saturating_add(RocksDbWeight::get().reads(4 as u64))
.saturating_add(RocksDbWeight::get().writes(4 as u64))
}
// Storage: Staking Bonded (r:1 w:0)
// Storage: Staking Ledger (r:1 w:1)
// Storage: Balances Locks (r:1 w:1)
// Storage: BagsList ListNodes (r:3 w:3)
// Storage: BagsList ListBags (r:2 w:2)
// Storage: VoterBagsList ListNodes (r:3 w:3)
// Storage: VoterBagsList ListBags (r:2 w:2)
fn bond_extra() -> Weight {
Weight::from_ref_time(75_827_000 as u64)
Weight::from_ref_time(89_748_000 as u64)
.saturating_add(RocksDbWeight::get().reads(8 as u64))
.saturating_add(RocksDbWeight::get().writes(7 as u64))
}
@@ -492,11 +488,11 @@ impl WeightInfo for () {
// Storage: Staking CurrentEra (r:1 w:0)
// Storage: Balances Locks (r:1 w:1)
// Storage: System Account (r:1 w:1)
// Storage: BagsList ListNodes (r:3 w:3)
// Storage: VoterBagsList ListNodes (r:3 w:3)
// Storage: Staking Bonded (r:1 w:0)
// Storage: BagsList ListBags (r:2 w:2)
// Storage: VoterBagsList ListBags (r:2 w:2)
fn unbond() -> Weight {
Weight::from_ref_time(81_075_000 as u64)
Weight::from_ref_time(94_782_000 as u64)
.saturating_add(RocksDbWeight::get().reads(12 as u64))
.saturating_add(RocksDbWeight::get().writes(8 as u64))
}
@@ -504,10 +500,11 @@ impl WeightInfo for () {
// Storage: Staking CurrentEra (r:1 w:0)
// Storage: Balances Locks (r:1 w:1)
// Storage: System Account (r:1 w:1)
/// The range of component `s` is `[0, 100]`.
fn withdraw_unbonded_update(s: u32, ) -> Weight {
Weight::from_ref_time(35_763_000 as u64)
// Standard Error: 0
.saturating_add(Weight::from_ref_time(57_000 as u64).saturating_mul(s as u64))
Weight::from_ref_time(44_499_000 as u64)
// Standard Error: 387
.saturating_add(Weight::from_ref_time(72_726 as u64).saturating_mul(s as u64))
.saturating_add(RocksDbWeight::get().reads(4 as u64))
.saturating_add(RocksDbWeight::get().writes(3 as u64))
}
@@ -518,14 +515,17 @@ impl WeightInfo for () {
// Storage: Staking Validators (r:1 w:0)
// Storage: Staking Nominators (r:1 w:1)
// Storage: Staking CounterForNominators (r:1 w:1)
// Storage: BagsList ListNodes (r:2 w:2)
// Storage: BagsList ListBags (r:1 w:1)
// Storage: BagsList CounterForListNodes (r:1 w:1)
// Storage: VoterBagsList ListNodes (r:2 w:2)
// Storage: VoterBagsList ListBags (r:1 w:1)
// Storage: VoterBagsList CounterForListNodes (r:1 w:1)
// Storage: System Account (r:1 w:1)
// Storage: Balances Locks (r:1 w:1)
// Storage: Staking Payee (r:0 w:1)
fn withdraw_unbonded_kill(_s: u32, ) -> Weight {
Weight::from_ref_time(66_938_000 as u64)
/// The range of component `s` is `[0, 100]`.
fn withdraw_unbonded_kill(s: u32, ) -> Weight {
Weight::from_ref_time(83_230_000 as u64)
// Standard Error: 612
.saturating_add(Weight::from_ref_time(10_289 as u64).saturating_mul(s as u64))
.saturating_add(RocksDbWeight::get().reads(13 as u64))
.saturating_add(RocksDbWeight::get().writes(11 as u64))
}
@@ -536,23 +536,25 @@ impl WeightInfo for () {
// Storage: Staking MaxValidatorsCount (r:1 w:0)
// Storage: Staking Nominators (r:1 w:0)
// Storage: Staking Bonded (r:1 w:0)
// Storage: BagsList ListNodes (r:1 w:1)
// Storage: BagsList ListBags (r:1 w:1)
// Storage: BagsList CounterForListNodes (r:1 w:1)
// Storage: VoterBagsList ListNodes (r:1 w:1)
// Storage: VoterBagsList ListBags (r:1 w:1)
// Storage: VoterBagsList CounterForListNodes (r:1 w:1)
// Storage: Staking CounterForValidators (r:1 w:1)
fn validate() -> Weight {
Weight::from_ref_time(52_943_000 as u64)
Weight::from_ref_time(64_430_000 as u64)
.saturating_add(RocksDbWeight::get().reads(11 as u64))
.saturating_add(RocksDbWeight::get().writes(5 as u64))
}
// Storage: Staking Ledger (r:1 w:0)
// Storage: Staking Nominators (r:1 w:1)
/// The range of component `k` is `[1, 128]`.
fn kick(k: u32, ) -> Weight {
Weight::from_ref_time(23_264_000 as u64)
// Standard Error: 11_000
.saturating_add(Weight::from_ref_time(8_006_000 as u64).saturating_mul(k as u64))
.saturating_add(RocksDbWeight::get().reads(1 as u64))
Weight::from_ref_time(42_030_000 as u64)
// Standard Error: 5_873
.saturating_add(Weight::from_ref_time(6_747_156 as u64).saturating_mul(k as u64))
.saturating_add(RocksDbWeight::get().reads(2 as u64))
.saturating_add(RocksDbWeight::get().reads((1 as u64).saturating_mul(k as u64)))
.saturating_add(RocksDbWeight::get().writes(1 as u64))
.saturating_add(RocksDbWeight::get().writes((1 as u64).saturating_mul(k as u64)))
}
// Storage: Staking Ledger (r:1 w:0)
@@ -562,15 +564,16 @@ impl WeightInfo for () {
// Storage: Staking Validators (r:2 w:0)
// Storage: Staking CurrentEra (r:1 w:0)
// Storage: Staking Bonded (r:1 w:0)
// Storage: BagsList ListNodes (r:2 w:2)
// Storage: BagsList ListBags (r:1 w:1)
// Storage: BagsList CounterForListNodes (r:1 w:1)
// Storage: VoterBagsList ListNodes (r:2 w:2)
// Storage: VoterBagsList ListBags (r:1 w:1)
// Storage: VoterBagsList CounterForListNodes (r:1 w:1)
// Storage: Staking CounterForNominators (r:1 w:1)
/// The range of component `n` is `[1, 16]`.
fn nominate(n: u32, ) -> Weight {
Weight::from_ref_time(56_596_000 as u64)
// Standard Error: 14_000
.saturating_add(Weight::from_ref_time(3_644_000 as u64).saturating_mul(n as u64))
.saturating_add(RocksDbWeight::get().reads(12 as u64))
Weight::from_ref_time(70_834_000 as u64)
// Standard Error: 4_405
.saturating_add(Weight::from_ref_time(2_583_120 as u64).saturating_mul(n as u64))
.saturating_add(RocksDbWeight::get().reads(13 as u64))
.saturating_add(RocksDbWeight::get().reads((1 as u64).saturating_mul(n as u64)))
.saturating_add(RocksDbWeight::get().writes(6 as u64))
}
@@ -578,53 +581,54 @@ impl WeightInfo for () {
// Storage: Staking Validators (r:1 w:0)
// Storage: Staking Nominators (r:1 w:1)
// Storage: Staking CounterForNominators (r:1 w:1)
// Storage: BagsList ListNodes (r:2 w:2)
// Storage: BagsList ListBags (r:1 w:1)
// Storage: BagsList CounterForListNodes (r:1 w:1)
// Storage: VoterBagsList ListNodes (r:2 w:2)
// Storage: VoterBagsList ListBags (r:1 w:1)
// Storage: VoterBagsList CounterForListNodes (r:1 w:1)
fn chill() -> Weight {
Weight::from_ref_time(51_117_000 as u64)
Weight::from_ref_time(63_328_000 as u64)
.saturating_add(RocksDbWeight::get().reads(8 as u64))
.saturating_add(RocksDbWeight::get().writes(6 as u64))
}
// Storage: Staking Ledger (r:1 w:0)
// Storage: Staking Payee (r:0 w:1)
fn set_payee() -> Weight {
Weight::from_ref_time(11_223_000 as u64)
Weight::from_ref_time(17_763_000 as u64)
.saturating_add(RocksDbWeight::get().reads(1 as u64))
.saturating_add(RocksDbWeight::get().writes(1 as u64))
}
// Storage: Staking Bonded (r:1 w:1)
// Storage: Staking Ledger (r:2 w:2)
fn set_controller() -> Weight {
Weight::from_ref_time(19_826_000 as u64)
Weight::from_ref_time(26_163_000 as u64)
.saturating_add(RocksDbWeight::get().reads(3 as u64))
.saturating_add(RocksDbWeight::get().writes(3 as u64))
}
// Storage: Staking ValidatorCount (r:0 w:1)
fn set_validator_count() -> Weight {
Weight::from_ref_time(3_789_000 as u64)
Weight::from_ref_time(4_842_000 as u64)
.saturating_add(RocksDbWeight::get().writes(1 as u64))
}
// Storage: Staking ForceEra (r:0 w:1)
fn force_no_eras() -> Weight {
Weight::from_ref_time(3_793_000 as u64)
Weight::from_ref_time(4_974_000 as u64)
.saturating_add(RocksDbWeight::get().writes(1 as u64))
}
// Storage: Staking ForceEra (r:0 w:1)
fn force_new_era() -> Weight {
Weight::from_ref_time(3_802_000 as u64)
Weight::from_ref_time(5_039_000 as u64)
.saturating_add(RocksDbWeight::get().writes(1 as u64))
}
// Storage: Staking ForceEra (r:0 w:1)
fn force_new_era_always() -> Weight {
Weight::from_ref_time(3_762_000 as u64)
Weight::from_ref_time(4_950_000 as u64)
.saturating_add(RocksDbWeight::get().writes(1 as u64))
}
// Storage: Staking Invulnerables (r:0 w:1)
/// The range of component `v` is `[0, 1000]`.
fn set_invulnerables(v: u32, ) -> Weight {
Weight::from_ref_time(4_318_000 as u64)
// Standard Error: 0
.saturating_add(Weight::from_ref_time(10_000 as u64).saturating_mul(v as u64))
Weight::from_ref_time(5_150_000 as u64)
// Standard Error: 30
.saturating_add(Weight::from_ref_time(10_540 as u64).saturating_mul(v as u64))
.saturating_add(RocksDbWeight::get().writes(1 as u64))
}
// Storage: Staking Bonded (r:1 w:1)
@@ -632,32 +636,33 @@ impl WeightInfo for () {
// Storage: Staking Validators (r:1 w:0)
// Storage: Staking Nominators (r:1 w:1)
// Storage: Staking CounterForNominators (r:1 w:1)
// Storage: BagsList ListNodes (r:2 w:2)
// Storage: BagsList ListBags (r:1 w:1)
// Storage: BagsList CounterForListNodes (r:1 w:1)
// Storage: VoterBagsList ListNodes (r:2 w:2)
// Storage: VoterBagsList ListBags (r:1 w:1)
// Storage: VoterBagsList CounterForListNodes (r:1 w:1)
// Storage: System Account (r:1 w:1)
// Storage: Balances Locks (r:1 w:1)
// Storage: Staking Ledger (r:0 w:1)
// Storage: Staking Payee (r:0 w:1)
// Storage: Staking SpanSlash (r:0 w:2)
/// The range of component `s` is `[0, 100]`.
fn force_unstake(s: u32, ) -> Weight {
Weight::from_ref_time(65_265_000 as u64)
// Standard Error: 1_000
.saturating_add(Weight::from_ref_time(1_029_000 as u64).saturating_mul(s as u64))
Weight::from_ref_time(76_282_000 as u64)
// Standard Error: 2_397
.saturating_add(Weight::from_ref_time(1_137_934 as u64).saturating_mul(s as u64))
.saturating_add(RocksDbWeight::get().reads(11 as u64))
.saturating_add(RocksDbWeight::get().writes(12 as u64))
.saturating_add(RocksDbWeight::get().writes(11 as u64))
.saturating_add(RocksDbWeight::get().writes((1 as u64).saturating_mul(s as u64)))
}
// Storage: Staking UnappliedSlashes (r:1 w:1)
/// The range of component `s` is `[1, 1000]`.
fn cancel_deferred_slash(s: u32, ) -> Weight {
Weight::from_ref_time(903_312_000 as u64)
// Standard Error: 56_000
.saturating_add(Weight::from_ref_time(4_968_000 as u64).saturating_mul(s as u64))
Weight::from_ref_time(93_690_000 as u64)
// Standard Error: 43_203
.saturating_add(Weight::from_ref_time(6_149_862 as u64).saturating_mul(s as u64))
.saturating_add(RocksDbWeight::get().reads(1 as u64))
.saturating_add(RocksDbWeight::get().writes(1 as u64))
}
// Storage: Staking CurrentEra (r:1 w:0)
// Storage: Staking HistoryDepth (r:1 w:0)
// Storage: Staking ErasValidatorReward (r:1 w:0)
// Storage: Staking Bonded (r:2 w:0)
// Storage: Staking Ledger (r:1 w:1)
@@ -666,17 +671,17 @@ impl WeightInfo for () {
// Storage: Staking ErasValidatorPrefs (r:1 w:0)
// Storage: Staking Payee (r:2 w:0)
// Storage: System Account (r:2 w:2)
/// The range of component `n` is `[1, 256]`.
fn payout_stakers_dead_controller(n: u32, ) -> Weight {
Weight::from_ref_time(87_569_000 as u64)
// Standard Error: 14_000
.saturating_add(Weight::from_ref_time(24_232_000 as u64).saturating_mul(n as u64))
.saturating_add(RocksDbWeight::get().reads(10 as u64))
Weight::from_ref_time(151_647_000 as u64)
// Standard Error: 8_237
.saturating_add(Weight::from_ref_time(21_296_415 as u64).saturating_mul(n as u64))
.saturating_add(RocksDbWeight::get().reads(12 as u64))
.saturating_add(RocksDbWeight::get().reads((3 as u64).saturating_mul(n as u64)))
.saturating_add(RocksDbWeight::get().writes(2 as u64))
.saturating_add(RocksDbWeight::get().writes(3 as u64))
.saturating_add(RocksDbWeight::get().writes((1 as u64).saturating_mul(n as u64)))
}
// Storage: Staking CurrentEra (r:1 w:0)
// Storage: Staking HistoryDepth (r:1 w:0)
// Storage: Staking ErasValidatorReward (r:1 w:0)
// Storage: Staking Bonded (r:2 w:0)
// Storage: Staking Ledger (r:2 w:2)
@@ -686,45 +691,30 @@ impl WeightInfo for () {
// Storage: Staking Payee (r:2 w:0)
// Storage: System Account (r:2 w:2)
// Storage: Balances Locks (r:2 w:2)
/// The range of component `n` is `[1, 256]`.
fn payout_stakers_alive_staked(n: u32, ) -> Weight {
Weight::from_ref_time(98_839_000 as u64)
// Standard Error: 21_000
.saturating_add(Weight::from_ref_time(34_480_000 as u64).saturating_mul(n as u64))
.saturating_add(RocksDbWeight::get().reads(11 as u64))
Weight::from_ref_time(197_310_000 as u64)
// Standard Error: 13_818
.saturating_add(Weight::from_ref_time(30_053_043 as u64).saturating_mul(n as u64))
.saturating_add(RocksDbWeight::get().reads(15 as u64))
.saturating_add(RocksDbWeight::get().reads((5 as u64).saturating_mul(n as u64)))
.saturating_add(RocksDbWeight::get().writes(3 as u64))
.saturating_add(RocksDbWeight::get().writes(6 as u64))
.saturating_add(RocksDbWeight::get().writes((3 as u64).saturating_mul(n as u64)))
}
// Storage: Staking Ledger (r:1 w:1)
// Storage: Balances Locks (r:1 w:1)
// Storage: System Account (r:1 w:1)
// Storage: BagsList ListNodes (r:3 w:3)
// Storage: VoterBagsList ListNodes (r:3 w:3)
// Storage: Staking Bonded (r:1 w:0)
// Storage: BagsList ListBags (r:2 w:2)
// Storage: VoterBagsList ListBags (r:2 w:2)
/// The range of component `l` is `[1, 32]`.
fn rebond(l: u32, ) -> Weight {
Weight::from_ref_time(74_865_000 as u64)
// Standard Error: 3_000
.saturating_add(Weight::from_ref_time(64_000 as u64).saturating_mul(l as u64))
Weight::from_ref_time(89_469_000 as u64)
// Standard Error: 1_197
.saturating_add(Weight::from_ref_time(74_212 as u64).saturating_mul(l as u64))
.saturating_add(RocksDbWeight::get().reads(9 as u64))
.saturating_add(RocksDbWeight::get().writes(8 as u64))
}
// Storage: Staking CurrentEra (r:1 w:0)
// Storage: Staking HistoryDepth (r:1 w:1)
// Storage: Staking ErasStakersClipped (r:0 w:2)
// Storage: Staking ErasValidatorPrefs (r:0 w:2)
// Storage: Staking ErasValidatorReward (r:0 w:1)
// Storage: Staking ErasRewardPoints (r:0 w:1)
// Storage: Staking ErasStakers (r:0 w:2)
// Storage: Staking ErasTotalStake (r:0 w:1)
// Storage: Staking ErasStartSessionIndex (r:0 w:1)
fn set_history_depth(e: u32, ) -> Weight {
Weight::from_ref_time(0 as u64)
// Standard Error: 62_000
.saturating_add(Weight::from_ref_time(22_829_000 as u64).saturating_mul(e as u64))
.saturating_add(RocksDbWeight::get().reads(2 as u64))
.saturating_add(RocksDbWeight::get().writes(4 as u64))
.saturating_add(RocksDbWeight::get().writes((7 as u64).saturating_mul(e as u64)))
}
// Storage: System Account (r:1 w:1)
// Storage: Staking Bonded (r:1 w:1)
// Storage: Staking Ledger (r:1 w:1)
@@ -732,24 +722,25 @@ impl WeightInfo for () {
// Storage: Staking Validators (r:1 w:0)
// Storage: Staking Nominators (r:1 w:1)
// Storage: Staking CounterForNominators (r:1 w:1)
// Storage: BagsList ListNodes (r:2 w:2)
// Storage: BagsList ListBags (r:1 w:1)
// Storage: BagsList CounterForListNodes (r:1 w:1)
// Storage: VoterBagsList ListNodes (r:2 w:2)
// Storage: VoterBagsList ListBags (r:1 w:1)
// Storage: VoterBagsList CounterForListNodes (r:1 w:1)
// Storage: Balances Locks (r:1 w:1)
// Storage: Staking Payee (r:0 w:1)
// Storage: Staking SpanSlash (r:0 w:1)
/// The range of component `s` is `[1, 100]`.
fn reap_stash(s: u32, ) -> Weight {
Weight::from_ref_time(70_933_000 as u64)
// Standard Error: 1_000
.saturating_add(Weight::from_ref_time(1_021_000 as u64).saturating_mul(s as u64))
Weight::from_ref_time(88_333_000 as u64)
// Standard Error: 1_567
.saturating_add(Weight::from_ref_time(1_101_099 as u64).saturating_mul(s as u64))
.saturating_add(RocksDbWeight::get().reads(12 as u64))
.saturating_add(RocksDbWeight::get().writes(12 as u64))
.saturating_add(RocksDbWeight::get().writes(13 as u64))
.saturating_add(RocksDbWeight::get().writes((1 as u64).saturating_mul(s as u64)))
}
// Storage: BagsList CounterForListNodes (r:1 w:0)
// Storage: VoterBagsList CounterForListNodes (r:1 w:0)
// Storage: Staking SlashingSpans (r:1 w:0)
// Storage: BagsList ListBags (r:200 w:0)
// Storage: BagsList ListNodes (r:101 w:0)
// Storage: VoterBagsList ListBags (r:200 w:0)
// Storage: VoterBagsList ListNodes (r:101 w:0)
// Storage: Staking Nominators (r:101 w:0)
// Storage: Staking Validators (r:2 w:0)
// Storage: Staking Bonded (r:101 w:0)
@@ -758,52 +749,54 @@ impl WeightInfo for () {
// Storage: Staking ValidatorCount (r:1 w:0)
// Storage: Staking MinimumValidatorCount (r:1 w:0)
// Storage: Staking CurrentEra (r:1 w:1)
// Storage: Staking HistoryDepth (r:1 w:0)
// Storage: Staking ErasStakersClipped (r:0 w:1)
// Storage: Staking ErasValidatorPrefs (r:0 w:1)
// Storage: Staking ErasStakers (r:0 w:1)
// Storage: Staking ErasTotalStake (r:0 w:1)
// Storage: Staking ErasStartSessionIndex (r:0 w:1)
/// The range of component `v` is `[1, 10]`.
/// The range of component `n` is `[1, 100]`.
fn new_era(v: u32, n: u32, ) -> Weight {
Weight::from_ref_time(0 as u64)
// Standard Error: 897_000
.saturating_add(Weight::from_ref_time(213_100_000 as u64).saturating_mul(v as u64))
// Standard Error: 45_000
.saturating_add(Weight::from_ref_time(31_123_000 as u64).saturating_mul(n as u64))
.saturating_add(RocksDbWeight::get().reads(208 as u64))
.saturating_add(RocksDbWeight::get().reads((5 as u64).saturating_mul(v as u64)))
Weight::from_ref_time(572_530_000 as u64)
// Standard Error: 3_166_542
.saturating_add(Weight::from_ref_time(101_354_358 as u64).saturating_mul(v as u64))
// Standard Error: 315_238
.saturating_add(Weight::from_ref_time(15_565_319 as u64).saturating_mul(n as u64))
.saturating_add(RocksDbWeight::get().reads(261 as u64))
.saturating_add(RocksDbWeight::get().reads((1 as u64).saturating_mul(v as u64)))
.saturating_add(RocksDbWeight::get().reads((4 as u64).saturating_mul(n as u64)))
.saturating_add(RocksDbWeight::get().writes(3 as u64))
.saturating_add(RocksDbWeight::get().writes(6 as u64))
.saturating_add(RocksDbWeight::get().writes((3 as u64).saturating_mul(v as u64)))
}
// Storage: BagsList CounterForListNodes (r:1 w:0)
// Storage: VoterBagsList CounterForListNodes (r:1 w:0)
// Storage: Staking SlashingSpans (r:21 w:0)
// Storage: BagsList ListBags (r:200 w:0)
// Storage: BagsList ListNodes (r:1500 w:0)
// Storage: VoterBagsList ListBags (r:200 w:0)
// Storage: VoterBagsList ListNodes (r:1500 w:0)
// Storage: Staking Nominators (r:1500 w:0)
// Storage: Staking Validators (r:500 w:0)
// Storage: Staking Bonded (r:1500 w:0)
// Storage: Staking Ledger (r:1500 w:0)
fn get_npos_voters(v: u32, n: u32, s: u32, ) -> Weight {
Weight::from_ref_time(0 as u64)
// Standard Error: 116_000
.saturating_add(Weight::from_ref_time(23_745_000 as u64).saturating_mul(v as u64))
// Standard Error: 116_000
.saturating_add(Weight::from_ref_time(22_497_000 as u64).saturating_mul(n as u64))
// Standard Error: 3_968_000
.saturating_add(Weight::from_ref_time(20_676_000 as u64).saturating_mul(s as u64))
.saturating_add(RocksDbWeight::get().reads(202 as u64))
.saturating_add(RocksDbWeight::get().reads((5 as u64).saturating_mul(v as u64)))
.saturating_add(RocksDbWeight::get().reads((4 as u64).saturating_mul(n as u64)))
.saturating_add(RocksDbWeight::get().reads((1 as u64).saturating_mul(s as u64)))
/// The range of component `v` is `[500, 1000]`.
/// The range of component `n` is `[500, 1000]`.
/// The range of component `s` is `[1, 20]`.
fn get_npos_voters(v: u32, n: u32, _s: u32, ) -> Weight {
Weight::from_ref_time(24_930_788_000 as u64)
// Standard Error: 266_386
.saturating_add(Weight::from_ref_time(6_687_552 as u64).saturating_mul(v as u64))
// Standard Error: 266_386
.saturating_add(Weight::from_ref_time(6_839_134 as u64).saturating_mul(n as u64))
.saturating_add(RocksDbWeight::get().reads(6722 as u64))
.saturating_add(RocksDbWeight::get().reads((2 as u64).saturating_mul(v as u64)))
.saturating_add(RocksDbWeight::get().reads((1 as u64).saturating_mul(n as u64)))
}
// Storage: Staking CounterForValidators (r:1 w:0)
// Storage: Staking Validators (r:501 w:0)
/// The range of component `v` is `[500, 1000]`.
fn get_npos_targets(v: u32, ) -> Weight {
Weight::from_ref_time(0 as u64)
// Standard Error: 36_000
.saturating_add(Weight::from_ref_time(8_097_000 as u64).saturating_mul(v as u64))
.saturating_add(RocksDbWeight::get().reads(1 as u64))
.saturating_add(RocksDbWeight::get().reads((1 as u64).saturating_mul(v as u64)))
Weight::from_ref_time(4_864_727_000 as u64)
// Standard Error: 54_240
.saturating_add(Weight::from_ref_time(3_319_738 as u64).saturating_mul(v as u64))
.saturating_add(RocksDbWeight::get().reads(502 as u64))
}
// Storage: Staking MinCommission (r:0 w:1)
// Storage: Staking MinValidatorBond (r:0 w:1)
@@ -812,7 +805,7 @@ impl WeightInfo for () {
// Storage: Staking MaxNominatorsCount (r:0 w:1)
// Storage: Staking MinNominatorBond (r:0 w:1)
fn set_staking_configs_all_set() -> Weight {
Weight::from_ref_time(7_041_000 as u64)
Weight::from_ref_time(10_141_000 as u64)
.saturating_add(RocksDbWeight::get().writes(6 as u64))
}
// Storage: Staking MinCommission (r:0 w:1)
@@ -822,7 +815,7 @@ impl WeightInfo for () {
// Storage: Staking MaxNominatorsCount (r:0 w:1)
// Storage: Staking MinNominatorBond (r:0 w:1)
fn set_staking_configs_all_remove() -> Weight {
Weight::from_ref_time(6_495_000 as u64)
Weight::from_ref_time(8_993_000 as u64)
.saturating_add(RocksDbWeight::get().writes(6 as u64))
}
// Storage: Staking Ledger (r:1 w:0)
@@ -832,18 +825,18 @@ impl WeightInfo for () {
// Storage: Staking CounterForNominators (r:1 w:1)
// Storage: Staking MinNominatorBond (r:1 w:0)
// Storage: Staking Validators (r:1 w:0)
// Storage: BagsList ListNodes (r:2 w:2)
// Storage: BagsList ListBags (r:1 w:1)
// Storage: BagsList CounterForListNodes (r:1 w:1)
// Storage: VoterBagsList ListNodes (r:2 w:2)
// Storage: VoterBagsList ListBags (r:1 w:1)
// Storage: VoterBagsList CounterForListNodes (r:1 w:1)
fn chill_other() -> Weight {
Weight::from_ref_time(62_014_000 as u64)
Weight::from_ref_time(79_082_000 as u64)
.saturating_add(RocksDbWeight::get().reads(11 as u64))
.saturating_add(RocksDbWeight::get().writes(6 as u64))
}
// Storage: Staking MinCommission (r:1 w:0)
// Storage: Staking Validators (r:1 w:1)
fn force_apply_min_commission() -> Weight {
Weight::from_ref_time(12_814_000 as u64)
Weight::from_ref_time(19_265_000 as u64)
.saturating_add(RocksDbWeight::get().reads(2 as u64))
.saturating_add(RocksDbWeight::get().writes(1 as u64))
}