Deprecate RewardDestination::Controller (#2380)

Deprecates `RewardDestination::Controller` variant.

- [x] `RewardDestination::Controller` annotated with `#[deprecated]`.
- [x] `Controller` variant is now handled the same way as `Stash` in
`payout_stakers`.
- [x] `set_payee` errors if `RewardDestination::Controller` is provided.
- [x] Added `update_payee` call to lazily migrate
`RewardDestination::Controller` `Payee` storage entries to
`RewardDestination::Account(controller)` .
- [x] `payout_stakers_dead_controller` has been removed from benches &
weights - was not used.
- [x] Tests no longer use `RewardDestination::Controller`.

---------

Co-authored-by: command-bot <>
Co-authored-by: Gonçalo Pestana <g6pestana@gmail.com>
Co-authored-by: georgepisaltu <52418509+georgepisaltu@users.noreply.github.com>
This commit is contained in:
Ross Bulat
2023-11-22 16:22:28 +07:00
committed by GitHub
parent 2183669d05
commit 7a32f4be48
8 changed files with 475 additions and 554 deletions
@@ -17,7 +17,7 @@
//! Autogenerated weights for `pallet_staking`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2023-10-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2023-11-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `runner-yprdrvc7-project-674-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("westend-dev")`, DB CACHE: 1024
@@ -62,8 +62,8 @@ impl<T: frame_system::Config> pallet_staking::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `894`
// Estimated: `4764`
// Minimum execution time: 39_950_000 picoseconds.
Weight::from_parts(41_107_000, 0)
// Minimum execution time: 38_052_000 picoseconds.
Weight::from_parts(39_303_000, 0)
.saturating_add(Weight::from_parts(0, 4764))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(4))
@@ -84,8 +84,8 @@ impl<T: frame_system::Config> pallet_staking::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `1921`
// Estimated: `8877`
// Minimum execution time: 83_828_000 picoseconds.
Weight::from_parts(85_733_000, 0)
// Minimum execution time: 81_690_000 picoseconds.
Weight::from_parts(83_889_000, 0)
.saturating_add(Weight::from_parts(0, 8877))
.saturating_add(T::DbWeight::get().reads(9))
.saturating_add(T::DbWeight::get().writes(7))
@@ -112,8 +112,8 @@ impl<T: frame_system::Config> pallet_staking::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `2128`
// Estimated: `8877`
// Minimum execution time: 89_002_000 picoseconds.
Weight::from_parts(91_556_000, 0)
// Minimum execution time: 84_409_000 picoseconds.
Weight::from_parts(87_330_000, 0)
.saturating_add(Weight::from_parts(0, 8877))
.saturating_add(T::DbWeight::get().reads(12))
.saturating_add(T::DbWeight::get().writes(7))
@@ -133,11 +133,11 @@ impl<T: frame_system::Config> pallet_staking::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `1075`
// Estimated: `4764`
// Minimum execution time: 40_839_000 picoseconds.
Weight::from_parts(42_122_428, 0)
// Minimum execution time: 39_770_000 picoseconds.
Weight::from_parts(40_828_632, 0)
.saturating_add(Weight::from_parts(0, 4764))
// Standard Error: 884
.saturating_add(Weight::from_parts(46_036, 0).saturating_mul(s.into()))
// Standard Error: 824
.saturating_add(Weight::from_parts(51_107, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(2))
}
@@ -174,11 +174,11 @@ impl<T: frame_system::Config> pallet_staking::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `2127 + s * (4 ±0)`
// Estimated: `6248 + s * (4 ±0)`
// Minimum execution time: 84_244_000 picoseconds.
Weight::from_parts(91_199_964, 0)
// Minimum execution time: 82_500_000 picoseconds.
Weight::from_parts(90_099_121, 0)
.saturating_add(Weight::from_parts(0, 6248))
// Standard Error: 3_381
.saturating_add(Weight::from_parts(1_327_289, 0).saturating_mul(s.into()))
// Standard Error: 3_280
.saturating_add(Weight::from_parts(1_273_212, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(13))
.saturating_add(T::DbWeight::get().writes(11))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into())))
@@ -210,8 +210,8 @@ impl<T: frame_system::Config> pallet_staking::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `1301`
// Estimated: `4556`
// Minimum execution time: 49_693_000 picoseconds.
Weight::from_parts(50_814_000, 0)
// Minimum execution time: 48_236_000 picoseconds.
Weight::from_parts(49_518_000, 0)
.saturating_add(Weight::from_parts(0, 4556))
.saturating_add(T::DbWeight::get().reads(11))
.saturating_add(T::DbWeight::get().writes(5))
@@ -225,11 +225,11 @@ impl<T: frame_system::Config> pallet_staking::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `1243 + k * (569 ±0)`
// Estimated: `4556 + k * (3033 ±0)`
// Minimum execution time: 29_140_000 picoseconds.
Weight::from_parts(28_309_627, 0)
// Minimum execution time: 28_280_000 picoseconds.
Weight::from_parts(29_182_740, 0)
.saturating_add(Weight::from_parts(0, 4556))
// Standard Error: 5_780
.saturating_add(Weight::from_parts(6_509_869, 0).saturating_mul(k.into()))
// Standard Error: 6_102
.saturating_add(Weight::from_parts(6_412_107, 0).saturating_mul(k.into()))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(k.into())))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(k.into())))
@@ -262,11 +262,11 @@ impl<T: frame_system::Config> pallet_staking::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `1797 + n * (102 ±0)`
// Estimated: `6248 + n * (2520 ±0)`
// Minimum execution time: 61_377_000 picoseconds.
Weight::from_parts(58_805_232, 0)
// Minimum execution time: 59_846_000 picoseconds.
Weight::from_parts(58_029_857, 0)
.saturating_add(Weight::from_parts(0, 6248))
// Standard Error: 14_197
.saturating_add(Weight::from_parts(4_090_197, 0).saturating_mul(n.into()))
// Standard Error: 15_967
.saturating_add(Weight::from_parts(3_898_764, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(12))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into())))
.saturating_add(T::DbWeight::get().writes(6))
@@ -290,8 +290,8 @@ impl<T: frame_system::Config> pallet_staking::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `1581`
// Estimated: `6248`
// Minimum execution time: 52_736_000 picoseconds.
Weight::from_parts(54_573_000, 0)
// Minimum execution time: 51_223_000 picoseconds.
Weight::from_parts(52_310_000, 0)
.saturating_add(Weight::from_parts(0, 6248))
.saturating_add(T::DbWeight::get().reads(8))
.saturating_add(T::DbWeight::get().writes(6))
@@ -306,12 +306,28 @@ impl<T: frame_system::Config> pallet_staking::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `865`
// Estimated: `4556`
// Minimum execution time: 16_496_000 picoseconds.
Weight::from_parts(17_045_000, 0)
// Minimum execution time: 15_762_000 picoseconds.
Weight::from_parts(16_381_000, 0)
.saturating_add(Weight::from_parts(0, 4556))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Staking::Ledger` (r:1 w:0)
/// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`)
/// Storage: `Staking::Payee` (r:1 w:1)
/// Proof: `Staking::Payee` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
/// Storage: `Staking::Bonded` (r:1 w:0)
/// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
fn update_payee() -> Weight {
// Proof Size summary in bytes:
// Measured: `932`
// Estimated: `4556`
// Minimum execution time: 21_904_000 picoseconds.
Weight::from_parts(22_373_000, 0)
.saturating_add(Weight::from_parts(0, 4556))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Staking::Bonded` (r:1 w:1)
/// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Staking::Ledger` (r:1 w:2)
@@ -320,8 +336,8 @@ impl<T: frame_system::Config> pallet_staking::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `865`
// Estimated: `4556`
// Minimum execution time: 19_339_000 picoseconds.
Weight::from_parts(20_187_000, 0)
// Minimum execution time: 18_869_000 picoseconds.
Weight::from_parts(19_422_000, 0)
.saturating_add(Weight::from_parts(0, 4556))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(3))
@@ -332,8 +348,8 @@ impl<T: frame_system::Config> pallet_staking::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 2_340_000 picoseconds.
Weight::from_parts(2_551_000, 0)
// Minimum execution time: 2_205_000 picoseconds.
Weight::from_parts(2_320_000, 0)
.saturating_add(Weight::from_parts(0, 0))
.saturating_add(T::DbWeight::get().writes(1))
}
@@ -343,8 +359,8 @@ impl<T: frame_system::Config> pallet_staking::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 7_483_000 picoseconds.
Weight::from_parts(8_101_000, 0)
// Minimum execution time: 7_179_000 picoseconds.
Weight::from_parts(7_843_000, 0)
.saturating_add(Weight::from_parts(0, 0))
.saturating_add(T::DbWeight::get().writes(1))
}
@@ -354,8 +370,8 @@ impl<T: frame_system::Config> pallet_staking::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 7_773_000 picoseconds.
Weight::from_parts(8_610_000, 0)
// Minimum execution time: 7_206_000 picoseconds.
Weight::from_parts(7_829_000, 0)
.saturating_add(Weight::from_parts(0, 0))
.saturating_add(T::DbWeight::get().writes(1))
}
@@ -365,8 +381,8 @@ impl<T: frame_system::Config> pallet_staking::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 7_577_000 picoseconds.
Weight::from_parts(7_937_000, 0)
// Minimum execution time: 7_414_000 picoseconds.
Weight::from_parts(7_770_000, 0)
.saturating_add(Weight::from_parts(0, 0))
.saturating_add(T::DbWeight::get().writes(1))
}
@@ -377,11 +393,11 @@ impl<T: frame_system::Config> pallet_staking::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 2_522_000 picoseconds.
Weight::from_parts(2_735_307, 0)
// Minimum execution time: 2_256_000 picoseconds.
Weight::from_parts(2_645_840, 0)
.saturating_add(Weight::from_parts(0, 0))
// Standard Error: 38
.saturating_add(Weight::from_parts(10_553, 0).saturating_mul(v.into()))
// Standard Error: 37
.saturating_add(Weight::from_parts(10_207, 0).saturating_mul(v.into()))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Staking::SlashingSpans` (r:1 w:1)
@@ -417,11 +433,11 @@ impl<T: frame_system::Config> pallet_staking::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `2127 + s * (4 ±0)`
// Estimated: `6248 + s * (4 ±0)`
// Minimum execution time: 82_547_000 picoseconds.
Weight::from_parts(89_373_781, 0)
// Minimum execution time: 81_032_000 picoseconds.
Weight::from_parts(88_297_596, 0)
.saturating_add(Weight::from_parts(0, 6248))
// Standard Error: 3_589
.saturating_add(Weight::from_parts(1_258_878, 0).saturating_mul(s.into()))
// Standard Error: 3_070
.saturating_add(Weight::from_parts(1_207_207, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(13))
.saturating_add(T::DbWeight::get().writes(12))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into())))
@@ -434,56 +450,14 @@ impl<T: frame_system::Config> pallet_staking::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `66639`
// Estimated: `70104`
// Minimum execution time: 134_619_000 picoseconds.
Weight::from_parts(1_194_949_665, 0)
// Minimum execution time: 131_456_000 picoseconds.
Weight::from_parts(935_254_517, 0)
.saturating_add(Weight::from_parts(0, 70104))
// Standard Error: 76_719
.saturating_add(Weight::from_parts(6_455_953, 0).saturating_mul(s.into()))
// Standard Error: 57_806
.saturating_add(Weight::from_parts(4_823_189, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Staking::CurrentEra` (r:1 w:0)
/// Proof: `Staking::CurrentEra` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Staking::ErasStakersOverview` (r:1 w:0)
/// Proof: `Staking::ErasStakersOverview` (`max_values`: None, `max_size`: Some(92), added: 2567, mode: `MaxEncodedLen`)
/// Storage: `Staking::ErasValidatorReward` (r:1 w:0)
/// Proof: `Staking::ErasValidatorReward` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`)
/// Storage: `Staking::Bonded` (r:65 w:0)
/// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Staking::Ledger` (r:1 w:1)
/// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`)
/// Storage: `Balances::Locks` (r:1 w:1)
/// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`)
/// Storage: `Balances::Freezes` (r:1 w:0)
/// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:66 w:66)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// Storage: `Staking::ClaimedRewards` (r:1 w:1)
/// Proof: `Staking::ClaimedRewards` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `Staking::ErasStakersPaged` (r:1 w:0)
/// Proof: `Staking::ErasStakersPaged` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `Staking::ErasRewardPoints` (r:1 w:0)
/// Proof: `Staking::ErasRewardPoints` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `Staking::ErasValidatorPrefs` (r:1 w:0)
/// Proof: `Staking::ErasValidatorPrefs` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// Storage: `Staking::Payee` (r:65 w:0)
/// Proof: `Staking::Payee` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
/// The range of component `n` is `[0, 64]`.
fn payout_stakers_dead_controller(n: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `6895 + n * (156 ±0)`
// Estimated: `9802 + n * (2603 ±0)`
// Minimum execution time: 114_338_000 picoseconds.
Weight::from_parts(138_518_124, 0)
.saturating_add(Weight::from_parts(0, 9802))
// Standard Error: 53_621
.saturating_add(Weight::from_parts(25_676_781, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(14))
.saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(n.into())))
.saturating_add(T::DbWeight::get().writes(5))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into())))
.saturating_add(Weight::from_parts(0, 2603).saturating_mul(n.into()))
}
/// Storage: `Staking::Bonded` (r:65 w:0)
/// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Staking::Ledger` (r:65 w:65)
@@ -516,12 +490,12 @@ impl<T: frame_system::Config> pallet_staking::WeightInfo for WeightInfo<T> {
fn payout_stakers_alive_staked(n: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `8249 + n * (396 ±0)`
// Estimated: `10779 + n * (3774 ±3)`
// Minimum execution time: 132_719_000 picoseconds.
Weight::from_parts(170_505_880, 0)
// Estimated: `10779 + n * (3774 ±0)`
// Minimum execution time: 129_233_000 picoseconds.
Weight::from_parts(165_096_042, 0)
.saturating_add(Weight::from_parts(0, 10779))
// Standard Error: 32_527
.saturating_add(Weight::from_parts(42_453_136, 0).saturating_mul(n.into()))
// Standard Error: 29_598
.saturating_add(Weight::from_parts(40_716_425, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(14))
.saturating_add(T::DbWeight::get().reads((6_u64).saturating_mul(n.into())))
.saturating_add(T::DbWeight::get().writes(4))
@@ -545,11 +519,11 @@ impl<T: frame_system::Config> pallet_staking::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `1922 + l * (5 ±0)`
// Estimated: `8877`
// Minimum execution time: 78_438_000 picoseconds.
Weight::from_parts(81_774_734, 0)
// Minimum execution time: 77_223_000 picoseconds.
Weight::from_parts(80_026_259, 0)
.saturating_add(Weight::from_parts(0, 8877))
// Standard Error: 3_706
.saturating_add(Weight::from_parts(51_358, 0).saturating_mul(l.into()))
// Standard Error: 4_493
.saturating_add(Weight::from_parts(52_909, 0).saturating_mul(l.into()))
.saturating_add(T::DbWeight::get().reads(9))
.saturating_add(T::DbWeight::get().writes(7))
}
@@ -584,11 +558,11 @@ impl<T: frame_system::Config> pallet_staking::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `2127 + s * (4 ±0)`
// Estimated: `6248 + s * (4 ±0)`
// Minimum execution time: 92_129_000 picoseconds.
Weight::from_parts(94_137_611, 0)
// Minimum execution time: 89_871_000 picoseconds.
Weight::from_parts(92_313_331, 0)
.saturating_add(Weight::from_parts(0, 6248))
// Standard Error: 4_141
.saturating_add(Weight::from_parts(1_283_823, 0).saturating_mul(s.into()))
// Standard Error: 3_321
.saturating_add(Weight::from_parts(1_243_347, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(12))
.saturating_add(T::DbWeight::get().writes(11))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into())))
@@ -634,13 +608,13 @@ impl<T: frame_system::Config> pallet_staking::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `0 + n * (716 ±0) + v * (3594 ±0)`
// Estimated: `456136 + n * (3566 ±0) + v * (3566 ±0)`
// Minimum execution time: 527_896_000 picoseconds.
Weight::from_parts(533_325_000, 0)
// Minimum execution time: 518_819_000 picoseconds.
Weight::from_parts(522_108_000, 0)
.saturating_add(Weight::from_parts(0, 456136))
// Standard Error: 2_064_813
.saturating_add(Weight::from_parts(68_484_503, 0).saturating_mul(v.into()))
// Standard Error: 205_747
.saturating_add(Weight::from_parts(18_833_735, 0).saturating_mul(n.into()))
// Standard Error: 1_987_848
.saturating_add(Weight::from_parts(64_855_377, 0).saturating_mul(v.into()))
// Standard Error: 198_078
.saturating_add(Weight::from_parts(18_343_485, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(184))
.saturating_add(T::DbWeight::get().reads((5_u64).saturating_mul(v.into())))
.saturating_add(T::DbWeight::get().reads((4_u64).saturating_mul(n.into())))
@@ -671,13 +645,13 @@ impl<T: frame_system::Config> pallet_staking::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `3108 + n * (907 ±0) + v * (391 ±0)`
// Estimated: `456136 + n * (3566 ±0) + v * (3566 ±0)`
// Minimum execution time: 35_302_472_000 picoseconds.
Weight::from_parts(35_651_169_000, 0)
// Minimum execution time: 34_976_277_000 picoseconds.
Weight::from_parts(35_245_501_000, 0)
.saturating_add(Weight::from_parts(0, 456136))
// Standard Error: 412_098
.saturating_add(Weight::from_parts(5_172_265, 0).saturating_mul(v.into()))
// Standard Error: 412_098
.saturating_add(Weight::from_parts(4_142_772, 0).saturating_mul(n.into()))
// Standard Error: 386_461
.saturating_add(Weight::from_parts(5_145_210, 0).saturating_mul(v.into()))
// Standard Error: 386_461
.saturating_add(Weight::from_parts(3_762_623, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(179))
.saturating_add(T::DbWeight::get().reads((5_u64).saturating_mul(v.into())))
.saturating_add(T::DbWeight::get().reads((4_u64).saturating_mul(n.into())))
@@ -694,11 +668,11 @@ impl<T: frame_system::Config> pallet_staking::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `946 + v * (50 ±0)`
// Estimated: `3510 + v * (2520 ±0)`
// Minimum execution time: 2_522_650_000 picoseconds.
Weight::from_parts(97_022_833, 0)
// Minimum execution time: 2_577_411_000 picoseconds.
Weight::from_parts(86_073_486, 0)
.saturating_add(Weight::from_parts(0, 3510))
// Standard Error: 6_751
.saturating_add(Weight::from_parts(4_990_018, 0).saturating_mul(v.into()))
// Standard Error: 8_363
.saturating_add(Weight::from_parts(5_074_828, 0).saturating_mul(v.into()))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(v.into())))
.saturating_add(Weight::from_parts(0, 2520).saturating_mul(v.into()))
@@ -719,8 +693,8 @@ impl<T: frame_system::Config> pallet_staking::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 3_833_000 picoseconds.
Weight::from_parts(4_108_000, 0)
// Minimum execution time: 3_539_000 picoseconds.
Weight::from_parts(3_903_000, 0)
.saturating_add(Weight::from_parts(0, 0))
.saturating_add(T::DbWeight::get().writes(6))
}
@@ -740,8 +714,8 @@ impl<T: frame_system::Config> pallet_staking::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 3_520_000 picoseconds.
Weight::from_parts(3_686_000, 0)
// Minimum execution time: 3_244_000 picoseconds.
Weight::from_parts(3_450_000, 0)
.saturating_add(Weight::from_parts(0, 0))
.saturating_add(T::DbWeight::get().writes(6))
}
@@ -769,8 +743,8 @@ impl<T: frame_system::Config> pallet_staking::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `1704`
// Estimated: `6248`
// Minimum execution time: 63_983_000 picoseconds.
Weight::from_parts(66_140_000, 0)
// Minimum execution time: 62_606_000 picoseconds.
Weight::from_parts(64_678_000, 0)
.saturating_add(Weight::from_parts(0, 6248))
.saturating_add(T::DbWeight::get().reads(11))
.saturating_add(T::DbWeight::get().writes(6))
@@ -783,8 +757,8 @@ impl<T: frame_system::Config> pallet_staking::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `658`
// Estimated: `3510`
// Minimum execution time: 11_830_000 picoseconds.
Weight::from_parts(12_210_000, 0)
// Minimum execution time: 11_490_000 picoseconds.
Weight::from_parts(11_867_000, 0)
.saturating_add(Weight::from_parts(0, 3510))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
@@ -795,8 +769,8 @@ impl<T: frame_system::Config> pallet_staking::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 2_364_000 picoseconds.
Weight::from_parts(2_555_000, 0)
// Minimum execution time: 2_125_000 picoseconds.
Weight::from_parts(2_337_000, 0)
.saturating_add(Weight::from_parts(0, 0))
.saturating_add(T::DbWeight::get().writes(1))
}
+16 -38
View File
@@ -464,16 +464,28 @@ benchmarks! {
}
set_payee {
let (stash, controller) = create_stash_controller::<T>(USER_SEED, 100, Default::default())?;
let (stash, controller) = create_stash_controller::<T>(USER_SEED, 100, RewardDestination::Staked)?;
assert_eq!(Payee::<T>::get(&stash), RewardDestination::Staked);
whitelist_account!(controller);
}: _(RawOrigin::Signed(controller), RewardDestination::Controller)
}: _(RawOrigin::Signed(controller.clone()), RewardDestination::Account(controller.clone()))
verify {
assert_eq!(Payee::<T>::get(&stash), RewardDestination::Controller);
assert_eq!(Payee::<T>::get(&stash), RewardDestination::Account(controller));
}
update_payee {
let (stash, controller) = create_stash_controller::<T>(USER_SEED, 100, RewardDestination::Staked)?;
Payee::<T>::insert(&stash, {
#[allow(deprecated)]
RewardDestination::Controller
});
whitelist_account!(controller);
}: _(RawOrigin::Signed(controller.clone()), controller.clone())
verify {
assert_eq!(Payee::<T>::get(&stash), RewardDestination::Account(controller));
}
set_controller {
let (stash, ctlr) = create_unique_stash_controller::<T>(9000, 100, Default::default(), false)?;
let (stash, ctlr) = create_unique_stash_controller::<T>(9000, 100, RewardDestination::Staked, false)?;
// ensure `ctlr` is the currently stored controller.
assert!(!Ledger::<T>::contains_key(&stash));
assert!(Ledger::<T>::contains_key(&ctlr));
@@ -551,40 +563,6 @@ benchmarks! {
assert_eq!(UnappliedSlashes::<T>::get(&era).len(), (MAX_SLASHES - s) as usize);
}
payout_stakers_dead_controller {
let n in 0 .. T::MaxExposurePageSize::get() as u32;
let (validator, nominators) = create_validator_with_nominators::<T>(
n,
T::MaxExposurePageSize::get() as u32,
true,
true,
RewardDestination::Controller,
)?;
let current_era = CurrentEra::<T>::get().unwrap();
// set the commission for this particular era as well.
<ErasValidatorPrefs<T>>::insert(current_era, validator.clone(), <Staking<T>>::validators(&validator));
let caller = whitelisted_caller();
let validator_controller = <Bonded<T>>::get(&validator).unwrap();
let balance_before = T::Currency::free_balance(&validator_controller);
for (_, controller) in &nominators {
let balance = T::Currency::free_balance(controller);
ensure!(balance.is_zero(), "Controller has balance, but should be dead.");
}
}: payout_stakers_by_page(RawOrigin::Signed(caller), validator, current_era, 0)
verify {
let balance_after = T::Currency::free_balance(&validator_controller);
ensure!(
balance_before < balance_after,
"Balance of validator controller should have increased after payout.",
);
for (_, controller) in &nominators {
let balance = T::Currency::free_balance(controller);
ensure!(!balance.is_zero(), "Payout not given to controller.");
}
}
payout_stakers_alive_staked {
let n in 0 .. T::MaxExposurePageSize::get() as u32;
let (validator, nominators) = create_validator_with_nominators::<T>(
+4 -2
View File
@@ -240,9 +240,9 @@
//! [`Payee`] storage item (see
//! [`set_payee`](Call::set_payee)), to be one of the following:
//!
//! - Controller account, (obviously) not increasing the staked value.
//! - Stash account, not increasing the staked value.
//! - Stash account, also increasing the staked value.
//! - Any other account, sent as free balance.
//!
//! ### Additional Fund Management Operations
//!
@@ -404,7 +404,9 @@ pub enum RewardDestination<AccountId> {
Staked,
/// Pay into the stash account, not increasing the amount at stake.
Stash,
/// Pay into the controller account.
#[deprecated(
note = "`Controller` will be removed after January 2024. Use `Account(controller)` instead. This variant now behaves the same as `Stash` variant."
)]
Controller,
/// Pay into a specified account.
Account(AccountId),
+1 -1
View File
@@ -594,7 +594,7 @@ pub(crate) fn current_era() -> EraIndex {
pub(crate) fn bond(who: AccountId, val: Balance) {
let _ = Balances::make_free_balance_be(&who, val);
assert_ok!(Staking::bond(RuntimeOrigin::signed(who), val, RewardDestination::Controller));
assert_ok!(Staking::bond(RuntimeOrigin::signed(who), val, RewardDestination::Stash));
}
pub(crate) fn bond_validator(who: AccountId, val: Balance) {
+10 -3
View File
@@ -338,9 +338,8 @@ impl<T: Config> Pallet<T> {
let dest = Self::payee(StakingAccount::Stash(stash.clone()));
let maybe_imbalance = match dest {
RewardDestination::Controller => Self::bonded(stash)
.map(|controller| T::Currency::deposit_creating(&controller, amount)),
RewardDestination::Stash => T::Currency::deposit_into_existing(stash, amount).ok(),
RewardDestination::Stash =>
T::Currency::deposit_into_existing(stash, amount).ok(),
RewardDestination::Staked => Self::ledger(Stash(stash.clone()))
.and_then(|mut ledger| {
ledger.active += amount;
@@ -357,6 +356,14 @@ impl<T: Config> Pallet<T> {
RewardDestination::Account(dest_account) =>
Some(T::Currency::deposit_creating(&dest_account, amount)),
RewardDestination::None => None,
#[allow(deprecated)]
RewardDestination::Controller => Self::bonded(stash)
.map(|controller| {
defensive!("Paying out controller as reward destination which is deprecated and should be migrated");
// This should never happen once payees with a `Controller` variant have been migrated.
// But if it does, just pay the controller account.
T::Currency::deposit_creating(&controller, amount)
}),
};
maybe_imbalance
.map(|imbalance| (imbalance, Self::payee(StakingAccount::Stash(stash.clone()))))
+43 -2
View File
@@ -842,6 +842,8 @@ pub mod pallet {
CommissionTooLow,
/// Some bound is not met.
BoundNotMet,
/// Used when attempting to use deprecated controller account logic.
ControllerDeprecated,
}
#[pallet::hooks]
@@ -1283,10 +1285,19 @@ pub mod pallet {
payee: RewardDestination<T::AccountId>,
) -> DispatchResult {
let controller = ensure_signed(origin)?;
let ledger = Self::ledger(Controller(controller))?;
let ledger = Self::ledger(Controller(controller.clone()))?;
ensure!(
(payee != {
#[allow(deprecated)]
RewardDestination::Controller
}),
Error::<T>::ControllerDeprecated
);
let _ = ledger
.set_payee(payee)
.defensive_proof("ledger was retrieved from storage, thus its bonded; qed.");
.defensive_proof("ledger was retrieved from storage, thus its bonded; qed.")?;
Ok(())
}
@@ -1872,6 +1883,36 @@ pub mod pallet {
ensure_signed(origin)?;
Self::do_payout_stakers_by_page(validator_stash, era, page)
}
/// Migrates an account's `RewardDestination::Controller` to
/// `RewardDestination::Account(controller)`.
///
/// Effects will be felt instantly (as soon as this function is completed successfully).
///
/// This will waive the transaction fee if the `payee` is successfully migrated.
#[pallet::call_index(27)]
#[pallet::weight(T::WeightInfo::update_payee())]
pub fn update_payee(
origin: OriginFor<T>,
controller: T::AccountId,
) -> DispatchResultWithPostInfo {
let _ = ensure_signed(origin)?;
let ledger = Self::ledger(StakingAccount::Controller(controller.clone()))?;
ensure!(
(Payee::<T>::get(&ledger.stash) == {
#[allow(deprecated)]
RewardDestination::Controller
}),
Error::<T>::NotController
);
let _ = ledger
.set_payee(RewardDestination::Account(controller))
.defensive_proof("ledger should have been previously retrieved from storage.")?;
Ok(Pays::No.into())
}
}
}
+87 -116
View File
@@ -298,9 +298,9 @@ fn rewards_should_work() {
let init_balance_101 = Balances::total_balance(&101);
// Set payees
Payee::<Test>::insert(11, RewardDestination::Controller);
Payee::<Test>::insert(21, RewardDestination::Controller);
Payee::<Test>::insert(101, RewardDestination::Controller);
Payee::<Test>::insert(11, RewardDestination::Account(11));
Payee::<Test>::insert(21, RewardDestination::Account(21));
Payee::<Test>::insert(101, RewardDestination::Account(101));
Pallet::<Test>::reward_by_ids(vec![(11, 50)]);
Pallet::<Test>::reward_by_ids(vec![(11, 50)]);
@@ -417,7 +417,7 @@ fn staking_should_work() {
// --- Block 2:
start_session(2);
// add a new candidate for being a validator. account 3 controlled by 4.
assert_ok!(Staking::bond(RuntimeOrigin::signed(3), 1500, RewardDestination::Controller));
assert_ok!(Staking::bond(RuntimeOrigin::signed(3), 1500, RewardDestination::Account(3)));
assert_ok!(Staking::validate(RuntimeOrigin::signed(3), ValidatorPrefs::default()));
assert_ok!(Session::set_keys(
RuntimeOrigin::signed(3),
@@ -585,22 +585,10 @@ fn nominating_and_rewards_should_work() {
assert_ok!(Staking::validate(RuntimeOrigin::signed(31), Default::default()));
// Set payee to controller.
assert_ok!(Staking::set_payee(
RuntimeOrigin::signed(11),
RewardDestination::Controller
));
assert_ok!(Staking::set_payee(
RuntimeOrigin::signed(21),
RewardDestination::Controller
));
assert_ok!(Staking::set_payee(
RuntimeOrigin::signed(31),
RewardDestination::Controller
));
assert_ok!(Staking::set_payee(
RuntimeOrigin::signed(41),
RewardDestination::Controller
));
assert_ok!(Staking::set_payee(RuntimeOrigin::signed(11), RewardDestination::Stash));
assert_ok!(Staking::set_payee(RuntimeOrigin::signed(21), RewardDestination::Stash));
assert_ok!(Staking::set_payee(RuntimeOrigin::signed(31), RewardDestination::Stash));
assert_ok!(Staking::set_payee(RuntimeOrigin::signed(41), RewardDestination::Stash));
// give the man some money
let initial_balance = 1000;
@@ -612,14 +600,14 @@ fn nominating_and_rewards_should_work() {
assert_ok!(Staking::bond(
RuntimeOrigin::signed(1),
1000,
RewardDestination::Controller
RewardDestination::Account(1)
));
assert_ok!(Staking::nominate(RuntimeOrigin::signed(1), vec![11, 21, 31]));
assert_ok!(Staking::bond(
RuntimeOrigin::signed(3),
1000,
RewardDestination::Controller
RewardDestination::Account(3)
));
assert_ok!(Staking::nominate(RuntimeOrigin::signed(3), vec![11, 21, 41]));
@@ -1116,8 +1104,8 @@ fn reward_destination_works() {
// (era 1, page 0) is claimed
assert_eq!(Staking::claimed_rewards(1, &11), vec![0]);
// Change RewardDestination to Controller
<Payee<Test>>::insert(&11, RewardDestination::Controller);
// Change RewardDestination to Account
<Payee<Test>>::insert(&11, RewardDestination::Account(11));
// Check controller balance
assert_eq!(Balances::free_balance(11), 23150);
@@ -1129,8 +1117,8 @@ fn reward_destination_works() {
mock::start_active_era(3);
mock::make_all_reward_payment(2);
// Check that RewardDestination is Controller
assert_eq!(Staking::payee(11.into()), RewardDestination::Controller);
// Check that RewardDestination is Account(11)
assert_eq!(Staking::payee(11.into()), RewardDestination::Account(11));
// Check that reward went to the controller account
assert_eq!(Balances::free_balance(11), recorded_stash_balance + total_payout_2);
// Check that amount at stake is NOT increased
@@ -1159,9 +1147,9 @@ fn validator_payment_prefs_work() {
let commission = Perbill::from_percent(40);
<Validators<Test>>::insert(&11, ValidatorPrefs { commission, ..Default::default() });
// Reward controller so staked ratio doesn't change.
<Payee<Test>>::insert(&11, RewardDestination::Controller);
<Payee<Test>>::insert(&101, RewardDestination::Controller);
// Reward stash so staked ratio doesn't change.
<Payee<Test>>::insert(&11, RewardDestination::Stash);
<Payee<Test>>::insert(&101, RewardDestination::Stash);
mock::start_active_era(1);
mock::make_all_reward_payment(0);
@@ -1250,8 +1238,8 @@ fn bond_extra_and_withdraw_unbonded_works() {
// * it can unbond a portion of its funds from the stash account.
// * Once the unbonding period is done, it can actually take the funds out of the stash.
ExtBuilder::default().nominate(false).build_and_execute(|| {
// Set payee to controller. avoids confusion
assert_ok!(Staking::set_payee(RuntimeOrigin::signed(11), RewardDestination::Controller));
// Set payee to stash.
assert_ok!(Staking::set_payee(RuntimeOrigin::signed(11), RewardDestination::Stash));
// Give account 11 some large free balance greater than total
let _ = Balances::make_free_balance_be(&11, 1000000);
@@ -1461,8 +1449,8 @@ fn rebond_works() {
// * it can unbond a portion of its funds from the stash account.
// * it can re-bond a portion of the funds scheduled to unlock.
ExtBuilder::default().nominate(false).build_and_execute(|| {
// Set payee to controller. avoids confusion
assert_ok!(Staking::set_payee(RuntimeOrigin::signed(11), RewardDestination::Controller));
// Set payee to stash.
assert_ok!(Staking::set_payee(RuntimeOrigin::signed(11), RewardDestination::Stash));
// Give account 11 some large free balance greater than total
let _ = Balances::make_free_balance_be(&11, 1000000);
@@ -1587,8 +1575,8 @@ fn rebond_works() {
fn rebond_is_fifo() {
// Rebond should proceed by reversing the most recent bond operations.
ExtBuilder::default().nominate(false).build_and_execute(|| {
// Set payee to controller. avoids confusion
assert_ok!(Staking::set_payee(RuntimeOrigin::signed(11), RewardDestination::Controller));
// Set payee to stash.
assert_ok!(Staking::set_payee(RuntimeOrigin::signed(11), RewardDestination::Stash));
// Give account 11 some large free balance greater than total
let _ = Balances::make_free_balance_be(&11, 1000000);
@@ -1683,8 +1671,8 @@ fn rebond_emits_right_value_in_event() {
// When a user calls rebond with more than can be rebonded, things succeed,
// and the rebond event emits the actual value rebonded.
ExtBuilder::default().nominate(false).build_and_execute(|| {
// Set payee to controller. avoids confusion
assert_ok!(Staking::set_payee(RuntimeOrigin::signed(11), RewardDestination::Controller));
// Set payee to stash.
assert_ok!(Staking::set_payee(RuntimeOrigin::signed(11), RewardDestination::Stash));
// Give account 11 some large free balance greater than total
let _ = Balances::make_free_balance_be(&11, 1000000);
@@ -1836,10 +1824,7 @@ fn switching_roles() {
ExtBuilder::default().nominate(false).build_and_execute(|| {
// Reset reward destination
for i in &[11, 21] {
assert_ok!(Staking::set_payee(
RuntimeOrigin::signed(*i),
RewardDestination::Controller
));
assert_ok!(Staking::set_payee(RuntimeOrigin::signed(*i), RewardDestination::Stash));
}
assert_eq_uvec!(validator_controllers(), vec![21, 11]);
@@ -1850,14 +1835,14 @@ fn switching_roles() {
}
// add 2 nominators
assert_ok!(Staking::bond(RuntimeOrigin::signed(1), 2000, RewardDestination::Controller));
assert_ok!(Staking::bond(RuntimeOrigin::signed(1), 2000, RewardDestination::Account(1)));
assert_ok!(Staking::nominate(RuntimeOrigin::signed(1), vec![11, 5]));
assert_ok!(Staking::bond(RuntimeOrigin::signed(3), 500, RewardDestination::Controller));
assert_ok!(Staking::bond(RuntimeOrigin::signed(3), 500, RewardDestination::Account(3)));
assert_ok!(Staking::nominate(RuntimeOrigin::signed(3), vec![21, 1]));
// add a new validator candidate
assert_ok!(Staking::bond(RuntimeOrigin::signed(5), 1000, RewardDestination::Controller));
assert_ok!(Staking::bond(RuntimeOrigin::signed(5), 1000, RewardDestination::Account(5)));
assert_ok!(Staking::validate(RuntimeOrigin::signed(5), ValidatorPrefs::default()));
assert_ok!(Session::set_keys(
RuntimeOrigin::signed(5),
@@ -1928,11 +1913,11 @@ fn bond_with_no_staked_value() {
.build_and_execute(|| {
// Can't bond with 1
assert_noop!(
Staking::bond(RuntimeOrigin::signed(1), 1, RewardDestination::Controller),
Staking::bond(RuntimeOrigin::signed(1), 1, RewardDestination::Account(1)),
Error::<Test>::InsufficientBond,
);
// bonded with absolute minimum value possible.
assert_ok!(Staking::bond(RuntimeOrigin::signed(1), 5, RewardDestination::Controller));
assert_ok!(Staking::bond(RuntimeOrigin::signed(1), 5, RewardDestination::Account(1)));
assert_eq!(Balances::locks(&1)[0].amount, 5);
// unbonding even 1 will cause all to be unbonded.
@@ -1974,15 +1959,12 @@ fn bond_with_little_staked_value_bounded() {
.build_and_execute(|| {
// setup
assert_ok!(Staking::chill(RuntimeOrigin::signed(31)));
assert_ok!(Staking::set_payee(
RuntimeOrigin::signed(11),
RewardDestination::Controller
));
assert_ok!(Staking::set_payee(RuntimeOrigin::signed(11), RewardDestination::Stash));
let init_balance_1 = Balances::free_balance(&1);
let init_balance_11 = Balances::free_balance(&11);
// Stingy validator.
assert_ok!(Staking::bond(RuntimeOrigin::signed(1), 1, RewardDestination::Controller));
assert_ok!(Staking::bond(RuntimeOrigin::signed(1), 1, RewardDestination::Account(1)));
assert_ok!(Staking::validate(RuntimeOrigin::signed(1), ValidatorPrefs::default()));
assert_ok!(Session::set_keys(
RuntimeOrigin::signed(1),
@@ -2061,14 +2043,14 @@ fn bond_with_duplicate_vote_should_be_ignored_by_election_provider() {
assert_ok!(Staking::bond(
RuntimeOrigin::signed(1),
1000,
RewardDestination::Controller
RewardDestination::Account(1)
));
assert_ok!(Staking::nominate(RuntimeOrigin::signed(1), vec![11, 11, 11, 21, 31]));
assert_ok!(Staking::bond(
RuntimeOrigin::signed(3),
1000,
RewardDestination::Controller
RewardDestination::Account(3)
));
assert_ok!(Staking::nominate(RuntimeOrigin::signed(3), vec![21, 31]));
@@ -2114,14 +2096,14 @@ fn bond_with_duplicate_vote_should_be_ignored_by_election_provider_elected() {
assert_ok!(Staking::bond(
RuntimeOrigin::signed(1),
1000,
RewardDestination::Controller
RewardDestination::Account(1)
));
assert_ok!(Staking::nominate(RuntimeOrigin::signed(1), vec![11, 11, 11, 21]));
assert_ok!(Staking::bond(
RuntimeOrigin::signed(3),
1000,
RewardDestination::Controller
RewardDestination::Account(3)
));
assert_ok!(Staking::nominate(RuntimeOrigin::signed(3), vec![21]));
@@ -3530,8 +3512,8 @@ fn claim_reward_at_the_last_era_and_no_double_claim_and_invalid_claim() {
let part_for_101 = Perbill::from_rational::<u32>(125, 1125);
// Check state
Payee::<Test>::insert(11, RewardDestination::Controller);
Payee::<Test>::insert(101, RewardDestination::Controller);
Payee::<Test>::insert(11, RewardDestination::Account(11));
Payee::<Test>::insert(101, RewardDestination::Account(101));
Pallet::<Test>::reward_by_ids(vec![(11, 1)]);
// Compute total payout now for whole duration as other parameter won't change
@@ -3820,8 +3802,8 @@ fn test_multi_page_payout_stakers_by_page() {
staking_events_since_last_call().as_slice(),
&[
..,
Event::Rewarded { stash: 1063, dest: RewardDestination::Controller, amount: 111 },
Event::Rewarded { stash: 1064, dest: RewardDestination::Controller, amount: 111 },
Event::Rewarded { stash: 1063, dest: RewardDestination::Stash, amount: 111 },
Event::Rewarded { stash: 1064, dest: RewardDestination::Stash, amount: 111 },
]
));
@@ -3843,8 +3825,8 @@ fn test_multi_page_payout_stakers_by_page() {
events.as_slice(),
&[
Event::PayoutStarted { era_index: 1, validator_stash: 11 },
Event::Rewarded { stash: 1065, dest: RewardDestination::Controller, amount: 111 },
Event::Rewarded { stash: 1066, dest: RewardDestination::Controller, amount: 111 },
Event::Rewarded { stash: 1065, dest: RewardDestination::Stash, amount: 111 },
Event::Rewarded { stash: 1066, dest: RewardDestination::Stash, amount: 111 },
..
]
));
@@ -4685,40 +4667,6 @@ fn offences_weight_calculated_correctly() {
});
}
#[test]
fn payout_creates_controller() {
ExtBuilder::default().has_stakers(false).build_and_execute(|| {
let balance = 1000;
// Create a validator:
bond_validator(11, balance);
// create a stash/controller pair and nominate
let (stash, controller) = testing_utils::create_unique_stash_controller::<Test>(
0,
100,
RewardDestination::Controller,
false,
)
.unwrap();
assert_ok!(Staking::nominate(RuntimeOrigin::signed(controller), vec![11]));
// kill controller
assert_ok!(Balances::transfer_allow_death(RuntimeOrigin::signed(controller), stash, 100));
assert_eq!(Balances::free_balance(controller), 0);
mock::start_active_era(1);
Staking::reward_by_ids(vec![(11, 1)]);
// compute and ensure the reward amount is greater than zero.
let _ = current_total_payout_for_duration(reward_time_per_era());
mock::start_active_era(2);
assert_ok!(Staking::payout_stakers_by_page(RuntimeOrigin::signed(1337), 11, 1, 0));
// Controller is created
assert!(Balances::free_balance(controller) > 0);
})
}
#[test]
fn payout_to_any_account_works() {
ExtBuilder::default().has_stakers(false).build_and_execute(|| {
@@ -5462,7 +5410,7 @@ fn min_bond_checks_work() {
.min_validator_bond(1_500)
.build_and_execute(|| {
// 500 is not enough for any role
assert_ok!(Staking::bond(RuntimeOrigin::signed(3), 500, RewardDestination::Controller));
assert_ok!(Staking::bond(RuntimeOrigin::signed(3), 500, RewardDestination::Stash));
assert_noop!(
Staking::nominate(RuntimeOrigin::signed(3), vec![1]),
Error::<Test>::InsufficientBond
@@ -5524,19 +5472,11 @@ fn chill_other_works() {
Balances::make_free_balance_be(&c, 100_000);
// Nominator
assert_ok!(Staking::bond(
RuntimeOrigin::signed(a),
1000,
RewardDestination::Controller
));
assert_ok!(Staking::bond(RuntimeOrigin::signed(a), 1000, RewardDestination::Stash));
assert_ok!(Staking::nominate(RuntimeOrigin::signed(a), vec![1]));
// Validator
assert_ok!(Staking::bond(
RuntimeOrigin::signed(b),
1500,
RewardDestination::Controller
));
assert_ok!(Staking::bond(RuntimeOrigin::signed(b), 1500, RewardDestination::Stash));
assert_ok!(Staking::validate(RuntimeOrigin::signed(b), ValidatorPrefs::default()));
}
@@ -5683,7 +5623,7 @@ fn capped_stakers_works() {
let (_, controller) = testing_utils::create_stash_controller::<Test>(
i + 10_000_000,
100,
RewardDestination::Controller,
RewardDestination::Stash,
)
.unwrap();
assert_ok!(Staking::validate(
@@ -5694,12 +5634,9 @@ fn capped_stakers_works() {
}
// but no more
let (_, last_validator) = testing_utils::create_stash_controller::<Test>(
1337,
100,
RewardDestination::Controller,
)
.unwrap();
let (_, last_validator) =
testing_utils::create_stash_controller::<Test>(1337, 100, RewardDestination::Stash)
.unwrap();
assert_noop!(
Staking::validate(RuntimeOrigin::signed(last_validator), ValidatorPrefs::default()),
@@ -5712,7 +5649,7 @@ fn capped_stakers_works() {
let (_, controller) = testing_utils::create_stash_controller::<Test>(
i + 20_000_000,
100,
RewardDestination::Controller,
RewardDestination::Stash,
)
.unwrap();
assert_ok!(Staking::nominate(RuntimeOrigin::signed(controller), vec![1]));
@@ -5723,7 +5660,7 @@ fn capped_stakers_works() {
let (_, last_nominator) = testing_utils::create_stash_controller::<Test>(
30_000_000,
100,
RewardDestination::Controller,
RewardDestination::Stash,
)
.unwrap();
assert_noop!(
@@ -6787,7 +6724,7 @@ mod ledger {
assert_ok!(Staking::bond(
RuntimeOrigin::signed(10),
100,
RewardDestination::Controller
RewardDestination::Account(10)
));
assert_eq!(<Bonded<Test>>::get(&10), Some(10));
@@ -6896,4 +6833,38 @@ mod ledger {
<Bonded<Test>>::remove(42); // ensures try-state checks pass.
})
}
#[test]
#[allow(deprecated)]
fn set_payee_errors_on_controller_destination() {
ExtBuilder::default().build_and_execute(|| {
Payee::<Test>::insert(11, RewardDestination::Staked);
assert_noop!(
Staking::set_payee(RuntimeOrigin::signed(11), RewardDestination::Controller),
Error::<Test>::ControllerDeprecated
);
assert_eq!(Payee::<Test>::get(&11), RewardDestination::Staked);
})
}
#[test]
#[allow(deprecated)]
fn update_payee_migration_works() {
ExtBuilder::default().build_and_execute(|| {
// migrate a `Controller` variant to `Account` variant.
Payee::<Test>::insert(11, RewardDestination::Controller);
assert_eq!(Payee::<Test>::get(&11), RewardDestination::Controller);
assert_ok!(Staking::update_payee(RuntimeOrigin::signed(11), 11));
assert_eq!(Payee::<Test>::get(&11), RewardDestination::Account(11));
// Do not migrate a variant if not `Controller`.
Payee::<Test>::insert(21, RewardDestination::Stash);
assert_eq!(Payee::<Test>::get(&21), RewardDestination::Stash);
assert_noop!(
Staking::update_payee(RuntimeOrigin::signed(11), 21),
Error::<Test>::NotController
);
assert_eq!(Payee::<Test>::get(&21), RewardDestination::Stash);
})
}
}
+208 -260
View File
@@ -18,7 +18,7 @@
//! Autogenerated weights for `pallet_staking`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2023-10-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2023-11-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `runner-yprdrvc7-project-674-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: `1024`
@@ -59,6 +59,7 @@ pub trait WeightInfo {
fn nominate(n: u32, ) -> Weight;
fn chill() -> Weight;
fn set_payee() -> Weight;
fn update_payee() -> Weight;
fn set_controller() -> Weight;
fn set_validator_count() -> Weight;
fn force_no_eras() -> Weight;
@@ -67,7 +68,6 @@ pub trait WeightInfo {
fn set_invulnerables(v: u32, ) -> Weight;
fn force_unstake(s: u32, ) -> Weight;
fn cancel_deferred_slash(s: u32, ) -> Weight;
fn payout_stakers_dead_controller(n: u32, ) -> Weight;
fn payout_stakers_alive_staked(n: u32, ) -> Weight;
fn rebond(l: u32, ) -> Weight;
fn reap_stash(s: u32, ) -> Weight;
@@ -98,8 +98,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `927`
// Estimated: `4764`
// Minimum execution time: 42_811_000 picoseconds.
Weight::from_parts(44_465_000, 4764)
// Minimum execution time: 43_427_000 picoseconds.
Weight::from_parts(45_221_000, 4764)
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(4_u64))
}
@@ -119,8 +119,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `1990`
// Estimated: `8877`
// Minimum execution time: 87_628_000 picoseconds.
Weight::from_parts(90_020_000, 8877)
// Minimum execution time: 87_100_000 picoseconds.
Weight::from_parts(90_599_000, 8877)
.saturating_add(T::DbWeight::get().reads(9_u64))
.saturating_add(T::DbWeight::get().writes(7_u64))
}
@@ -146,8 +146,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `2195`
// Estimated: `8877`
// Minimum execution time: 91_655_000 picoseconds.
Weight::from_parts(94_146_000, 8877)
// Minimum execution time: 91_488_000 picoseconds.
Weight::from_parts(94_126_000, 8877)
.saturating_add(T::DbWeight::get().reads(12_u64))
.saturating_add(T::DbWeight::get().writes(7_u64))
}
@@ -166,10 +166,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `1115`
// Estimated: `4764`
// Minimum execution time: 42_953_000 picoseconds.
Weight::from_parts(44_648_505, 4764)
// Standard Error: 937
.saturating_add(Weight::from_parts(51_090, 0).saturating_mul(s.into()))
// Minimum execution time: 42_713_000 picoseconds.
Weight::from_parts(44_530_499, 4764)
// Standard Error: 1_067
.saturating_add(Weight::from_parts(51_411, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(5_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
@@ -206,10 +206,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `2196 + s * (4 ±0)`
// Estimated: `6248 + s * (4 ±0)`
// Minimum execution time: 89_218_000 picoseconds.
Weight::from_parts(97_761_884, 6248)
// Standard Error: 3_888
.saturating_add(Weight::from_parts(1_346_441, 0).saturating_mul(s.into()))
// Minimum execution time: 88_700_000 picoseconds.
Weight::from_parts(98_329_624, 6248)
// Standard Error: 4_477
.saturating_add(Weight::from_parts(1_347_380, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(13_u64))
.saturating_add(T::DbWeight::get().writes(11_u64))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into())))
@@ -241,8 +241,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `1372`
// Estimated: `4556`
// Minimum execution time: 51_200_000 picoseconds.
Weight::from_parts(53_403_000, 4556)
// Minimum execution time: 51_877_000 picoseconds.
Weight::from_parts(53_503_000, 4556)
.saturating_add(T::DbWeight::get().reads(11_u64))
.saturating_add(T::DbWeight::get().writes(5_u64))
}
@@ -255,10 +255,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `1280 + k * (569 ±0)`
// Estimated: `4556 + k * (3033 ±0)`
// Minimum execution time: 28_963_000 picoseconds.
Weight::from_parts(29_884_371, 4556)
// Standard Error: 9_063
.saturating_add(Weight::from_parts(6_532_967, 0).saturating_mul(k.into()))
// Minimum execution time: 29_604_000 picoseconds.
Weight::from_parts(31_726_296, 4556)
// Standard Error: 6_350
.saturating_add(Weight::from_parts(6_416_846, 0).saturating_mul(k.into()))
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(k.into())))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(k.into())))
@@ -291,10 +291,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `1866 + n * (102 ±0)`
// Estimated: `6248 + n * (2520 ±0)`
// Minimum execution time: 64_644_000 picoseconds.
Weight::from_parts(62_855_016, 6248)
// Standard Error: 17_528
.saturating_add(Weight::from_parts(3_993_850, 0).saturating_mul(n.into()))
// Minimum execution time: 64_276_000 picoseconds.
Weight::from_parts(62_615_844, 6248)
// Standard Error: 14_914
.saturating_add(Weight::from_parts(4_097_019, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(12_u64))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into())))
.saturating_add(T::DbWeight::get().writes(6_u64))
@@ -318,8 +318,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `1650`
// Estimated: `6248`
// Minimum execution time: 54_505_000 picoseconds.
Weight::from_parts(56_026_000, 6248)
// Minimum execution time: 55_064_000 picoseconds.
Weight::from_parts(56_566_000, 6248)
.saturating_add(T::DbWeight::get().reads(8_u64))
.saturating_add(T::DbWeight::get().writes(6_u64))
}
@@ -333,11 +333,26 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `902`
// Estimated: `4556`
// Minimum execution time: 16_639_000 picoseconds.
Weight::from_parts(17_342_000, 4556)
// Minimum execution time: 16_626_000 picoseconds.
Weight::from_parts(17_519_000, 4556)
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `Staking::Ledger` (r:1 w:0)
/// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`)
/// Storage: `Staking::Payee` (r:1 w:1)
/// Proof: `Staking::Payee` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
/// Storage: `Staking::Bonded` (r:1 w:0)
/// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
fn update_payee() -> Weight {
// Proof Size summary in bytes:
// Measured: `969`
// Estimated: `4556`
// Minimum execution time: 20_545_000 picoseconds.
Weight::from_parts(21_395_000, 4556)
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `Staking::Bonded` (r:1 w:1)
/// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Staking::Ledger` (r:1 w:2)
@@ -346,8 +361,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `902`
// Estimated: `4556`
// Minimum execution time: 20_334_000 picoseconds.
Weight::from_parts(21_067_000, 4556)
// Minimum execution time: 20_179_000 picoseconds.
Weight::from_parts(20_728_000, 4556)
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(3_u64))
}
@@ -357,8 +372,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 2_680_000 picoseconds.
Weight::from_parts(2_774_000, 0)
// Minimum execution time: 2_594_000 picoseconds.
Weight::from_parts(2_777_000, 0)
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `Staking::ForceEra` (r:0 w:1)
@@ -367,8 +382,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 8_613_000 picoseconds.
Weight::from_parts(8_922_000, 0)
// Minimum execution time: 8_302_000 picoseconds.
Weight::from_parts(8_741_000, 0)
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `Staking::ForceEra` (r:0 w:1)
@@ -377,8 +392,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 8_657_000 picoseconds.
Weight::from_parts(9_020_000, 0)
// Minimum execution time: 8_504_000 picoseconds.
Weight::from_parts(8_774_000, 0)
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `Staking::ForceEra` (r:0 w:1)
@@ -387,8 +402,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 8_600_000 picoseconds.
Weight::from_parts(9_157_000, 0)
// Minimum execution time: 8_474_000 picoseconds.
Weight::from_parts(8_740_000, 0)
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `Staking::Invulnerables` (r:0 w:1)
@@ -398,10 +413,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 2_792_000 picoseconds.
Weight::from_parts(3_293_694, 0)
// Standard Error: 31
.saturating_add(Weight::from_parts(10_668, 0).saturating_mul(v.into()))
// Minimum execution time: 2_732_000 picoseconds.
Weight::from_parts(3_360_048, 0)
// Standard Error: 34
.saturating_add(Weight::from_parts(9_964, 0).saturating_mul(v.into()))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `Staking::SlashingSpans` (r:1 w:1)
@@ -437,10 +452,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `2196 + s * (4 ±0)`
// Estimated: `6248 + s * (4 ±0)`
// Minimum execution time: 86_537_000 picoseconds.
Weight::from_parts(95_127_637, 6248)
// Standard Error: 3_902
.saturating_add(Weight::from_parts(1_336_182, 0).saturating_mul(s.into()))
// Minimum execution time: 87_495_000 picoseconds.
Weight::from_parts(95_710_388, 6248)
// Standard Error: 5_849
.saturating_add(Weight::from_parts(1_339_335, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(13_u64))
.saturating_add(T::DbWeight::get().writes(12_u64))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into())))
@@ -453,54 +468,13 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `66672`
// Estimated: `70137`
// Minimum execution time: 100_777_000 picoseconds.
Weight::from_parts(896_540_406, 70137)
// Standard Error: 57_788
.saturating_add(Weight::from_parts(4_870_910, 0).saturating_mul(s.into()))
// Minimum execution time: 98_255_000 picoseconds.
Weight::from_parts(892_807_378, 70137)
// Standard Error: 57_735
.saturating_add(Weight::from_parts(4_876_449, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `Staking::CurrentEra` (r:1 w:0)
/// Proof: `Staking::CurrentEra` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Staking::ErasStakersOverview` (r:1 w:0)
/// Proof: `Staking::ErasStakersOverview` (`max_values`: None, `max_size`: Some(92), added: 2567, mode: `MaxEncodedLen`)
/// Storage: `Staking::ErasValidatorReward` (r:1 w:0)
/// Proof: `Staking::ErasValidatorReward` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`)
/// Storage: `Staking::Bonded` (r:257 w:0)
/// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Staking::Ledger` (r:1 w:1)
/// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`)
/// Storage: `Balances::Locks` (r:1 w:1)
/// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`)
/// Storage: `Balances::Freezes` (r:1 w:0)
/// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:258 w:258)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// Storage: `Staking::ClaimedRewards` (r:1 w:1)
/// Proof: `Staking::ClaimedRewards` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `Staking::ErasStakersPaged` (r:1 w:0)
/// Proof: `Staking::ErasStakersPaged` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `Staking::ErasRewardPoints` (r:1 w:0)
/// Proof: `Staking::ErasRewardPoints` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `Staking::ErasValidatorPrefs` (r:1 w:0)
/// Proof: `Staking::ErasValidatorPrefs` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// Storage: `Staking::Payee` (r:257 w:0)
/// Proof: `Staking::Payee` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
/// The range of component `n` is `[0, 256]`.
fn payout_stakers_dead_controller(n: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `21644 + n * (155 ±0)`
// Estimated: `21412 + n * (2603 ±0)`
// Minimum execution time: 133_129_000 picoseconds.
Weight::from_parts(190_983_630, 21412)
// Standard Error: 17_497
.saturating_add(Weight::from_parts(24_723_153, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(14_u64))
.saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(n.into())))
.saturating_add(T::DbWeight::get().writes(5_u64))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into())))
.saturating_add(Weight::from_parts(0, 2603).saturating_mul(n.into()))
}
/// Storage: `Staking::Bonded` (r:257 w:0)
/// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Staking::Ledger` (r:257 w:257)
@@ -534,10 +508,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `33297 + n * (377 ±0)`
// Estimated: `30944 + n * (3774 ±3)`
// Minimum execution time: 149_773_000 picoseconds.
Weight::from_parts(151_527_124, 30944)
// Standard Error: 24_152
.saturating_add(Weight::from_parts(46_124_074, 0).saturating_mul(n.into()))
// Minimum execution time: 144_258_000 picoseconds.
Weight::from_parts(175_256_796, 30944)
// Standard Error: 24_339
.saturating_add(Weight::from_parts(46_011_700, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(14_u64))
.saturating_add(T::DbWeight::get().reads((6_u64).saturating_mul(n.into())))
.saturating_add(T::DbWeight::get().writes(4_u64))
@@ -561,10 +535,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `1991 + l * (7 ±0)`
// Estimated: `8877`
// Minimum execution time: 81_618_000 picoseconds.
Weight::from_parts(85_245_630, 8877)
// Standard Error: 5_049
.saturating_add(Weight::from_parts(39_811, 0).saturating_mul(l.into()))
// Minimum execution time: 83_532_000 picoseconds.
Weight::from_parts(86_757_943, 8877)
// Standard Error: 6_379
.saturating_add(Weight::from_parts(57_566, 0).saturating_mul(l.into()))
.saturating_add(T::DbWeight::get().reads(9_u64))
.saturating_add(T::DbWeight::get().writes(7_u64))
}
@@ -599,10 +573,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `2196 + s * (4 ±0)`
// Estimated: `6248 + s * (4 ±0)`
// Minimum execution time: 95_395_000 picoseconds.
Weight::from_parts(100_459_234, 6248)
// Standard Error: 3_781
.saturating_add(Weight::from_parts(1_333_607, 0).saturating_mul(s.into()))
// Minimum execution time: 96_776_000 picoseconds.
Weight::from_parts(100_950_027, 6248)
// Standard Error: 4_719
.saturating_add(Weight::from_parts(1_432_091, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(12_u64))
.saturating_add(T::DbWeight::get().writes(11_u64))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into())))
@@ -648,12 +622,12 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `0 + n * (720 ±0) + v * (3598 ±0)`
// Estimated: `512390 + n * (3566 ±0) + v * (3566 ±0)`
// Minimum execution time: 571_337_000 picoseconds.
Weight::from_parts(578_857_000, 512390)
// Standard Error: 2_090_511
.saturating_add(Weight::from_parts(68_626_083, 0).saturating_mul(v.into()))
// Standard Error: 208_307
.saturating_add(Weight::from_parts(18_645_374, 0).saturating_mul(n.into()))
// Minimum execution time: 577_699_000 picoseconds.
Weight::from_parts(582_827_000, 512390)
// Standard Error: 2_000_851
.saturating_add(Weight::from_parts(67_316_744, 0).saturating_mul(v.into()))
// Standard Error: 199_373
.saturating_add(Weight::from_parts(18_503_387, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(206_u64))
.saturating_add(T::DbWeight::get().reads((5_u64).saturating_mul(v.into())))
.saturating_add(T::DbWeight::get().reads((4_u64).saturating_mul(n.into())))
@@ -684,12 +658,12 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `3175 + n * (911 ±0) + v * (395 ±0)`
// Estimated: `512390 + n * (3566 ±0) + v * (3566 ±0)`
// Minimum execution time: 34_590_734_000 picoseconds.
Weight::from_parts(35_238_091_000, 512390)
// Standard Error: 427_974
.saturating_add(Weight::from_parts(5_084_196, 0).saturating_mul(v.into()))
// Standard Error: 427_974
.saturating_add(Weight::from_parts(4_503_420, 0).saturating_mul(n.into()))
// Minimum execution time: 34_048_778_000 picoseconds.
Weight::from_parts(34_397_777_000, 512390)
// Standard Error: 346_115
.saturating_add(Weight::from_parts(3_704_941, 0).saturating_mul(v.into()))
// Standard Error: 346_115
.saturating_add(Weight::from_parts(4_064_819, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(201_u64))
.saturating_add(T::DbWeight::get().reads((5_u64).saturating_mul(v.into())))
.saturating_add(T::DbWeight::get().reads((4_u64).saturating_mul(n.into())))
@@ -706,10 +680,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `979 + v * (50 ±0)`
// Estimated: `3510 + v * (2520 ±0)`
// Minimum execution time: 2_509_588_000 picoseconds.
Weight::from_parts(89_050_539, 3510)
// Standard Error: 11_803
.saturating_add(Weight::from_parts(5_031_416, 0).saturating_mul(v.into()))
// Minimum execution time: 2_473_149_000 picoseconds.
Weight::from_parts(84_721_859, 3510)
// Standard Error: 8_690
.saturating_add(Weight::from_parts(4_870_439, 0).saturating_mul(v.into()))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(v.into())))
.saturating_add(Weight::from_parts(0, 2520).saturating_mul(v.into()))
@@ -730,8 +704,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 5_347_000 picoseconds.
Weight::from_parts(5_562_000, 0)
// Minimum execution time: 5_312_000 picoseconds.
Weight::from_parts(5_897_000, 0)
.saturating_add(T::DbWeight::get().writes(6_u64))
}
/// Storage: `Staking::MinCommission` (r:0 w:1)
@@ -750,8 +724,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 4_725_000 picoseconds.
Weight::from_parts(5_075_000, 0)
// Minimum execution time: 4_676_000 picoseconds.
Weight::from_parts(4_913_000, 0)
.saturating_add(T::DbWeight::get().writes(6_u64))
}
/// Storage: `Staking::Ledger` (r:1 w:0)
@@ -778,8 +752,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `1773`
// Estimated: `6248`
// Minimum execution time: 67_204_000 picoseconds.
Weight::from_parts(69_197_000, 6248)
// Minimum execution time: 67_286_000 picoseconds.
Weight::from_parts(69_081_000, 6248)
.saturating_add(T::DbWeight::get().reads(11_u64))
.saturating_add(T::DbWeight::get().writes(6_u64))
}
@@ -791,8 +765,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `691`
// Estimated: `3510`
// Minimum execution time: 12_497_000 picoseconds.
Weight::from_parts(12_943_000, 3510)
// Minimum execution time: 12_749_000 picoseconds.
Weight::from_parts(13_275_000, 3510)
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -802,8 +776,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 3_245_000 picoseconds.
Weight::from_parts(3_352_000, 0)
// Minimum execution time: 3_155_000 picoseconds.
Weight::from_parts(3_319_000, 0)
.saturating_add(T::DbWeight::get().writes(1_u64))
}
}
@@ -824,8 +798,8 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `927`
// Estimated: `4764`
// Minimum execution time: 42_811_000 picoseconds.
Weight::from_parts(44_465_000, 4764)
// Minimum execution time: 43_427_000 picoseconds.
Weight::from_parts(45_221_000, 4764)
.saturating_add(RocksDbWeight::get().reads(3_u64))
.saturating_add(RocksDbWeight::get().writes(4_u64))
}
@@ -845,8 +819,8 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `1990`
// Estimated: `8877`
// Minimum execution time: 87_628_000 picoseconds.
Weight::from_parts(90_020_000, 8877)
// Minimum execution time: 87_100_000 picoseconds.
Weight::from_parts(90_599_000, 8877)
.saturating_add(RocksDbWeight::get().reads(9_u64))
.saturating_add(RocksDbWeight::get().writes(7_u64))
}
@@ -872,8 +846,8 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `2195`
// Estimated: `8877`
// Minimum execution time: 91_655_000 picoseconds.
Weight::from_parts(94_146_000, 8877)
// Minimum execution time: 91_488_000 picoseconds.
Weight::from_parts(94_126_000, 8877)
.saturating_add(RocksDbWeight::get().reads(12_u64))
.saturating_add(RocksDbWeight::get().writes(7_u64))
}
@@ -892,10 +866,10 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `1115`
// Estimated: `4764`
// Minimum execution time: 42_953_000 picoseconds.
Weight::from_parts(44_648_505, 4764)
// Standard Error: 937
.saturating_add(Weight::from_parts(51_090, 0).saturating_mul(s.into()))
// Minimum execution time: 42_713_000 picoseconds.
Weight::from_parts(44_530_499, 4764)
// Standard Error: 1_067
.saturating_add(Weight::from_parts(51_411, 0).saturating_mul(s.into()))
.saturating_add(RocksDbWeight::get().reads(5_u64))
.saturating_add(RocksDbWeight::get().writes(2_u64))
}
@@ -932,10 +906,10 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `2196 + s * (4 ±0)`
// Estimated: `6248 + s * (4 ±0)`
// Minimum execution time: 89_218_000 picoseconds.
Weight::from_parts(97_761_884, 6248)
// Standard Error: 3_888
.saturating_add(Weight::from_parts(1_346_441, 0).saturating_mul(s.into()))
// Minimum execution time: 88_700_000 picoseconds.
Weight::from_parts(98_329_624, 6248)
// Standard Error: 4_477
.saturating_add(Weight::from_parts(1_347_380, 0).saturating_mul(s.into()))
.saturating_add(RocksDbWeight::get().reads(13_u64))
.saturating_add(RocksDbWeight::get().writes(11_u64))
.saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(s.into())))
@@ -967,8 +941,8 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `1372`
// Estimated: `4556`
// Minimum execution time: 51_200_000 picoseconds.
Weight::from_parts(53_403_000, 4556)
// Minimum execution time: 51_877_000 picoseconds.
Weight::from_parts(53_503_000, 4556)
.saturating_add(RocksDbWeight::get().reads(11_u64))
.saturating_add(RocksDbWeight::get().writes(5_u64))
}
@@ -981,10 +955,10 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `1280 + k * (569 ±0)`
// Estimated: `4556 + k * (3033 ±0)`
// Minimum execution time: 28_963_000 picoseconds.
Weight::from_parts(29_884_371, 4556)
// Standard Error: 9_063
.saturating_add(Weight::from_parts(6_532_967, 0).saturating_mul(k.into()))
// Minimum execution time: 29_604_000 picoseconds.
Weight::from_parts(31_726_296, 4556)
// Standard Error: 6_350
.saturating_add(Weight::from_parts(6_416_846, 0).saturating_mul(k.into()))
.saturating_add(RocksDbWeight::get().reads(1_u64))
.saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(k.into())))
.saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(k.into())))
@@ -1017,10 +991,10 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `1866 + n * (102 ±0)`
// Estimated: `6248 + n * (2520 ±0)`
// Minimum execution time: 64_644_000 picoseconds.
Weight::from_parts(62_855_016, 6248)
// Standard Error: 17_528
.saturating_add(Weight::from_parts(3_993_850, 0).saturating_mul(n.into()))
// Minimum execution time: 64_276_000 picoseconds.
Weight::from_parts(62_615_844, 6248)
// Standard Error: 14_914
.saturating_add(Weight::from_parts(4_097_019, 0).saturating_mul(n.into()))
.saturating_add(RocksDbWeight::get().reads(12_u64))
.saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(n.into())))
.saturating_add(RocksDbWeight::get().writes(6_u64))
@@ -1044,8 +1018,8 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `1650`
// Estimated: `6248`
// Minimum execution time: 54_505_000 picoseconds.
Weight::from_parts(56_026_000, 6248)
// Minimum execution time: 55_064_000 picoseconds.
Weight::from_parts(56_566_000, 6248)
.saturating_add(RocksDbWeight::get().reads(8_u64))
.saturating_add(RocksDbWeight::get().writes(6_u64))
}
@@ -1059,11 +1033,26 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `902`
// Estimated: `4556`
// Minimum execution time: 16_639_000 picoseconds.
Weight::from_parts(17_342_000, 4556)
// Minimum execution time: 16_626_000 picoseconds.
Weight::from_parts(17_519_000, 4556)
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
/// Storage: `Staking::Ledger` (r:1 w:0)
/// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`)
/// Storage: `Staking::Payee` (r:1 w:1)
/// Proof: `Staking::Payee` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
/// Storage: `Staking::Bonded` (r:1 w:0)
/// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
fn update_payee() -> Weight {
// Proof Size summary in bytes:
// Measured: `969`
// Estimated: `4556`
// Minimum execution time: 20_545_000 picoseconds.
Weight::from_parts(21_395_000, 4556)
.saturating_add(RocksDbWeight::get().reads(3_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
/// Storage: `Staking::Bonded` (r:1 w:1)
/// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Staking::Ledger` (r:1 w:2)
@@ -1072,8 +1061,8 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `902`
// Estimated: `4556`
// Minimum execution time: 20_334_000 picoseconds.
Weight::from_parts(21_067_000, 4556)
// Minimum execution time: 20_179_000 picoseconds.
Weight::from_parts(20_728_000, 4556)
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(3_u64))
}
@@ -1083,8 +1072,8 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 2_680_000 picoseconds.
Weight::from_parts(2_774_000, 0)
// Minimum execution time: 2_594_000 picoseconds.
Weight::from_parts(2_777_000, 0)
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
/// Storage: `Staking::ForceEra` (r:0 w:1)
@@ -1093,8 +1082,8 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 8_613_000 picoseconds.
Weight::from_parts(8_922_000, 0)
// Minimum execution time: 8_302_000 picoseconds.
Weight::from_parts(8_741_000, 0)
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
/// Storage: `Staking::ForceEra` (r:0 w:1)
@@ -1103,8 +1092,8 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 8_657_000 picoseconds.
Weight::from_parts(9_020_000, 0)
// Minimum execution time: 8_504_000 picoseconds.
Weight::from_parts(8_774_000, 0)
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
/// Storage: `Staking::ForceEra` (r:0 w:1)
@@ -1113,8 +1102,8 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 8_600_000 picoseconds.
Weight::from_parts(9_157_000, 0)
// Minimum execution time: 8_474_000 picoseconds.
Weight::from_parts(8_740_000, 0)
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
/// Storage: `Staking::Invulnerables` (r:0 w:1)
@@ -1124,10 +1113,10 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 2_792_000 picoseconds.
Weight::from_parts(3_293_694, 0)
// Standard Error: 31
.saturating_add(Weight::from_parts(10_668, 0).saturating_mul(v.into()))
// Minimum execution time: 2_732_000 picoseconds.
Weight::from_parts(3_360_048, 0)
// Standard Error: 34
.saturating_add(Weight::from_parts(9_964, 0).saturating_mul(v.into()))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
/// Storage: `Staking::SlashingSpans` (r:1 w:1)
@@ -1163,10 +1152,10 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `2196 + s * (4 ±0)`
// Estimated: `6248 + s * (4 ±0)`
// Minimum execution time: 86_537_000 picoseconds.
Weight::from_parts(95_127_637, 6248)
// Standard Error: 3_902
.saturating_add(Weight::from_parts(1_336_182, 0).saturating_mul(s.into()))
// Minimum execution time: 87_495_000 picoseconds.
Weight::from_parts(95_710_388, 6248)
// Standard Error: 5_849
.saturating_add(Weight::from_parts(1_339_335, 0).saturating_mul(s.into()))
.saturating_add(RocksDbWeight::get().reads(13_u64))
.saturating_add(RocksDbWeight::get().writes(12_u64))
.saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(s.into())))
@@ -1179,54 +1168,13 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `66672`
// Estimated: `70137`
// Minimum execution time: 100_777_000 picoseconds.
Weight::from_parts(896_540_406, 70137)
// Standard Error: 57_788
.saturating_add(Weight::from_parts(4_870_910, 0).saturating_mul(s.into()))
// Minimum execution time: 98_255_000 picoseconds.
Weight::from_parts(892_807_378, 70137)
// Standard Error: 57_735
.saturating_add(Weight::from_parts(4_876_449, 0).saturating_mul(s.into()))
.saturating_add(RocksDbWeight::get().reads(1_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
/// Storage: `Staking::CurrentEra` (r:1 w:0)
/// Proof: `Staking::CurrentEra` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Staking::ErasStakersOverview` (r:1 w:0)
/// Proof: `Staking::ErasStakersOverview` (`max_values`: None, `max_size`: Some(92), added: 2567, mode: `MaxEncodedLen`)
/// Storage: `Staking::ErasValidatorReward` (r:1 w:0)
/// Proof: `Staking::ErasValidatorReward` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`)
/// Storage: `Staking::Bonded` (r:257 w:0)
/// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Staking::Ledger` (r:1 w:1)
/// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`)
/// Storage: `Balances::Locks` (r:1 w:1)
/// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`)
/// Storage: `Balances::Freezes` (r:1 w:0)
/// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:258 w:258)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// Storage: `Staking::ClaimedRewards` (r:1 w:1)
/// Proof: `Staking::ClaimedRewards` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `Staking::ErasStakersPaged` (r:1 w:0)
/// Proof: `Staking::ErasStakersPaged` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `Staking::ErasRewardPoints` (r:1 w:0)
/// Proof: `Staking::ErasRewardPoints` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `Staking::ErasValidatorPrefs` (r:1 w:0)
/// Proof: `Staking::ErasValidatorPrefs` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// Storage: `Staking::Payee` (r:257 w:0)
/// Proof: `Staking::Payee` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
/// The range of component `n` is `[0, 256]`.
fn payout_stakers_dead_controller(n: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `21644 + n * (155 ±0)`
// Estimated: `21412 + n * (2603 ±0)`
// Minimum execution time: 133_129_000 picoseconds.
Weight::from_parts(190_983_630, 21412)
// Standard Error: 17_497
.saturating_add(Weight::from_parts(24_723_153, 0).saturating_mul(n.into()))
.saturating_add(RocksDbWeight::get().reads(14_u64))
.saturating_add(RocksDbWeight::get().reads((3_u64).saturating_mul(n.into())))
.saturating_add(RocksDbWeight::get().writes(5_u64))
.saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(n.into())))
.saturating_add(Weight::from_parts(0, 2603).saturating_mul(n.into()))
}
/// Storage: `Staking::Bonded` (r:257 w:0)
/// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Staking::Ledger` (r:257 w:257)
@@ -1260,10 +1208,10 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `33297 + n * (377 ±0)`
// Estimated: `30944 + n * (3774 ±3)`
// Minimum execution time: 149_773_000 picoseconds.
Weight::from_parts(151_527_124, 30944)
// Standard Error: 24_152
.saturating_add(Weight::from_parts(46_124_074, 0).saturating_mul(n.into()))
// Minimum execution time: 144_258_000 picoseconds.
Weight::from_parts(175_256_796, 30944)
// Standard Error: 24_339
.saturating_add(Weight::from_parts(46_011_700, 0).saturating_mul(n.into()))
.saturating_add(RocksDbWeight::get().reads(14_u64))
.saturating_add(RocksDbWeight::get().reads((6_u64).saturating_mul(n.into())))
.saturating_add(RocksDbWeight::get().writes(4_u64))
@@ -1287,10 +1235,10 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `1991 + l * (7 ±0)`
// Estimated: `8877`
// Minimum execution time: 81_618_000 picoseconds.
Weight::from_parts(85_245_630, 8877)
// Standard Error: 5_049
.saturating_add(Weight::from_parts(39_811, 0).saturating_mul(l.into()))
// Minimum execution time: 83_532_000 picoseconds.
Weight::from_parts(86_757_943, 8877)
// Standard Error: 6_379
.saturating_add(Weight::from_parts(57_566, 0).saturating_mul(l.into()))
.saturating_add(RocksDbWeight::get().reads(9_u64))
.saturating_add(RocksDbWeight::get().writes(7_u64))
}
@@ -1325,10 +1273,10 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `2196 + s * (4 ±0)`
// Estimated: `6248 + s * (4 ±0)`
// Minimum execution time: 95_395_000 picoseconds.
Weight::from_parts(100_459_234, 6248)
// Standard Error: 3_781
.saturating_add(Weight::from_parts(1_333_607, 0).saturating_mul(s.into()))
// Minimum execution time: 96_776_000 picoseconds.
Weight::from_parts(100_950_027, 6248)
// Standard Error: 4_719
.saturating_add(Weight::from_parts(1_432_091, 0).saturating_mul(s.into()))
.saturating_add(RocksDbWeight::get().reads(12_u64))
.saturating_add(RocksDbWeight::get().writes(11_u64))
.saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(s.into())))
@@ -1374,12 +1322,12 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `0 + n * (720 ±0) + v * (3598 ±0)`
// Estimated: `512390 + n * (3566 ±0) + v * (3566 ±0)`
// Minimum execution time: 571_337_000 picoseconds.
Weight::from_parts(578_857_000, 512390)
// Standard Error: 2_090_511
.saturating_add(Weight::from_parts(68_626_083, 0).saturating_mul(v.into()))
// Standard Error: 208_307
.saturating_add(Weight::from_parts(18_645_374, 0).saturating_mul(n.into()))
// Minimum execution time: 577_699_000 picoseconds.
Weight::from_parts(582_827_000, 512390)
// Standard Error: 2_000_851
.saturating_add(Weight::from_parts(67_316_744, 0).saturating_mul(v.into()))
// Standard Error: 199_373
.saturating_add(Weight::from_parts(18_503_387, 0).saturating_mul(n.into()))
.saturating_add(RocksDbWeight::get().reads(206_u64))
.saturating_add(RocksDbWeight::get().reads((5_u64).saturating_mul(v.into())))
.saturating_add(RocksDbWeight::get().reads((4_u64).saturating_mul(n.into())))
@@ -1410,12 +1358,12 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `3175 + n * (911 ±0) + v * (395 ±0)`
// Estimated: `512390 + n * (3566 ±0) + v * (3566 ±0)`
// Minimum execution time: 34_590_734_000 picoseconds.
Weight::from_parts(35_238_091_000, 512390)
// Standard Error: 427_974
.saturating_add(Weight::from_parts(5_084_196, 0).saturating_mul(v.into()))
// Standard Error: 427_974
.saturating_add(Weight::from_parts(4_503_420, 0).saturating_mul(n.into()))
// Minimum execution time: 34_048_778_000 picoseconds.
Weight::from_parts(34_397_777_000, 512390)
// Standard Error: 346_115
.saturating_add(Weight::from_parts(3_704_941, 0).saturating_mul(v.into()))
// Standard Error: 346_115
.saturating_add(Weight::from_parts(4_064_819, 0).saturating_mul(n.into()))
.saturating_add(RocksDbWeight::get().reads(201_u64))
.saturating_add(RocksDbWeight::get().reads((5_u64).saturating_mul(v.into())))
.saturating_add(RocksDbWeight::get().reads((4_u64).saturating_mul(n.into())))
@@ -1432,10 +1380,10 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `979 + v * (50 ±0)`
// Estimated: `3510 + v * (2520 ±0)`
// Minimum execution time: 2_509_588_000 picoseconds.
Weight::from_parts(89_050_539, 3510)
// Standard Error: 11_803
.saturating_add(Weight::from_parts(5_031_416, 0).saturating_mul(v.into()))
// Minimum execution time: 2_473_149_000 picoseconds.
Weight::from_parts(84_721_859, 3510)
// Standard Error: 8_690
.saturating_add(Weight::from_parts(4_870_439, 0).saturating_mul(v.into()))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(v.into())))
.saturating_add(Weight::from_parts(0, 2520).saturating_mul(v.into()))
@@ -1456,8 +1404,8 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 5_347_000 picoseconds.
Weight::from_parts(5_562_000, 0)
// Minimum execution time: 5_312_000 picoseconds.
Weight::from_parts(5_897_000, 0)
.saturating_add(RocksDbWeight::get().writes(6_u64))
}
/// Storage: `Staking::MinCommission` (r:0 w:1)
@@ -1476,8 +1424,8 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 4_725_000 picoseconds.
Weight::from_parts(5_075_000, 0)
// Minimum execution time: 4_676_000 picoseconds.
Weight::from_parts(4_913_000, 0)
.saturating_add(RocksDbWeight::get().writes(6_u64))
}
/// Storage: `Staking::Ledger` (r:1 w:0)
@@ -1504,8 +1452,8 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `1773`
// Estimated: `6248`
// Minimum execution time: 67_204_000 picoseconds.
Weight::from_parts(69_197_000, 6248)
// Minimum execution time: 67_286_000 picoseconds.
Weight::from_parts(69_081_000, 6248)
.saturating_add(RocksDbWeight::get().reads(11_u64))
.saturating_add(RocksDbWeight::get().writes(6_u64))
}
@@ -1517,8 +1465,8 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `691`
// Estimated: `3510`
// Minimum execution time: 12_497_000 picoseconds.
Weight::from_parts(12_943_000, 3510)
// Minimum execution time: 12_749_000 picoseconds.
Weight::from_parts(13_275_000, 3510)
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
@@ -1528,8 +1476,8 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 3_245_000 picoseconds.
Weight::from_parts(3_352_000, 0)
// Minimum execution time: 3_155_000 picoseconds.
Weight::from_parts(3_319_000, 0)
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
}