mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 10:31:03 +00:00
Increase payable nominators per validator (#2637)
* inc * cargo run --release --features=runtime-benchmarks -- benchmark --chain=polkadot-dev --steps=50 --repeat=20 --pallet=pallet_staking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/polkadot/src/weights/ * cargo run --release --features=runtime-benchmarks -- benchmark --chain=kusama-dev --steps=50 --repeat=20 --pallet=pallet_staking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/kusama/src/weights/ * cargo run --release --features=runtime-benchmarks -- benchmark --chain=westend-dev --steps=50 --repeat=20 --pallet=pallet_staking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/westend/src/weights/ * Add test Co-authored-by: Parity Benchmarking Bot <admin@parity.io>
This commit is contained in:
@@ -360,7 +360,7 @@ parameter_types! {
|
|||||||
// 27 eras in which slashes can be cancelled (slightly less than 7 days).
|
// 27 eras in which slashes can be cancelled (slightly less than 7 days).
|
||||||
pub const SlashDeferDuration: pallet_staking::EraIndex = 27;
|
pub const SlashDeferDuration: pallet_staking::EraIndex = 27;
|
||||||
pub const RewardCurve: &'static PiecewiseLinear<'static> = &REWARD_CURVE;
|
pub const RewardCurve: &'static PiecewiseLinear<'static> = &REWARD_CURVE;
|
||||||
pub const MaxNominatorRewardedPerValidator: u32 = 128;
|
pub const MaxNominatorRewardedPerValidator: u32 = 256;
|
||||||
}
|
}
|
||||||
|
|
||||||
type SlashCancelOrigin = EnsureOneOf<
|
type SlashCancelOrigin = EnsureOneOf<
|
||||||
@@ -1415,6 +1415,23 @@ mod test_fees {
|
|||||||
use pallet_transaction_payment::Multiplier;
|
use pallet_transaction_payment::Multiplier;
|
||||||
use separator::Separatable;
|
use separator::Separatable;
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn payout_weight_portion() {
|
||||||
|
use pallet_staking::WeightInfo;
|
||||||
|
let payout_weight =
|
||||||
|
<Runtime as pallet_staking::Config>::WeightInfo::payout_stakers_alive_staked(
|
||||||
|
MaxNominatorRewardedPerValidator::get(),
|
||||||
|
) as f64;
|
||||||
|
let block_weight = BlockWeights::get().max_block as f64;
|
||||||
|
|
||||||
|
println!(
|
||||||
|
"a full payout takes {:.2} of the block weight [{} / {}]",
|
||||||
|
payout_weight / block_weight,
|
||||||
|
payout_weight,
|
||||||
|
block_weight
|
||||||
|
);
|
||||||
|
assert!(payout_weight * 2f64 < block_weight);
|
||||||
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[ignore]
|
#[ignore]
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
//! Autogenerated weights for pallet_staking
|
//! Autogenerated weights for pallet_staking
|
||||||
//!
|
//!
|
||||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0
|
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0
|
||||||
//! DATE: 2021-03-16, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
//! DATE: 2021-03-17, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 128
|
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 128
|
||||||
|
|
||||||
// Executed Command:
|
// Executed Command:
|
||||||
@@ -44,128 +44,128 @@ use sp_std::marker::PhantomData;
|
|||||||
pub struct WeightInfo<T>(PhantomData<T>);
|
pub struct WeightInfo<T>(PhantomData<T>);
|
||||||
impl<T: frame_system::Config> pallet_staking::WeightInfo for WeightInfo<T> {
|
impl<T: frame_system::Config> pallet_staking::WeightInfo for WeightInfo<T> {
|
||||||
fn bond() -> Weight {
|
fn bond() -> Weight {
|
||||||
(74_686_000 as Weight)
|
(74_697_000 as Weight)
|
||||||
.saturating_add(T::DbWeight::get().reads(5 as Weight))
|
.saturating_add(T::DbWeight::get().reads(5 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().writes(4 as Weight))
|
.saturating_add(T::DbWeight::get().writes(4 as Weight))
|
||||||
}
|
}
|
||||||
fn bond_extra() -> Weight {
|
fn bond_extra() -> Weight {
|
||||||
(60_196_000 as Weight)
|
(60_470_000 as Weight)
|
||||||
.saturating_add(T::DbWeight::get().reads(4 as Weight))
|
.saturating_add(T::DbWeight::get().reads(4 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||||
}
|
}
|
||||||
fn unbond() -> Weight {
|
fn unbond() -> Weight {
|
||||||
(54_608_000 as Weight)
|
(54_943_000 as Weight)
|
||||||
.saturating_add(T::DbWeight::get().reads(5 as Weight))
|
.saturating_add(T::DbWeight::get().reads(5 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
||||||
}
|
}
|
||||||
fn withdraw_unbonded_update(s: u32, ) -> Weight {
|
fn withdraw_unbonded_update(s: u32, ) -> Weight {
|
||||||
(55_862_000 as Weight)
|
(55_680_000 as Weight)
|
||||||
// Standard Error: 0
|
// Standard Error: 0
|
||||||
.saturating_add((31_000 as Weight).saturating_mul(s as Weight))
|
.saturating_add((26_000 as Weight).saturating_mul(s as Weight))
|
||||||
.saturating_add(T::DbWeight::get().reads(5 as Weight))
|
.saturating_add(T::DbWeight::get().reads(5 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
||||||
}
|
}
|
||||||
fn withdraw_unbonded_kill(s: u32, ) -> Weight {
|
fn withdraw_unbonded_kill(s: u32, ) -> Weight {
|
||||||
(87_499_000 as Weight)
|
(87_333_000 as Weight)
|
||||||
// Standard Error: 1_000
|
// Standard Error: 1_000
|
||||||
.saturating_add((2_602_000 as Weight).saturating_mul(s as Weight))
|
.saturating_add((2_537_000 as Weight).saturating_mul(s as Weight))
|
||||||
.saturating_add(T::DbWeight::get().reads(7 as Weight))
|
.saturating_add(T::DbWeight::get().reads(7 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().writes(8 as Weight))
|
.saturating_add(T::DbWeight::get().writes(8 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight)))
|
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight)))
|
||||||
}
|
}
|
||||||
fn validate() -> Weight {
|
fn validate() -> Weight {
|
||||||
(18_058_000 as Weight)
|
(17_957_000 as Weight)
|
||||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||||
}
|
}
|
||||||
fn kick(k: u32, ) -> Weight {
|
fn kick(k: u32, ) -> Weight {
|
||||||
(16_488_000 as Weight)
|
(14_168_000 as Weight)
|
||||||
// Standard Error: 10_000
|
// Standard Error: 11_000
|
||||||
.saturating_add((18_127_000 as Weight).saturating_mul(k as Weight))
|
.saturating_add((17_842_000 as Weight).saturating_mul(k as Weight))
|
||||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(k as Weight)))
|
.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(k as Weight)))
|
||||||
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(k as Weight)))
|
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(k as Weight)))
|
||||||
}
|
}
|
||||||
fn nominate(n: u32, ) -> Weight {
|
fn nominate(n: u32, ) -> Weight {
|
||||||
(27_809_000 as Weight)
|
(27_738_000 as Weight)
|
||||||
// Standard Error: 13_000
|
// Standard Error: 9_000
|
||||||
.saturating_add((5_506_000 as Weight).saturating_mul(n as Weight))
|
.saturating_add((5_511_000 as Weight).saturating_mul(n as Weight))
|
||||||
.saturating_add(T::DbWeight::get().reads(4 as Weight))
|
.saturating_add(T::DbWeight::get().reads(4 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(n as Weight)))
|
.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(n as Weight)))
|
||||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||||
}
|
}
|
||||||
fn chill() -> Weight {
|
fn chill() -> Weight {
|
||||||
(17_341_000 as Weight)
|
(17_432_000 as Weight)
|
||||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||||
}
|
}
|
||||||
fn set_payee() -> Weight {
|
fn set_payee() -> Weight {
|
||||||
(12_131_000 as Weight)
|
(11_884_000 as Weight)
|
||||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||||
}
|
}
|
||||||
fn set_controller() -> Weight {
|
fn set_controller() -> Weight {
|
||||||
(26_296_000 as Weight)
|
(26_010_000 as Weight)
|
||||||
.saturating_add(T::DbWeight::get().reads(3 as Weight))
|
.saturating_add(T::DbWeight::get().reads(3 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
||||||
}
|
}
|
||||||
fn set_validator_count() -> Weight {
|
fn set_validator_count() -> Weight {
|
||||||
(1_995_000 as Weight)
|
(2_018_000 as Weight)
|
||||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||||
}
|
}
|
||||||
fn force_no_eras() -> Weight {
|
fn force_no_eras() -> Weight {
|
||||||
(2_311_000 as Weight)
|
(2_321_000 as Weight)
|
||||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||||
}
|
}
|
||||||
fn force_new_era() -> Weight {
|
fn force_new_era() -> Weight {
|
||||||
(2_271_000 as Weight)
|
(2_316_000 as Weight)
|
||||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||||
}
|
}
|
||||||
fn force_new_era_always() -> Weight {
|
fn force_new_era_always() -> Weight {
|
||||||
(2_366_000 as Weight)
|
(2_290_000 as Weight)
|
||||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||||
}
|
}
|
||||||
fn set_invulnerables(v: u32, ) -> Weight {
|
fn set_invulnerables(v: u32, ) -> Weight {
|
||||||
(2_391_000 as Weight)
|
(2_224_000 as Weight)
|
||||||
// Standard Error: 0
|
// Standard Error: 0
|
||||||
.saturating_add((35_000 as Weight).saturating_mul(v as Weight))
|
.saturating_add((36_000 as Weight).saturating_mul(v as Weight))
|
||||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||||
}
|
}
|
||||||
fn force_unstake(s: u32, ) -> Weight {
|
fn force_unstake(s: u32, ) -> Weight {
|
||||||
(58_957_000 as Weight)
|
(58_754_000 as Weight)
|
||||||
// Standard Error: 1_000
|
// Standard Error: 1_000
|
||||||
.saturating_add((2_585_000 as Weight).saturating_mul(s as Weight))
|
.saturating_add((2_534_000 as Weight).saturating_mul(s as Weight))
|
||||||
.saturating_add(T::DbWeight::get().reads(4 as Weight))
|
.saturating_add(T::DbWeight::get().reads(4 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().writes(8 as Weight))
|
.saturating_add(T::DbWeight::get().writes(8 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight)))
|
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight)))
|
||||||
}
|
}
|
||||||
fn cancel_deferred_slash(s: u32, ) -> Weight {
|
fn cancel_deferred_slash(s: u32, ) -> Weight {
|
||||||
(5_925_666_000 as Weight)
|
(5_931_430_000 as Weight)
|
||||||
// Standard Error: 391_000
|
// Standard Error: 391_000
|
||||||
.saturating_add((34_771_000 as Weight).saturating_mul(s as Weight))
|
.saturating_add((34_745_000 as Weight).saturating_mul(s as Weight))
|
||||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||||
}
|
}
|
||||||
fn payout_stakers_dead_controller(n: u32, ) -> Weight {
|
fn payout_stakers_dead_controller(n: u32, ) -> Weight {
|
||||||
(114_424_000 as Weight)
|
(129_521_000 as Weight)
|
||||||
// Standard Error: 17_000
|
// Standard Error: 18_000
|
||||||
.saturating_add((49_957_000 as Weight).saturating_mul(n as Weight))
|
.saturating_add((49_353_000 as Weight).saturating_mul(n as Weight))
|
||||||
.saturating_add(T::DbWeight::get().reads(11 as Weight))
|
.saturating_add(T::DbWeight::get().reads(11 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(n as Weight)))
|
.saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(n as Weight)))
|
||||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(n as Weight)))
|
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(n as Weight)))
|
||||||
}
|
}
|
||||||
fn payout_stakers_alive_staked(n: u32, ) -> Weight {
|
fn payout_stakers_alive_staked(n: u32, ) -> Weight {
|
||||||
(143_488_000 as Weight)
|
(156_544_000 as Weight)
|
||||||
// Standard Error: 22_000
|
// Standard Error: 23_000
|
||||||
.saturating_add((63_654_000 as Weight).saturating_mul(n as Weight))
|
.saturating_add((63_811_000 as Weight).saturating_mul(n as Weight))
|
||||||
.saturating_add(T::DbWeight::get().reads(12 as Weight))
|
.saturating_add(T::DbWeight::get().reads(12 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().reads((5 as Weight).saturating_mul(n as Weight)))
|
.saturating_add(T::DbWeight::get().reads((5 as Weight).saturating_mul(n as Weight)))
|
||||||
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(n as Weight)))
|
.saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(n as Weight)))
|
||||||
}
|
}
|
||||||
fn rebond(l: u32, ) -> Weight {
|
fn rebond(l: u32, ) -> Weight {
|
||||||
(38_310_000 as Weight)
|
(38_266_000 as Weight)
|
||||||
// Standard Error: 1_000
|
// Standard Error: 1_000
|
||||||
.saturating_add((85_000 as Weight).saturating_mul(l as Weight))
|
.saturating_add((85_000 as Weight).saturating_mul(l as Weight))
|
||||||
.saturating_add(T::DbWeight::get().reads(4 as Weight))
|
.saturating_add(T::DbWeight::get().reads(4 as Weight))
|
||||||
@@ -173,26 +173,26 @@ impl<T: frame_system::Config> pallet_staking::WeightInfo for WeightInfo<T> {
|
|||||||
}
|
}
|
||||||
fn set_history_depth(e: u32, ) -> Weight {
|
fn set_history_depth(e: u32, ) -> Weight {
|
||||||
(0 as Weight)
|
(0 as Weight)
|
||||||
// Standard Error: 66_000
|
// Standard Error: 62_000
|
||||||
.saturating_add((31_186_000 as Weight).saturating_mul(e as Weight))
|
.saturating_add((30_927_000 as Weight).saturating_mul(e as Weight))
|
||||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().writes(4 as Weight))
|
.saturating_add(T::DbWeight::get().writes(4 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().writes((7 as Weight).saturating_mul(e as Weight)))
|
.saturating_add(T::DbWeight::get().writes((7 as Weight).saturating_mul(e as Weight)))
|
||||||
}
|
}
|
||||||
fn reap_stash(s: u32, ) -> Weight {
|
fn reap_stash(s: u32, ) -> Weight {
|
||||||
(62_505_000 as Weight)
|
(62_251_000 as Weight)
|
||||||
// Standard Error: 0
|
// Standard Error: 0
|
||||||
.saturating_add((2_587_000 as Weight).saturating_mul(s as Weight))
|
.saturating_add((2_522_000 as Weight).saturating_mul(s as Weight))
|
||||||
.saturating_add(T::DbWeight::get().reads(4 as Weight))
|
.saturating_add(T::DbWeight::get().reads(4 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().writes(8 as Weight))
|
.saturating_add(T::DbWeight::get().writes(8 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight)))
|
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight)))
|
||||||
}
|
}
|
||||||
fn new_era(v: u32, n: u32, ) -> Weight {
|
fn new_era(v: u32, n: u32, ) -> Weight {
|
||||||
(0 as Weight)
|
(0 as Weight)
|
||||||
// Standard Error: 810_000
|
// Standard Error: 755_000
|
||||||
.saturating_add((568_935_000 as Weight).saturating_mul(v as Weight))
|
.saturating_add((565_555_000 as Weight).saturating_mul(v as Weight))
|
||||||
// Standard Error: 40_000
|
// Standard Error: 37_000
|
||||||
.saturating_add((79_855_000 as Weight).saturating_mul(n as Weight))
|
.saturating_add((79_393_000 as Weight).saturating_mul(n as Weight))
|
||||||
.saturating_add(T::DbWeight::get().reads(9 as Weight))
|
.saturating_add(T::DbWeight::get().reads(9 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().reads((4 as Weight).saturating_mul(v as Weight)))
|
.saturating_add(T::DbWeight::get().reads((4 as Weight).saturating_mul(v as Weight)))
|
||||||
.saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(n as Weight)))
|
.saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(n as Weight)))
|
||||||
@@ -201,20 +201,20 @@ impl<T: frame_system::Config> pallet_staking::WeightInfo for WeightInfo<T> {
|
|||||||
}
|
}
|
||||||
fn get_npos_voters(v: u32, n: u32, s: u32, ) -> Weight {
|
fn get_npos_voters(v: u32, n: u32, s: u32, ) -> Weight {
|
||||||
(0 as Weight)
|
(0 as Weight)
|
||||||
// Standard Error: 111_000
|
// Standard Error: 94_000
|
||||||
.saturating_add((26_174_000 as Weight).saturating_mul(v as Weight))
|
.saturating_add((26_287_000 as Weight).saturating_mul(v as Weight))
|
||||||
// Standard Error: 111_000
|
// Standard Error: 94_000
|
||||||
.saturating_add((63_285_000 as Weight).saturating_mul(n as Weight))
|
.saturating_add((62_123_000 as Weight).saturating_mul(n as Weight))
|
||||||
// Standard Error: 1_523_000
|
// Standard Error: 1_291_000
|
||||||
.saturating_add((18_757_000 as Weight).saturating_mul(s as Weight))
|
.saturating_add((17_314_000 as Weight).saturating_mul(s as Weight))
|
||||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().reads((4 as Weight).saturating_mul(v as Weight)))
|
.saturating_add(T::DbWeight::get().reads((4 as Weight).saturating_mul(v as Weight)))
|
||||||
.saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(n as Weight)))
|
.saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(n as Weight)))
|
||||||
}
|
}
|
||||||
fn get_npos_targets(v: u32, ) -> Weight {
|
fn get_npos_targets(v: u32, ) -> Weight {
|
||||||
(0 as Weight)
|
(0 as Weight)
|
||||||
// Standard Error: 30_000
|
// Standard Error: 26_000
|
||||||
.saturating_add((9_982_000 as Weight).saturating_mul(v as Weight))
|
.saturating_add((10_137_000 as Weight).saturating_mul(v as Weight))
|
||||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(v as Weight)))
|
.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(v as Weight)))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -369,7 +369,7 @@ parameter_types! {
|
|||||||
pub const BondingDuration: pallet_staking::EraIndex = 28;
|
pub const BondingDuration: pallet_staking::EraIndex = 28;
|
||||||
pub const SlashDeferDuration: pallet_staking::EraIndex = 27;
|
pub const SlashDeferDuration: pallet_staking::EraIndex = 27;
|
||||||
pub const RewardCurve: &'static PiecewiseLinear<'static> = &REWARD_CURVE;
|
pub const RewardCurve: &'static PiecewiseLinear<'static> = &REWARD_CURVE;
|
||||||
pub const MaxNominatorRewardedPerValidator: u32 = 128;
|
pub const MaxNominatorRewardedPerValidator: u32 = 256;
|
||||||
}
|
}
|
||||||
|
|
||||||
type SlashCancelOrigin = EnsureOneOf<
|
type SlashCancelOrigin = EnsureOneOf<
|
||||||
@@ -1443,6 +1443,23 @@ mod test_fees {
|
|||||||
use pallet_transaction_payment::Multiplier;
|
use pallet_transaction_payment::Multiplier;
|
||||||
use separator::Separatable;
|
use separator::Separatable;
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn payout_weight_portion() {
|
||||||
|
use pallet_staking::WeightInfo;
|
||||||
|
let payout_weight =
|
||||||
|
<Runtime as pallet_staking::Config>::WeightInfo::payout_stakers_alive_staked(
|
||||||
|
MaxNominatorRewardedPerValidator::get(),
|
||||||
|
) as f64;
|
||||||
|
let block_weight = BlockWeights::get().max_block as f64;
|
||||||
|
|
||||||
|
println!(
|
||||||
|
"a full payout takes {:.2} of the block weight [{} / {}]",
|
||||||
|
payout_weight / block_weight,
|
||||||
|
payout_weight,
|
||||||
|
block_weight
|
||||||
|
);
|
||||||
|
assert!(payout_weight * 2f64 < block_weight);
|
||||||
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[ignore]
|
#[ignore]
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
//! Autogenerated weights for pallet_staking
|
//! Autogenerated weights for pallet_staking
|
||||||
//!
|
//!
|
||||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0
|
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0
|
||||||
//! DATE: 2021-03-16, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
//! DATE: 2021-03-17, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 128
|
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 128
|
||||||
|
|
||||||
// Executed Command:
|
// Executed Command:
|
||||||
@@ -44,128 +44,128 @@ use sp_std::marker::PhantomData;
|
|||||||
pub struct WeightInfo<T>(PhantomData<T>);
|
pub struct WeightInfo<T>(PhantomData<T>);
|
||||||
impl<T: frame_system::Config> pallet_staking::WeightInfo for WeightInfo<T> {
|
impl<T: frame_system::Config> pallet_staking::WeightInfo for WeightInfo<T> {
|
||||||
fn bond() -> Weight {
|
fn bond() -> Weight {
|
||||||
(77_718_000 as Weight)
|
(76_875_000 as Weight)
|
||||||
.saturating_add(T::DbWeight::get().reads(5 as Weight))
|
.saturating_add(T::DbWeight::get().reads(5 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().writes(4 as Weight))
|
.saturating_add(T::DbWeight::get().writes(4 as Weight))
|
||||||
}
|
}
|
||||||
fn bond_extra() -> Weight {
|
fn bond_extra() -> Weight {
|
||||||
(62_574_000 as Weight)
|
(62_995_000 as Weight)
|
||||||
.saturating_add(T::DbWeight::get().reads(4 as Weight))
|
.saturating_add(T::DbWeight::get().reads(4 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||||
}
|
}
|
||||||
fn unbond() -> Weight {
|
fn unbond() -> Weight {
|
||||||
(57_144_000 as Weight)
|
(57_975_000 as Weight)
|
||||||
.saturating_add(T::DbWeight::get().reads(5 as Weight))
|
.saturating_add(T::DbWeight::get().reads(5 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
||||||
}
|
}
|
||||||
fn withdraw_unbonded_update(s: u32, ) -> Weight {
|
fn withdraw_unbonded_update(s: u32, ) -> Weight {
|
||||||
(57_372_000 as Weight)
|
(57_933_000 as Weight)
|
||||||
// Standard Error: 0
|
// Standard Error: 0
|
||||||
.saturating_add((34_000 as Weight).saturating_mul(s as Weight))
|
.saturating_add((28_000 as Weight).saturating_mul(s as Weight))
|
||||||
.saturating_add(T::DbWeight::get().reads(5 as Weight))
|
.saturating_add(T::DbWeight::get().reads(5 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
||||||
}
|
}
|
||||||
fn withdraw_unbonded_kill(s: u32, ) -> Weight {
|
fn withdraw_unbonded_kill(s: u32, ) -> Weight {
|
||||||
(90_473_000 as Weight)
|
(90_563_000 as Weight)
|
||||||
// Standard Error: 1_000
|
// Standard Error: 1_000
|
||||||
.saturating_add((2_696_000 as Weight).saturating_mul(s as Weight))
|
.saturating_add((2_611_000 as Weight).saturating_mul(s as Weight))
|
||||||
.saturating_add(T::DbWeight::get().reads(7 as Weight))
|
.saturating_add(T::DbWeight::get().reads(7 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().writes(8 as Weight))
|
.saturating_add(T::DbWeight::get().writes(8 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight)))
|
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight)))
|
||||||
}
|
}
|
||||||
fn validate() -> Weight {
|
fn validate() -> Weight {
|
||||||
(18_908_000 as Weight)
|
(19_133_000 as Weight)
|
||||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||||
}
|
}
|
||||||
fn kick(k: u32, ) -> Weight {
|
fn kick(k: u32, ) -> Weight {
|
||||||
(13_882_000 as Weight)
|
(15_690_000 as Weight)
|
||||||
// Standard Error: 11_000
|
// Standard Error: 12_000
|
||||||
.saturating_add((18_890_000 as Weight).saturating_mul(k as Weight))
|
.saturating_add((18_456_000 as Weight).saturating_mul(k as Weight))
|
||||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(k as Weight)))
|
.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(k as Weight)))
|
||||||
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(k as Weight)))
|
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(k as Weight)))
|
||||||
}
|
}
|
||||||
fn nominate(n: u32, ) -> Weight {
|
fn nominate(n: u32, ) -> Weight {
|
||||||
(29_058_000 as Weight)
|
(28_321_000 as Weight)
|
||||||
// Standard Error: 10_000
|
// Standard Error: 19_000
|
||||||
.saturating_add((5_630_000 as Weight).saturating_mul(n as Weight))
|
.saturating_add((5_942_000 as Weight).saturating_mul(n as Weight))
|
||||||
.saturating_add(T::DbWeight::get().reads(4 as Weight))
|
.saturating_add(T::DbWeight::get().reads(4 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(n as Weight)))
|
.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(n as Weight)))
|
||||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||||
}
|
}
|
||||||
fn chill() -> Weight {
|
fn chill() -> Weight {
|
||||||
(18_312_000 as Weight)
|
(18_547_000 as Weight)
|
||||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||||
}
|
}
|
||||||
fn set_payee() -> Weight {
|
fn set_payee() -> Weight {
|
||||||
(12_312_000 as Weight)
|
(12_521_000 as Weight)
|
||||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||||
}
|
}
|
||||||
fn set_controller() -> Weight {
|
fn set_controller() -> Weight {
|
||||||
(26_912_000 as Weight)
|
(27_232_000 as Weight)
|
||||||
.saturating_add(T::DbWeight::get().reads(3 as Weight))
|
.saturating_add(T::DbWeight::get().reads(3 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
||||||
}
|
}
|
||||||
fn set_validator_count() -> Weight {
|
fn set_validator_count() -> Weight {
|
||||||
(2_171_000 as Weight)
|
(2_151_000 as Weight)
|
||||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||||
}
|
}
|
||||||
fn force_no_eras() -> Weight {
|
fn force_no_eras() -> Weight {
|
||||||
(2_363_000 as Weight)
|
(2_354_000 as Weight)
|
||||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||||
}
|
}
|
||||||
fn force_new_era() -> Weight {
|
fn force_new_era() -> Weight {
|
||||||
(2_376_000 as Weight)
|
(2_348_000 as Weight)
|
||||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||||
}
|
}
|
||||||
fn force_new_era_always() -> Weight {
|
fn force_new_era_always() -> Weight {
|
||||||
(2_389_000 as Weight)
|
(2_348_000 as Weight)
|
||||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||||
}
|
}
|
||||||
fn set_invulnerables(v: u32, ) -> Weight {
|
fn set_invulnerables(v: u32, ) -> Weight {
|
||||||
(2_507_000 as Weight)
|
(2_405_000 as Weight)
|
||||||
// Standard Error: 0
|
// Standard Error: 0
|
||||||
.saturating_add((36_000 as Weight).saturating_mul(v as Weight))
|
.saturating_add((37_000 as Weight).saturating_mul(v as Weight))
|
||||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||||
}
|
}
|
||||||
fn force_unstake(s: u32, ) -> Weight {
|
fn force_unstake(s: u32, ) -> Weight {
|
||||||
(62_142_000 as Weight)
|
(60_659_000 as Weight)
|
||||||
// Standard Error: 1_000
|
// Standard Error: 1_000
|
||||||
.saturating_add((2_677_000 as Weight).saturating_mul(s as Weight))
|
.saturating_add((2_602_000 as Weight).saturating_mul(s as Weight))
|
||||||
.saturating_add(T::DbWeight::get().reads(4 as Weight))
|
.saturating_add(T::DbWeight::get().reads(4 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().writes(8 as Weight))
|
.saturating_add(T::DbWeight::get().writes(8 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight)))
|
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight)))
|
||||||
}
|
}
|
||||||
fn cancel_deferred_slash(s: u32, ) -> Weight {
|
fn cancel_deferred_slash(s: u32, ) -> Weight {
|
||||||
(5_956_705_000 as Weight)
|
(5_924_925_000 as Weight)
|
||||||
// Standard Error: 389_000
|
// Standard Error: 391_000
|
||||||
.saturating_add((34_748_000 as Weight).saturating_mul(s as Weight))
|
.saturating_add((34_794_000 as Weight).saturating_mul(s as Weight))
|
||||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||||
}
|
}
|
||||||
fn payout_stakers_dead_controller(n: u32, ) -> Weight {
|
fn payout_stakers_dead_controller(n: u32, ) -> Weight {
|
||||||
(119_801_000 as Weight)
|
(132_323_000 as Weight)
|
||||||
// Standard Error: 23_000
|
// Standard Error: 19_000
|
||||||
.saturating_add((52_239_000 as Weight).saturating_mul(n as Weight))
|
.saturating_add((50_563_000 as Weight).saturating_mul(n as Weight))
|
||||||
.saturating_add(T::DbWeight::get().reads(11 as Weight))
|
.saturating_add(T::DbWeight::get().reads(11 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(n as Weight)))
|
.saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(n as Weight)))
|
||||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(n as Weight)))
|
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(n as Weight)))
|
||||||
}
|
}
|
||||||
fn payout_stakers_alive_staked(n: u32, ) -> Weight {
|
fn payout_stakers_alive_staked(n: u32, ) -> Weight {
|
||||||
(145_401_000 as Weight)
|
(149_610_000 as Weight)
|
||||||
// Standard Error: 25_000
|
// Standard Error: 19_000
|
||||||
.saturating_add((66_479_000 as Weight).saturating_mul(n as Weight))
|
.saturating_add((65_975_000 as Weight).saturating_mul(n as Weight))
|
||||||
.saturating_add(T::DbWeight::get().reads(12 as Weight))
|
.saturating_add(T::DbWeight::get().reads(12 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().reads((5 as Weight).saturating_mul(n as Weight)))
|
.saturating_add(T::DbWeight::get().reads((5 as Weight).saturating_mul(n as Weight)))
|
||||||
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(n as Weight)))
|
.saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(n as Weight)))
|
||||||
}
|
}
|
||||||
fn rebond(l: u32, ) -> Weight {
|
fn rebond(l: u32, ) -> Weight {
|
||||||
(39_588_000 as Weight)
|
(39_655_000 as Weight)
|
||||||
// Standard Error: 1_000
|
// Standard Error: 1_000
|
||||||
.saturating_add((80_000 as Weight).saturating_mul(l as Weight))
|
.saturating_add((80_000 as Weight).saturating_mul(l as Weight))
|
||||||
.saturating_add(T::DbWeight::get().reads(4 as Weight))
|
.saturating_add(T::DbWeight::get().reads(4 as Weight))
|
||||||
@@ -173,26 +173,26 @@ impl<T: frame_system::Config> pallet_staking::WeightInfo for WeightInfo<T> {
|
|||||||
}
|
}
|
||||||
fn set_history_depth(e: u32, ) -> Weight {
|
fn set_history_depth(e: u32, ) -> Weight {
|
||||||
(0 as Weight)
|
(0 as Weight)
|
||||||
// Standard Error: 63_000
|
// Standard Error: 69_000
|
||||||
.saturating_add((32_182_000 as Weight).saturating_mul(e as Weight))
|
.saturating_add((32_774_000 as Weight).saturating_mul(e as Weight))
|
||||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().writes(4 as Weight))
|
.saturating_add(T::DbWeight::get().writes(4 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().writes((7 as Weight).saturating_mul(e as Weight)))
|
.saturating_add(T::DbWeight::get().writes((7 as Weight).saturating_mul(e as Weight)))
|
||||||
}
|
}
|
||||||
fn reap_stash(s: u32, ) -> Weight {
|
fn reap_stash(s: u32, ) -> Weight {
|
||||||
(64_893_000 as Weight)
|
(63_925_000 as Weight)
|
||||||
// Standard Error: 0
|
// Standard Error: 0
|
||||||
.saturating_add((2_670_000 as Weight).saturating_mul(s as Weight))
|
.saturating_add((2_607_000 as Weight).saturating_mul(s as Weight))
|
||||||
.saturating_add(T::DbWeight::get().reads(4 as Weight))
|
.saturating_add(T::DbWeight::get().reads(4 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().writes(8 as Weight))
|
.saturating_add(T::DbWeight::get().writes(8 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight)))
|
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight)))
|
||||||
}
|
}
|
||||||
fn new_era(v: u32, n: u32, ) -> Weight {
|
fn new_era(v: u32, n: u32, ) -> Weight {
|
||||||
(0 as Weight)
|
(0 as Weight)
|
||||||
// Standard Error: 805_000
|
// Standard Error: 866_000
|
||||||
.saturating_add((593_729_000 as Weight).saturating_mul(v as Weight))
|
.saturating_add((576_867_000 as Weight).saturating_mul(v as Weight))
|
||||||
// Standard Error: 40_000
|
// Standard Error: 43_000
|
||||||
.saturating_add((82_504_000 as Weight).saturating_mul(n as Weight))
|
.saturating_add((81_113_000 as Weight).saturating_mul(n as Weight))
|
||||||
.saturating_add(T::DbWeight::get().reads(9 as Weight))
|
.saturating_add(T::DbWeight::get().reads(9 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().reads((4 as Weight).saturating_mul(v as Weight)))
|
.saturating_add(T::DbWeight::get().reads((4 as Weight).saturating_mul(v as Weight)))
|
||||||
.saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(n as Weight)))
|
.saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(n as Weight)))
|
||||||
@@ -201,20 +201,20 @@ impl<T: frame_system::Config> pallet_staking::WeightInfo for WeightInfo<T> {
|
|||||||
}
|
}
|
||||||
fn get_npos_voters(v: u32, n: u32, s: u32, ) -> Weight {
|
fn get_npos_voters(v: u32, n: u32, s: u32, ) -> Weight {
|
||||||
(0 as Weight)
|
(0 as Weight)
|
||||||
// Standard Error: 102_000
|
// Standard Error: 104_000
|
||||||
.saturating_add((27_089_000 as Weight).saturating_mul(v as Weight))
|
.saturating_add((27_530_000 as Weight).saturating_mul(v as Weight))
|
||||||
// Standard Error: 102_000
|
// Standard Error: 104_000
|
||||||
.saturating_add((66_306_000 as Weight).saturating_mul(n as Weight))
|
.saturating_add((64_657_000 as Weight).saturating_mul(n as Weight))
|
||||||
// Standard Error: 1_389_000
|
// Standard Error: 1_426_000
|
||||||
.saturating_add((26_679_000 as Weight).saturating_mul(s as Weight))
|
.saturating_add((24_398_000 as Weight).saturating_mul(s as Weight))
|
||||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().reads((4 as Weight).saturating_mul(v as Weight)))
|
.saturating_add(T::DbWeight::get().reads((4 as Weight).saturating_mul(v as Weight)))
|
||||||
.saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(n as Weight)))
|
.saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(n as Weight)))
|
||||||
}
|
}
|
||||||
fn get_npos_targets(v: u32, ) -> Weight {
|
fn get_npos_targets(v: u32, ) -> Weight {
|
||||||
(0 as Weight)
|
(0 as Weight)
|
||||||
// Standard Error: 27_000
|
// Standard Error: 24_000
|
||||||
.saturating_add((9_912_000 as Weight).saturating_mul(v as Weight))
|
.saturating_add((10_595_000 as Weight).saturating_mul(v as Weight))
|
||||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(v as Weight)))
|
.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(v as Weight)))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
//! Autogenerated weights for pallet_staking
|
//! Autogenerated weights for pallet_staking
|
||||||
//!
|
//!
|
||||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0
|
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0
|
||||||
//! DATE: 2021-03-16, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
//! DATE: 2021-03-17, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 128
|
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 128
|
||||||
|
|
||||||
// Executed Command:
|
// Executed Command:
|
||||||
@@ -44,155 +44,155 @@ use sp_std::marker::PhantomData;
|
|||||||
pub struct WeightInfo<T>(PhantomData<T>);
|
pub struct WeightInfo<T>(PhantomData<T>);
|
||||||
impl<T: frame_system::Config> pallet_staking::WeightInfo for WeightInfo<T> {
|
impl<T: frame_system::Config> pallet_staking::WeightInfo for WeightInfo<T> {
|
||||||
fn bond() -> Weight {
|
fn bond() -> Weight {
|
||||||
(81_499_000 as Weight)
|
(77_940_000 as Weight)
|
||||||
.saturating_add(T::DbWeight::get().reads(5 as Weight))
|
.saturating_add(T::DbWeight::get().reads(5 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().writes(4 as Weight))
|
.saturating_add(T::DbWeight::get().writes(4 as Weight))
|
||||||
}
|
}
|
||||||
fn bond_extra() -> Weight {
|
fn bond_extra() -> Weight {
|
||||||
(65_711_000 as Weight)
|
(63_020_000 as Weight)
|
||||||
.saturating_add(T::DbWeight::get().reads(4 as Weight))
|
.saturating_add(T::DbWeight::get().reads(4 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||||
}
|
}
|
||||||
fn unbond() -> Weight {
|
fn unbond() -> Weight {
|
||||||
(59_921_000 as Weight)
|
(57_394_000 as Weight)
|
||||||
.saturating_add(T::DbWeight::get().reads(5 as Weight))
|
.saturating_add(T::DbWeight::get().reads(5 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
||||||
}
|
}
|
||||||
fn withdraw_unbonded_update(s: u32, ) -> Weight {
|
fn withdraw_unbonded_update(s: u32, ) -> Weight {
|
||||||
(59_327_000 as Weight)
|
(57_557_000 as Weight)
|
||||||
// Standard Error: 0
|
// Standard Error: 0
|
||||||
.saturating_add((32_000 as Weight).saturating_mul(s as Weight))
|
.saturating_add((30_000 as Weight).saturating_mul(s as Weight))
|
||||||
.saturating_add(T::DbWeight::get().reads(5 as Weight))
|
.saturating_add(T::DbWeight::get().reads(5 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
||||||
}
|
}
|
||||||
fn withdraw_unbonded_kill(s: u32, ) -> Weight {
|
fn withdraw_unbonded_kill(s: u32, ) -> Weight {
|
||||||
(92_969_000 as Weight)
|
(89_711_000 as Weight)
|
||||||
// Standard Error: 1_000
|
// Standard Error: 1_000
|
||||||
.saturating_add((2_788_000 as Weight).saturating_mul(s as Weight))
|
.saturating_add((2_536_000 as Weight).saturating_mul(s as Weight))
|
||||||
.saturating_add(T::DbWeight::get().reads(7 as Weight))
|
.saturating_add(T::DbWeight::get().reads(7 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().writes(8 as Weight))
|
.saturating_add(T::DbWeight::get().writes(8 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight)))
|
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight)))
|
||||||
}
|
}
|
||||||
fn validate() -> Weight {
|
fn validate() -> Weight {
|
||||||
(19_667_000 as Weight)
|
(19_166_000 as Weight)
|
||||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||||
}
|
}
|
||||||
fn kick(k: u32, ) -> Weight {
|
fn kick(k: u32, ) -> Weight {
|
||||||
(12_197_000 as Weight)
|
(15_314_000 as Weight)
|
||||||
// Standard Error: 13_000
|
// Standard Error: 12_000
|
||||||
.saturating_add((19_522_000 as Weight).saturating_mul(k as Weight))
|
.saturating_add((18_658_000 as Weight).saturating_mul(k as Weight))
|
||||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(k as Weight)))
|
.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(k as Weight)))
|
||||||
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(k as Weight)))
|
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(k as Weight)))
|
||||||
}
|
}
|
||||||
fn nominate(n: u32, ) -> Weight {
|
fn nominate(n: u32, ) -> Weight {
|
||||||
(30_233_000 as Weight)
|
(29_666_000 as Weight)
|
||||||
// Standard Error: 11_000
|
// Standard Error: 10_000
|
||||||
.saturating_add((6_033_000 as Weight).saturating_mul(n as Weight))
|
.saturating_add((5_889_000 as Weight).saturating_mul(n as Weight))
|
||||||
.saturating_add(T::DbWeight::get().reads(4 as Weight))
|
.saturating_add(T::DbWeight::get().reads(4 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(n as Weight)))
|
.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(n as Weight)))
|
||||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||||
}
|
}
|
||||||
fn chill() -> Weight {
|
fn chill() -> Weight {
|
||||||
(19_039_000 as Weight)
|
(18_376_000 as Weight)
|
||||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||||
}
|
}
|
||||||
fn set_payee() -> Weight {
|
fn set_payee() -> Weight {
|
||||||
(12_639_000 as Weight)
|
(12_427_000 as Weight)
|
||||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||||
}
|
}
|
||||||
fn set_controller() -> Weight {
|
fn set_controller() -> Weight {
|
||||||
(28_213_000 as Weight)
|
(27_521_000 as Weight)
|
||||||
.saturating_add(T::DbWeight::get().reads(3 as Weight))
|
.saturating_add(T::DbWeight::get().reads(3 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
||||||
}
|
}
|
||||||
fn set_validator_count() -> Weight {
|
fn set_validator_count() -> Weight {
|
||||||
(2_227_000 as Weight)
|
(2_166_000 as Weight)
|
||||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||||
}
|
}
|
||||||
fn force_no_eras() -> Weight {
|
fn force_no_eras() -> Weight {
|
||||||
(2_471_000 as Weight)
|
(2_327_000 as Weight)
|
||||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||||
}
|
}
|
||||||
fn force_new_era() -> Weight {
|
fn force_new_era() -> Weight {
|
||||||
(2_474_000 as Weight)
|
(2_331_000 as Weight)
|
||||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||||
}
|
}
|
||||||
fn force_new_era_always() -> Weight {
|
fn force_new_era_always() -> Weight {
|
||||||
(2_498_000 as Weight)
|
(2_368_000 as Weight)
|
||||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||||
}
|
}
|
||||||
fn set_invulnerables(v: u32, ) -> Weight {
|
fn set_invulnerables(v: u32, ) -> Weight {
|
||||||
(2_574_000 as Weight)
|
(2_457_000 as Weight)
|
||||||
// Standard Error: 0
|
// Standard Error: 0
|
||||||
.saturating_add((35_000 as Weight).saturating_mul(v as Weight))
|
.saturating_add((35_000 as Weight).saturating_mul(v as Weight))
|
||||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||||
}
|
}
|
||||||
fn force_unstake(s: u32, ) -> Weight {
|
fn force_unstake(s: u32, ) -> Weight {
|
||||||
(62_942_000 as Weight)
|
(60_022_000 as Weight)
|
||||||
// Standard Error: 1_000
|
// Standard Error: 2_000
|
||||||
.saturating_add((2_777_000 as Weight).saturating_mul(s as Weight))
|
.saturating_add((2_533_000 as Weight).saturating_mul(s as Weight))
|
||||||
.saturating_add(T::DbWeight::get().reads(4 as Weight))
|
.saturating_add(T::DbWeight::get().reads(4 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().writes(8 as Weight))
|
.saturating_add(T::DbWeight::get().writes(8 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight)))
|
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight)))
|
||||||
}
|
}
|
||||||
fn cancel_deferred_slash(s: u32, ) -> Weight {
|
fn cancel_deferred_slash(s: u32, ) -> Weight {
|
||||||
(5_907_418_000 as Weight)
|
(5_917_057_000 as Weight)
|
||||||
// Standard Error: 388_000
|
// Standard Error: 392_000
|
||||||
.saturating_add((34_797_000 as Weight).saturating_mul(s as Weight))
|
.saturating_add((34_782_000 as Weight).saturating_mul(s as Weight))
|
||||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||||
}
|
}
|
||||||
fn payout_stakers_dead_controller(n: u32, ) -> Weight {
|
fn payout_stakers_dead_controller(n: u32, ) -> Weight {
|
||||||
(110_034_000 as Weight)
|
(111_470_000 as Weight)
|
||||||
// Standard Error: 27_000
|
// Standard Error: 25_000
|
||||||
.saturating_add((53_473_000 as Weight).saturating_mul(n as Weight))
|
.saturating_add((50_721_000 as Weight).saturating_mul(n as Weight))
|
||||||
.saturating_add(T::DbWeight::get().reads(11 as Weight))
|
.saturating_add(T::DbWeight::get().reads(11 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(n as Weight)))
|
.saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(n as Weight)))
|
||||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(n as Weight)))
|
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(n as Weight)))
|
||||||
}
|
}
|
||||||
fn payout_stakers_alive_staked(n: u32, ) -> Weight {
|
fn payout_stakers_alive_staked(n: u32, ) -> Weight {
|
||||||
(139_985_000 as Weight)
|
(138_269_000 as Weight)
|
||||||
// Standard Error: 36_000
|
// Standard Error: 35_000
|
||||||
.saturating_add((66_694_000 as Weight).saturating_mul(n as Weight))
|
.saturating_add((64_613_000 as Weight).saturating_mul(n as Weight))
|
||||||
.saturating_add(T::DbWeight::get().reads(12 as Weight))
|
.saturating_add(T::DbWeight::get().reads(12 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().reads((5 as Weight).saturating_mul(n as Weight)))
|
.saturating_add(T::DbWeight::get().reads((5 as Weight).saturating_mul(n as Weight)))
|
||||||
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(n as Weight)))
|
.saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(n as Weight)))
|
||||||
}
|
}
|
||||||
fn rebond(l: u32, ) -> Weight {
|
fn rebond(l: u32, ) -> Weight {
|
||||||
(40_653_000 as Weight)
|
(39_748_000 as Weight)
|
||||||
// Standard Error: 1_000
|
// Standard Error: 1_000
|
||||||
.saturating_add((83_000 as Weight).saturating_mul(l as Weight))
|
.saturating_add((87_000 as Weight).saturating_mul(l as Weight))
|
||||||
.saturating_add(T::DbWeight::get().reads(4 as Weight))
|
.saturating_add(T::DbWeight::get().reads(4 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
||||||
}
|
}
|
||||||
fn set_history_depth(e: u32, ) -> Weight {
|
fn set_history_depth(e: u32, ) -> Weight {
|
||||||
(0 as Weight)
|
(0 as Weight)
|
||||||
// Standard Error: 66_000
|
// Standard Error: 61_000
|
||||||
.saturating_add((34_574_000 as Weight).saturating_mul(e as Weight))
|
.saturating_add((32_367_000 as Weight).saturating_mul(e as Weight))
|
||||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().writes(4 as Weight))
|
.saturating_add(T::DbWeight::get().writes(4 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().writes((7 as Weight).saturating_mul(e as Weight)))
|
.saturating_add(T::DbWeight::get().writes((7 as Weight).saturating_mul(e as Weight)))
|
||||||
}
|
}
|
||||||
fn reap_stash(s: u32, ) -> Weight {
|
fn reap_stash(s: u32, ) -> Weight {
|
||||||
(66_194_000 as Weight)
|
(63_762_000 as Weight)
|
||||||
// Standard Error: 0
|
// Standard Error: 0
|
||||||
.saturating_add((2_776_000 as Weight).saturating_mul(s as Weight))
|
.saturating_add((2_534_000 as Weight).saturating_mul(s as Weight))
|
||||||
.saturating_add(T::DbWeight::get().reads(4 as Weight))
|
.saturating_add(T::DbWeight::get().reads(4 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().writes(8 as Weight))
|
.saturating_add(T::DbWeight::get().writes(8 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight)))
|
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight)))
|
||||||
}
|
}
|
||||||
fn new_era(v: u32, n: u32, ) -> Weight {
|
fn new_era(v: u32, n: u32, ) -> Weight {
|
||||||
(0 as Weight)
|
(0 as Weight)
|
||||||
// Standard Error: 866_000
|
// Standard Error: 930_000
|
||||||
.saturating_add((589_008_000 as Weight).saturating_mul(v as Weight))
|
.saturating_add((580_691_000 as Weight).saturating_mul(v as Weight))
|
||||||
// Standard Error: 43_000
|
// Standard Error: 46_000
|
||||||
.saturating_add((83_399_000 as Weight).saturating_mul(n as Weight))
|
.saturating_add((82_066_000 as Weight).saturating_mul(n as Weight))
|
||||||
.saturating_add(T::DbWeight::get().reads(9 as Weight))
|
.saturating_add(T::DbWeight::get().reads(9 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().reads((4 as Weight).saturating_mul(v as Weight)))
|
.saturating_add(T::DbWeight::get().reads((4 as Weight).saturating_mul(v as Weight)))
|
||||||
.saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(n as Weight)))
|
.saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(n as Weight)))
|
||||||
@@ -201,20 +201,20 @@ impl<T: frame_system::Config> pallet_staking::WeightInfo for WeightInfo<T> {
|
|||||||
}
|
}
|
||||||
fn get_npos_voters(v: u32, n: u32, s: u32, ) -> Weight {
|
fn get_npos_voters(v: u32, n: u32, s: u32, ) -> Weight {
|
||||||
(0 as Weight)
|
(0 as Weight)
|
||||||
// Standard Error: 108_000
|
// Standard Error: 102_000
|
||||||
.saturating_add((29_045_000 as Weight).saturating_mul(v as Weight))
|
.saturating_add((27_754_000 as Weight).saturating_mul(v as Weight))
|
||||||
// Standard Error: 108_000
|
// Standard Error: 102_000
|
||||||
.saturating_add((68_556_000 as Weight).saturating_mul(n as Weight))
|
.saturating_add((65_216_000 as Weight).saturating_mul(n as Weight))
|
||||||
// Standard Error: 1_480_000
|
// Standard Error: 1_400_000
|
||||||
.saturating_add((25_444_000 as Weight).saturating_mul(s as Weight))
|
.saturating_add((18_982_000 as Weight).saturating_mul(s as Weight))
|
||||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().reads((4 as Weight).saturating_mul(v as Weight)))
|
.saturating_add(T::DbWeight::get().reads((4 as Weight).saturating_mul(v as Weight)))
|
||||||
.saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(n as Weight)))
|
.saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(n as Weight)))
|
||||||
}
|
}
|
||||||
fn get_npos_targets(v: u32, ) -> Weight {
|
fn get_npos_targets(v: u32, ) -> Weight {
|
||||||
(0 as Weight)
|
(0 as Weight)
|
||||||
// Standard Error: 26_000
|
// Standard Error: 29_000
|
||||||
.saturating_add((10_855_000 as Weight).saturating_mul(v as Weight))
|
.saturating_add((10_700_000 as Weight).saturating_mul(v as Weight))
|
||||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(v as Weight)))
|
.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(v as Weight)))
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user