mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-29 17:17:56 +00:00
Staking: Add deprecate_controller_batch AdminOrigin call (#2589)
Partially Addresses #2500 Adds a `deprecate_controller_batch` call to the staking pallet that is callable by `Root` and `StakingAdmin`. To be used for controller account deprecation and removed thereafter. Adds `MaxControllersDeprecationBatch` pallet constant that defines max possible deprecations per call. - [x] Add `deprecate_controller_batch` call, and `MaxControllersInDeprecationBatch` constant. - [x] Add tests, benchmark, weights. Tests that weight is only consumed if unique pair. - [x] Adds `StakingAdmin` origin to staking's `AdminOrigin` type in westend runtime. - [x] Determined that worst case 5,900 deprecations does fit into `maxBlock` `proofSize` and `refTime` in both normal and operational thresholds, meaning we can deprecate all controllers for each network in one call. ## Block Weights By querying `consts.system.blockWeights` we can see that the `deprecate_controller_batch` weights fit within the `normal` threshold on Polkadot. #### `controller_deprecation_batch` where i = 5900: #### Ref time: 69,933,325,300 #### Proof size: 21,040,390 ### Polkadot ``` // consts.query.blockWeights maxBlock: { refTime: 2,000,000,000,000 proofSize: 18,446,744,073,709,551,615 } normal: { maxExtrinsic: { refTime: 1,479,873,955,000 proofSize: 13,650,590,614,545,068,195 } maxTotal: { refTime: 1,500,000,000,000 proofSize: 13,835,058,055,282,163,711 } } ``` ### Kusama ``` // consts.query.blockWeights maxBlock: { refTime: 2,000,000,000,000 proofSize: 18,446,744,073,709,551,615 } normal: { maxExtrinsic: { refTime: 1,479,875,294,000 proofSize: 13,650,590,614,545,068,195 } maxTotal: { refTime: 1,500,000,000,000 proofSize: 13,835,058,055,282,163,711 } } ``` --------- Co-authored-by: command-bot <> Co-authored-by: Gonçalo Pestana <g6pestana@gmail.com>
This commit is contained in:
@@ -356,6 +356,7 @@ impl pallet_staking::Config for Runtime {
|
||||
type TargetList = pallet_staking::UseValidatorsMap<Runtime>;
|
||||
type NominationsQuota = pallet_staking::FixedNominationsQuota<MAX_QUOTA_NOMINATIONS>;
|
||||
type MaxUnlockingChunks = frame_support::traits::ConstU32<32>;
|
||||
type MaxControllersInDeprecationBatch = ConstU32<5900>;
|
||||
type HistoryDepth = frame_support::traits::ConstU32<84>;
|
||||
type BenchmarkingConfig = runtime_common::StakingBenchmarkingConfig;
|
||||
type EventListeners = ();
|
||||
|
||||
@@ -672,6 +672,7 @@ parameter_types! {
|
||||
pub const MaxNominators: u32 = 64;
|
||||
pub const OffendingValidatorsThreshold: Perbill = Perbill::from_percent(17);
|
||||
pub const MaxNominations: u32 = <NposCompactSolution16 as frame_election_provider_support::NposSolution>::LIMIT as u32;
|
||||
pub const MaxControllersInDeprecationBatch: u32 = 751;
|
||||
}
|
||||
|
||||
impl pallet_staking::Config for Runtime {
|
||||
@@ -686,7 +687,7 @@ impl pallet_staking::Config for Runtime {
|
||||
type SessionsPerEra = SessionsPerEra;
|
||||
type BondingDuration = BondingDuration;
|
||||
type SlashDeferDuration = SlashDeferDuration;
|
||||
type AdminOrigin = EnsureRoot<AccountId>;
|
||||
type AdminOrigin = EitherOf<EnsureRoot<AccountId>, StakingAdmin>;
|
||||
type SessionInterface = Self;
|
||||
type EraPayout = pallet_staking::ConvertCurve<RewardCurve>;
|
||||
type MaxExposurePageSize = MaxExposurePageSize;
|
||||
@@ -699,6 +700,7 @@ impl pallet_staking::Config for Runtime {
|
||||
type NominationsQuota = pallet_staking::FixedNominationsQuota<{ MaxNominations::get() }>;
|
||||
type MaxUnlockingChunks = frame_support::traits::ConstU32<32>;
|
||||
type HistoryDepth = frame_support::traits::ConstU32<84>;
|
||||
type MaxControllersInDeprecationBatch = MaxControllersInDeprecationBatch;
|
||||
type BenchmarkingConfig = runtime_common::StakingBenchmarkingConfig;
|
||||
type EventListeners = NominationPools;
|
||||
type WeightInfo = weights::pallet_staking::WeightInfo<Runtime>;
|
||||
|
||||
@@ -17,9 +17,9 @@
|
||||
//! Autogenerated weights for `pallet_staking`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2023-11-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! DATE: 2023-12-10, 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`
|
||||
//! HOSTNAME: `runner-itmxxexx-project-674-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("westend-dev")`, DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
@@ -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: 38_052_000 picoseconds.
|
||||
Weight::from_parts(39_303_000, 0)
|
||||
// Minimum execution time: 38_316_000 picoseconds.
|
||||
Weight::from_parts(40_022_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: 81_690_000 picoseconds.
|
||||
Weight::from_parts(83_889_000, 0)
|
||||
// Minimum execution time: 81_027_000 picoseconds.
|
||||
Weight::from_parts(83_964_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: 84_409_000 picoseconds.
|
||||
Weight::from_parts(87_330_000, 0)
|
||||
// Minimum execution time: 85_585_000 picoseconds.
|
||||
Weight::from_parts(87_256_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: 39_770_000 picoseconds.
|
||||
Weight::from_parts(40_828_632, 0)
|
||||
// Minimum execution time: 39_520_000 picoseconds.
|
||||
Weight::from_parts(41_551_548, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4764))
|
||||
// Standard Error: 824
|
||||
.saturating_add(Weight::from_parts(51_107, 0).saturating_mul(s.into()))
|
||||
// Standard Error: 1_094
|
||||
.saturating_add(Weight::from_parts(50_426, 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: 82_500_000 picoseconds.
|
||||
Weight::from_parts(90_099_121, 0)
|
||||
// Minimum execution time: 82_915_000 picoseconds.
|
||||
Weight::from_parts(89_597_160, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6248))
|
||||
// Standard Error: 3_280
|
||||
.saturating_add(Weight::from_parts(1_273_212, 0).saturating_mul(s.into()))
|
||||
// Standard Error: 3_146
|
||||
.saturating_add(Weight::from_parts(1_228_061, 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: 48_236_000 picoseconds.
|
||||
Weight::from_parts(49_518_000, 0)
|
||||
// Minimum execution time: 48_070_000 picoseconds.
|
||||
Weight::from_parts(49_226_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: 28_280_000 picoseconds.
|
||||
Weight::from_parts(29_182_740, 0)
|
||||
// Minimum execution time: 29_140_000 picoseconds.
|
||||
Weight::from_parts(30_225_579, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4556))
|
||||
// Standard Error: 6_102
|
||||
.saturating_add(Weight::from_parts(6_412_107, 0).saturating_mul(k.into()))
|
||||
// Standard Error: 5_394
|
||||
.saturating_add(Weight::from_parts(6_401_367, 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: 59_846_000 picoseconds.
|
||||
Weight::from_parts(58_029_857, 0)
|
||||
// Minimum execution time: 59_287_000 picoseconds.
|
||||
Weight::from_parts(58_285_052, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6248))
|
||||
// Standard Error: 15_967
|
||||
.saturating_add(Weight::from_parts(3_898_764, 0).saturating_mul(n.into()))
|
||||
// Standard Error: 14_556
|
||||
.saturating_add(Weight::from_parts(3_863_008, 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: 51_223_000 picoseconds.
|
||||
Weight::from_parts(52_310_000, 0)
|
||||
// Minimum execution time: 51_035_000 picoseconds.
|
||||
Weight::from_parts(52_163_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6248))
|
||||
.saturating_add(T::DbWeight::get().reads(8))
|
||||
.saturating_add(T::DbWeight::get().writes(6))
|
||||
@@ -306,8 +306,8 @@ impl<T: frame_system::Config> pallet_staking::WeightInfo for WeightInfo<T> {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `865`
|
||||
// Estimated: `4556`
|
||||
// Minimum execution time: 15_762_000 picoseconds.
|
||||
Weight::from_parts(16_381_000, 0)
|
||||
// Minimum execution time: 15_809_000 picoseconds.
|
||||
Weight::from_parts(16_451_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4556))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
@@ -322,8 +322,8 @@ impl<T: frame_system::Config> pallet_staking::WeightInfo for WeightInfo<T> {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `932`
|
||||
// Estimated: `4556`
|
||||
// Minimum execution time: 21_904_000 picoseconds.
|
||||
Weight::from_parts(22_373_000, 0)
|
||||
// Minimum execution time: 21_695_000 picoseconds.
|
||||
Weight::from_parts(22_351_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4556))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
@@ -336,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: 18_869_000 picoseconds.
|
||||
Weight::from_parts(19_422_000, 0)
|
||||
// Minimum execution time: 18_548_000 picoseconds.
|
||||
Weight::from_parts(19_205_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4556))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
@@ -348,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_205_000 picoseconds.
|
||||
Weight::from_parts(2_320_000, 0)
|
||||
// Minimum execution time: 2_193_000 picoseconds.
|
||||
Weight::from_parts(2_408_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
@@ -359,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_179_000 picoseconds.
|
||||
Weight::from_parts(7_843_000, 0)
|
||||
// Minimum execution time: 7_475_000 picoseconds.
|
||||
Weight::from_parts(7_874_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
@@ -370,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_206_000 picoseconds.
|
||||
Weight::from_parts(7_829_000, 0)
|
||||
// Minimum execution time: 7_393_000 picoseconds.
|
||||
Weight::from_parts(7_643_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
@@ -381,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_414_000 picoseconds.
|
||||
Weight::from_parts(7_770_000, 0)
|
||||
// Minimum execution time: 7_474_000 picoseconds.
|
||||
Weight::from_parts(7_814_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
@@ -393,13 +393,33 @@ impl<T: frame_system::Config> pallet_staking::WeightInfo for WeightInfo<T> {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 2_256_000 picoseconds.
|
||||
Weight::from_parts(2_645_840, 0)
|
||||
// Minimum execution time: 2_358_000 picoseconds.
|
||||
Weight::from_parts(2_589_423, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
// Standard Error: 37
|
||||
.saturating_add(Weight::from_parts(10_207, 0).saturating_mul(v.into()))
|
||||
// Standard Error: 81
|
||||
.saturating_add(Weight::from_parts(13_612, 0).saturating_mul(v.into()))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Staking::Ledger` (r:751 w:1502)
|
||||
/// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Staking::Payee` (r:751 w:0)
|
||||
/// Proof: `Staking::Payee` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Staking::Bonded` (r:0 w:751)
|
||||
/// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
|
||||
/// The range of component `i` is `[0, 751]`.
|
||||
fn deprecate_controller_batch(i: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `668 + i * (148 ±0)`
|
||||
// Estimated: `990 + i * (3566 ±0)`
|
||||
// Minimum execution time: 1_934_000 picoseconds.
|
||||
Weight::from_parts(2_070_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 990))
|
||||
// Standard Error: 19_129
|
||||
.saturating_add(Weight::from_parts(13_231_580, 0).saturating_mul(i.into()))
|
||||
.saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(i.into())))
|
||||
.saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(i.into())))
|
||||
.saturating_add(Weight::from_parts(0, 3566).saturating_mul(i.into()))
|
||||
}
|
||||
/// Storage: `Staking::SlashingSpans` (r:1 w:1)
|
||||
/// Proof: `Staking::SlashingSpans` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `Staking::Bonded` (r:1 w:1)
|
||||
@@ -433,11 +453,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: 81_032_000 picoseconds.
|
||||
Weight::from_parts(88_297_596, 0)
|
||||
// Minimum execution time: 80_290_000 picoseconds.
|
||||
Weight::from_parts(87_901_664, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6248))
|
||||
// Standard Error: 3_070
|
||||
.saturating_add(Weight::from_parts(1_207_207, 0).saturating_mul(s.into()))
|
||||
// Standard Error: 2_960
|
||||
.saturating_add(Weight::from_parts(1_195_050, 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())))
|
||||
@@ -450,11 +470,11 @@ impl<T: frame_system::Config> pallet_staking::WeightInfo for WeightInfo<T> {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `66639`
|
||||
// Estimated: `70104`
|
||||
// Minimum execution time: 131_456_000 picoseconds.
|
||||
Weight::from_parts(935_254_517, 0)
|
||||
// Minimum execution time: 132_682_000 picoseconds.
|
||||
Weight::from_parts(932_504_297, 0)
|
||||
.saturating_add(Weight::from_parts(0, 70104))
|
||||
// Standard Error: 57_806
|
||||
.saturating_add(Weight::from_parts(4_823_189, 0).saturating_mul(s.into()))
|
||||
// Standard Error: 57_593
|
||||
.saturating_add(Weight::from_parts(4_829_705, 0).saturating_mul(s.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
@@ -490,12 +510,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 ±0)`
|
||||
// Minimum execution time: 129_233_000 picoseconds.
|
||||
Weight::from_parts(165_096_042, 0)
|
||||
// Estimated: `10779 + n * (3774 ±3)`
|
||||
// Minimum execution time: 129_091_000 picoseconds.
|
||||
Weight::from_parts(166_186_167, 0)
|
||||
.saturating_add(Weight::from_parts(0, 10779))
|
||||
// Standard Error: 29_598
|
||||
.saturating_add(Weight::from_parts(40_716_425, 0).saturating_mul(n.into()))
|
||||
// Standard Error: 36_242
|
||||
.saturating_add(Weight::from_parts(40_467_481, 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))
|
||||
@@ -519,11 +539,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: 77_223_000 picoseconds.
|
||||
Weight::from_parts(80_026_259, 0)
|
||||
// Minimum execution time: 77_461_000 picoseconds.
|
||||
Weight::from_parts(80_118_021, 0)
|
||||
.saturating_add(Weight::from_parts(0, 8877))
|
||||
// Standard Error: 4_493
|
||||
.saturating_add(Weight::from_parts(52_909, 0).saturating_mul(l.into()))
|
||||
// Standard Error: 4_343
|
||||
.saturating_add(Weight::from_parts(59_113, 0).saturating_mul(l.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(9))
|
||||
.saturating_add(T::DbWeight::get().writes(7))
|
||||
}
|
||||
@@ -558,11 +578,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: 89_871_000 picoseconds.
|
||||
Weight::from_parts(92_313_331, 0)
|
||||
// Minimum execution time: 89_366_000 picoseconds.
|
||||
Weight::from_parts(91_964_557, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6248))
|
||||
// Standard Error: 3_321
|
||||
.saturating_add(Weight::from_parts(1_243_347, 0).saturating_mul(s.into()))
|
||||
// Standard Error: 2_799
|
||||
.saturating_add(Weight::from_parts(1_206_123, 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())))
|
||||
@@ -607,14 +627,14 @@ impl<T: frame_system::Config> pallet_staking::WeightInfo for WeightInfo<T> {
|
||||
fn new_era(v: u32, n: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0 + n * (716 ±0) + v * (3594 ±0)`
|
||||
// Estimated: `456136 + n * (3566 ±0) + v * (3566 ±0)`
|
||||
// Minimum execution time: 518_819_000 picoseconds.
|
||||
Weight::from_parts(522_108_000, 0)
|
||||
// Estimated: `456136 + n * (3566 ±4) + v * (3566 ±40)`
|
||||
// Minimum execution time: 520_430_000 picoseconds.
|
||||
Weight::from_parts(527_125_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 456136))
|
||||
// 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()))
|
||||
// Standard Error: 1_974_092
|
||||
.saturating_add(Weight::from_parts(64_885_491, 0).saturating_mul(v.into()))
|
||||
// Standard Error: 196_707
|
||||
.saturating_add(Weight::from_parts(18_100_326, 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())))
|
||||
@@ -645,13 +665,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: 34_976_277_000 picoseconds.
|
||||
Weight::from_parts(35_245_501_000, 0)
|
||||
// Minimum execution time: 33_917_323_000 picoseconds.
|
||||
Weight::from_parts(34_173_565_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 456136))
|
||||
// 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()))
|
||||
// Standard Error: 367_135
|
||||
.saturating_add(Weight::from_parts(4_696_840, 0).saturating_mul(v.into()))
|
||||
// Standard Error: 367_135
|
||||
.saturating_add(Weight::from_parts(3_889_075, 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())))
|
||||
@@ -668,11 +688,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_577_411_000 picoseconds.
|
||||
Weight::from_parts(86_073_486, 0)
|
||||
// Minimum execution time: 2_447_197_000 picoseconds.
|
||||
Weight::from_parts(13_003_614, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3510))
|
||||
// Standard Error: 8_363
|
||||
.saturating_add(Weight::from_parts(5_074_828, 0).saturating_mul(v.into()))
|
||||
// Standard Error: 9_738
|
||||
.saturating_add(Weight::from_parts(4_953_442, 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()))
|
||||
@@ -693,8 +713,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_539_000 picoseconds.
|
||||
Weight::from_parts(3_903_000, 0)
|
||||
// Minimum execution time: 3_714_000 picoseconds.
|
||||
Weight::from_parts(3_956_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
.saturating_add(T::DbWeight::get().writes(6))
|
||||
}
|
||||
@@ -714,11 +734,13 @@ impl<T: frame_system::Config> pallet_staking::WeightInfo for WeightInfo<T> {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 3_244_000 picoseconds.
|
||||
Weight::from_parts(3_450_000, 0)
|
||||
// Minimum execution time: 3_361_000 picoseconds.
|
||||
Weight::from_parts(3_632_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
.saturating_add(T::DbWeight::get().writes(6))
|
||||
}
|
||||
/// Storage: `Staking::Bonded` (r:1 w:0)
|
||||
/// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Staking::Ledger` (r:1 w:0)
|
||||
/// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Staking::Nominators` (r:1 w:1)
|
||||
@@ -741,12 +763,12 @@ impl<T: frame_system::Config> pallet_staking::WeightInfo for WeightInfo<T> {
|
||||
/// Proof: `VoterList::CounterForListNodes` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||
fn chill_other() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `1704`
|
||||
// Measured: `1870`
|
||||
// Estimated: `6248`
|
||||
// Minimum execution time: 62_606_000 picoseconds.
|
||||
Weight::from_parts(64_678_000, 0)
|
||||
// Minimum execution time: 65_329_000 picoseconds.
|
||||
Weight::from_parts(67_247_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6248))
|
||||
.saturating_add(T::DbWeight::get().reads(11))
|
||||
.saturating_add(T::DbWeight::get().reads(12))
|
||||
.saturating_add(T::DbWeight::get().writes(6))
|
||||
}
|
||||
/// Storage: `Staking::MinCommission` (r:1 w:0)
|
||||
@@ -757,8 +779,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_490_000 picoseconds.
|
||||
Weight::from_parts(11_867_000, 0)
|
||||
// Minimum execution time: 11_760_000 picoseconds.
|
||||
Weight::from_parts(12_095_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3510))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
@@ -769,8 +791,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_125_000 picoseconds.
|
||||
Weight::from_parts(2_337_000, 0)
|
||||
// Minimum execution time: 2_256_000 picoseconds.
|
||||
Weight::from_parts(2_378_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
|
||||
@@ -632,6 +632,7 @@ parameter_types! {
|
||||
pub const RewardCurve: &'static PiecewiseLinear<'static> = &REWARD_CURVE;
|
||||
pub const MaxNominators: u32 = 64;
|
||||
pub const OffendingValidatorsThreshold: Perbill = Perbill::from_percent(17);
|
||||
pub const MaxControllersInDeprecationBatch: u32 = 5900;
|
||||
pub OffchainRepeat: BlockNumber = 5;
|
||||
pub HistoryDepth: u32 = 84;
|
||||
}
|
||||
@@ -674,6 +675,7 @@ impl pallet_staking::Config for Runtime {
|
||||
// This a placeholder, to be introduced in the next PR as an instance of bags-list
|
||||
type TargetList = pallet_staking::UseValidatorsMap<Self>;
|
||||
type MaxUnlockingChunks = ConstU32<32>;
|
||||
type MaxControllersInDeprecationBatch = MaxControllersInDeprecationBatch;
|
||||
type HistoryDepth = HistoryDepth;
|
||||
type EventListeners = NominationPools;
|
||||
type WeightInfo = pallet_staking::weights::SubstrateWeight<Runtime>;
|
||||
|
||||
@@ -183,6 +183,7 @@ impl pallet_staking::Config for Test {
|
||||
type TargetList = pallet_staking::UseValidatorsMap<Self>;
|
||||
type NominationsQuota = FixedNominationsQuota<16>;
|
||||
type MaxUnlockingChunks = ConstU32<32>;
|
||||
type MaxControllersInDeprecationBatch = ConstU32<100>;
|
||||
type HistoryDepth = ConstU32<84>;
|
||||
type EventListeners = ();
|
||||
type BenchmarkingConfig = pallet_staking::TestBenchmarkingConfig;
|
||||
|
||||
@@ -201,6 +201,7 @@ impl pallet_staking::Config for Test {
|
||||
type TargetList = pallet_staking::UseValidatorsMap<Self>;
|
||||
type NominationsQuota = pallet_staking::FixedNominationsQuota<16>;
|
||||
type MaxUnlockingChunks = ConstU32<32>;
|
||||
type MaxControllersInDeprecationBatch = ConstU32<100>;
|
||||
type HistoryDepth = ConstU32<84>;
|
||||
type EventListeners = ();
|
||||
type BenchmarkingConfig = pallet_staking::TestBenchmarkingConfig;
|
||||
|
||||
@@ -276,6 +276,7 @@ impl pallet_staking::Config for Runtime {
|
||||
type NominationsQuota = pallet_staking::FixedNominationsQuota<MAX_QUOTA_NOMINATIONS>;
|
||||
type TargetList = pallet_staking::UseValidatorsMap<Self>;
|
||||
type MaxUnlockingChunks = ConstU32<32>;
|
||||
type MaxControllersInDeprecationBatch = ConstU32<100>;
|
||||
type HistoryDepth = HistoryDepth;
|
||||
type EventListeners = ();
|
||||
type WeightInfo = pallet_staking::weights::SubstrateWeight<Runtime>;
|
||||
|
||||
@@ -142,6 +142,7 @@ impl pallet_staking::Config for Runtime {
|
||||
type TargetList = pallet_staking::UseValidatorsMap<Self>;
|
||||
type NominationsQuota = pallet_staking::FixedNominationsQuota<16>;
|
||||
type MaxUnlockingChunks = ConstU32<32>;
|
||||
type MaxControllersInDeprecationBatch = ConstU32<100>;
|
||||
type EventListeners = ();
|
||||
type BenchmarkingConfig = pallet_staking::TestBenchmarkingConfig;
|
||||
type WeightInfo = ();
|
||||
|
||||
@@ -206,6 +206,7 @@ impl pallet_staking::Config for Test {
|
||||
type TargetList = pallet_staking::UseValidatorsMap<Self>;
|
||||
type NominationsQuota = pallet_staking::FixedNominationsQuota<16>;
|
||||
type MaxUnlockingChunks = ConstU32<32>;
|
||||
type MaxControllersInDeprecationBatch = ConstU32<100>;
|
||||
type HistoryDepth = ConstU32<84>;
|
||||
type EventListeners = ();
|
||||
type BenchmarkingConfig = pallet_staking::TestBenchmarkingConfig;
|
||||
|
||||
@@ -119,6 +119,7 @@ impl pallet_staking::Config for Runtime {
|
||||
type VoterList = VoterList;
|
||||
type TargetList = pallet_staking::UseValidatorsMap<Self>;
|
||||
type NominationsQuota = pallet_staking::FixedNominationsQuota<16>;
|
||||
type MaxControllersInDeprecationBatch = ConstU32<100>;
|
||||
type MaxUnlockingChunks = ConstU32<32>;
|
||||
type HistoryDepth = ConstU32<84>;
|
||||
type EventListeners = Pools;
|
||||
|
||||
@@ -134,6 +134,7 @@ impl pallet_staking::Config for Runtime {
|
||||
type TargetList = pallet_staking::UseValidatorsMap<Self>;
|
||||
type NominationsQuota = pallet_staking::FixedNominationsQuota<16>;
|
||||
type MaxUnlockingChunks = ConstU32<32>;
|
||||
type MaxControllersInDeprecationBatch = ConstU32<100>;
|
||||
type HistoryDepth = ConstU32<84>;
|
||||
type EventListeners = Pools;
|
||||
type BenchmarkingConfig = pallet_staking::TestBenchmarkingConfig;
|
||||
|
||||
@@ -185,6 +185,7 @@ impl pallet_staking::Config for Test {
|
||||
type TargetList = pallet_staking::UseValidatorsMap<Self>;
|
||||
type NominationsQuota = pallet_staking::FixedNominationsQuota<16>;
|
||||
type MaxUnlockingChunks = ConstU32<32>;
|
||||
type MaxControllersInDeprecationBatch = ConstU32<100>;
|
||||
type HistoryDepth = ConstU32<84>;
|
||||
type EventListeners = ();
|
||||
type BenchmarkingConfig = pallet_staking::TestBenchmarkingConfig;
|
||||
|
||||
@@ -188,6 +188,7 @@ impl pallet_staking::Config for Test {
|
||||
type NominationsQuota = pallet_staking::FixedNominationsQuota<16>;
|
||||
type MaxUnlockingChunks = ConstU32<32>;
|
||||
type HistoryDepth = ConstU32<84>;
|
||||
type MaxControllersInDeprecationBatch = ConstU32<100>;
|
||||
type VoterList = pallet_staking::UseNominatorsAndValidatorsMap<Self>;
|
||||
type EventListeners = ();
|
||||
type BenchmarkingConfig = pallet_staking::TestBenchmarkingConfig;
|
||||
|
||||
@@ -179,6 +179,7 @@ impl pallet_staking::Config for Test {
|
||||
type ElectionProvider = onchain::OnChainExecution<OnChainSeqPhragmen>;
|
||||
type GenesisElectionProvider = Self::ElectionProvider;
|
||||
type MaxUnlockingChunks = ConstU32<32>;
|
||||
type MaxControllersInDeprecationBatch = ConstU32<100>;
|
||||
type HistoryDepth = ConstU32<84>;
|
||||
type VoterList = pallet_staking::UseNominatorsAndValidatorsMap<Self>;
|
||||
type TargetList = pallet_staking::UseValidatorsMap<Self>;
|
||||
|
||||
@@ -25,6 +25,7 @@ use codec::Decode;
|
||||
use frame_election_provider_support::{bounds::DataProviderBounds, SortedListProvider};
|
||||
use frame_support::{
|
||||
pallet_prelude::*,
|
||||
storage::bounded_vec::BoundedVec,
|
||||
traits::{Currency, Get, Imbalance, UnfilteredDispatchable},
|
||||
};
|
||||
use sp_runtime::{
|
||||
@@ -525,6 +526,39 @@ benchmarks! {
|
||||
assert_eq!(Invulnerables::<T>::get().len(), v as usize);
|
||||
}
|
||||
|
||||
deprecate_controller_batch {
|
||||
// We pass a dynamic number of controllers to the benchmark, up to
|
||||
// `MaxControllersInDeprecationBatch`.
|
||||
let i in 0 .. T::MaxControllersInDeprecationBatch::get();
|
||||
|
||||
let mut controllers: Vec<_> = vec![];
|
||||
let mut stashes: Vec<_> = vec![];
|
||||
for n in 0..i as u32 {
|
||||
let (stash, controller) = create_unique_stash_controller::<T>(
|
||||
n,
|
||||
100,
|
||||
RewardDestination::Staked,
|
||||
false
|
||||
)?;
|
||||
controllers.push(controller);
|
||||
stashes.push(stash);
|
||||
}
|
||||
let bounded_controllers: BoundedVec<_, T::MaxControllersInDeprecationBatch> =
|
||||
BoundedVec::try_from(controllers.clone()).unwrap();
|
||||
}: _(RawOrigin::Root, bounded_controllers)
|
||||
verify {
|
||||
for n in 0..i as u32 {
|
||||
let stash = &stashes[n as usize];
|
||||
let controller = &controllers[n as usize];
|
||||
// Ledger no longer keyed by controller.
|
||||
assert_eq!(Ledger::<T>::get(controller), None);
|
||||
// Bonded now maps to the stash.
|
||||
assert_eq!(Bonded::<T>::get(stash), Some(stash.clone()));
|
||||
// Ledger is now keyed by stash.
|
||||
assert_eq!(Ledger::<T>::get(stash).unwrap().stash, *stash);
|
||||
}
|
||||
}
|
||||
|
||||
force_unstake {
|
||||
// Slashing Spans
|
||||
let s in 0 .. MAX_SPANS;
|
||||
|
||||
@@ -122,6 +122,7 @@ parameter_types! {
|
||||
pub static SlashDeferDuration: EraIndex = 0;
|
||||
pub static Period: BlockNumber = 5;
|
||||
pub static Offset: BlockNumber = 0;
|
||||
pub static MaxControllersInDeprecationBatch: u32 = 5900;
|
||||
}
|
||||
|
||||
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
|
||||
@@ -316,6 +317,7 @@ impl crate::pallet::pallet::Config for Test {
|
||||
type NominationsQuota = WeightedNominationsQuota<16>;
|
||||
type MaxUnlockingChunks = MaxUnlockingChunks;
|
||||
type HistoryDepth = HistoryDepth;
|
||||
type MaxControllersInDeprecationBatch = MaxControllersInDeprecationBatch;
|
||||
type EventListeners = EventListenerMock;
|
||||
type BenchmarkingConfig = TestBenchmarkingConfig;
|
||||
type WeightInfo = ();
|
||||
|
||||
@@ -269,6 +269,9 @@ pub mod pallet {
|
||||
#[pallet::constant]
|
||||
type MaxUnlockingChunks: Get<u32>;
|
||||
|
||||
/// The maximum amount of controller accounts that can be deprecated in one call.
|
||||
type MaxControllersInDeprecationBatch: Get<u32>;
|
||||
|
||||
/// Something that listens to staking updates and performs actions based on the data it
|
||||
/// receives.
|
||||
///
|
||||
@@ -1323,7 +1326,7 @@ pub mod pallet {
|
||||
pub fn set_controller(origin: OriginFor<T>) -> DispatchResult {
|
||||
let stash = ensure_signed(origin)?;
|
||||
|
||||
// the bonded map and ledger are mutated directly as this extrinsic is related to a
|
||||
// The bonded map and ledger are mutated directly as this extrinsic is related to a
|
||||
// (temporary) passive migration.
|
||||
Self::ledger(StakingAccount::Stash(stash.clone())).map(|ledger| {
|
||||
let controller = ledger.controller()
|
||||
@@ -1331,10 +1334,9 @@ pub mod pallet {
|
||||
.ok_or(Error::<T>::NotController)?;
|
||||
|
||||
if controller == stash {
|
||||
// stash is already its own controller.
|
||||
// Stash is already its own controller.
|
||||
return Err(Error::<T>::AlreadyPaired.into())
|
||||
}
|
||||
// update bond and ledger.
|
||||
<Ledger<T>>::remove(controller);
|
||||
<Bonded<T>>::insert(&stash, &stash);
|
||||
<Ledger<T>>::insert(&stash, ledger);
|
||||
@@ -1920,6 +1922,54 @@ pub mod pallet {
|
||||
|
||||
Ok(Pays::No.into())
|
||||
}
|
||||
|
||||
/// Updates a batch of controller accounts to their corresponding stash account if they are
|
||||
/// not the same. Ignores any controller accounts that do not exist, and does not operate if
|
||||
/// the stash and controller are already the same.
|
||||
///
|
||||
/// Effects will be felt instantly (as soon as this function is completed successfully).
|
||||
///
|
||||
/// The dispatch origin must be `T::AdminOrigin`.
|
||||
#[pallet::call_index(28)]
|
||||
#[pallet::weight(T::WeightInfo::deprecate_controller_batch(controllers.len() as u32))]
|
||||
pub fn deprecate_controller_batch(
|
||||
origin: OriginFor<T>,
|
||||
controllers: BoundedVec<T::AccountId, T::MaxControllersInDeprecationBatch>,
|
||||
) -> DispatchResultWithPostInfo {
|
||||
T::AdminOrigin::ensure_origin(origin)?;
|
||||
|
||||
// Ignore controllers that do not exist or are already the same as stash.
|
||||
let filtered_batch_with_ledger: Vec<_> = controllers
|
||||
.iter()
|
||||
.filter_map(|controller| {
|
||||
let ledger = Self::ledger(StakingAccount::Controller(controller.clone()));
|
||||
ledger.ok().map_or(None, |ledger| {
|
||||
// If the controller `RewardDestination` is still the deprecated
|
||||
// `Controller` variant, skip deprecating this account.
|
||||
let payee_deprecated = Payee::<T>::get(&ledger.stash) == {
|
||||
#[allow(deprecated)]
|
||||
RewardDestination::Controller
|
||||
};
|
||||
|
||||
if ledger.stash != *controller && !payee_deprecated {
|
||||
Some((controller.clone(), ledger))
|
||||
} else {
|
||||
None
|
||||
}
|
||||
})
|
||||
})
|
||||
.collect();
|
||||
|
||||
// Update unique pairs.
|
||||
for (controller, ledger) in filtered_batch_with_ledger {
|
||||
let stash = ledger.stash.clone();
|
||||
|
||||
<Bonded<T>>::insert(&stash, &stash);
|
||||
<Ledger<T>>::remove(controller);
|
||||
<Ledger<T>>::insert(stash, ledger);
|
||||
}
|
||||
Ok(Some(T::WeightInfo::deprecate_controller_batch(controllers.len() as u32)).into())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -6206,7 +6206,7 @@ fn proportional_ledger_slash_works() {
|
||||
#[test]
|
||||
fn reducing_max_unlocking_chunks_abrupt() {
|
||||
// Concern is on validators only
|
||||
// By Default 11, 10 are stash and ctrl and 21,20
|
||||
// By Default 11, 10 are stash and ctlr and 21,20
|
||||
ExtBuilder::default().build_and_execute(|| {
|
||||
// given a staker at era=10 and MaxUnlockChunks set to 2
|
||||
MaxUnlockingChunks::set(2);
|
||||
@@ -6867,4 +6867,181 @@ mod ledger {
|
||||
assert_eq!(Payee::<Test>::get(&21), RewardDestination::Stash);
|
||||
})
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn deprecate_controller_batch_works_full_weight() {
|
||||
ExtBuilder::default().build_and_execute(|| {
|
||||
// Given:
|
||||
|
||||
let start = 1001;
|
||||
let mut controllers: Vec<_> = vec![];
|
||||
for n in start..(start + MaxControllersInDeprecationBatch::get()).into() {
|
||||
let ctlr: u64 = n.into();
|
||||
let stash: u64 = (n + 10000).into();
|
||||
|
||||
Ledger::<Test>::insert(
|
||||
ctlr,
|
||||
StakingLedger {
|
||||
controller: None,
|
||||
total: (10 + ctlr).into(),
|
||||
active: (10 + ctlr).into(),
|
||||
..StakingLedger::default_from(stash)
|
||||
},
|
||||
);
|
||||
Bonded::<Test>::insert(stash, ctlr);
|
||||
Payee::<Test>::insert(stash, RewardDestination::Staked);
|
||||
|
||||
controllers.push(ctlr);
|
||||
}
|
||||
|
||||
// When:
|
||||
|
||||
let bounded_controllers: BoundedVec<
|
||||
_,
|
||||
<Test as Config>::MaxControllersInDeprecationBatch,
|
||||
> = BoundedVec::try_from(controllers).unwrap();
|
||||
|
||||
// Only `AdminOrigin` can sign.
|
||||
assert_noop!(
|
||||
Staking::deprecate_controller_batch(
|
||||
RuntimeOrigin::signed(2),
|
||||
bounded_controllers.clone()
|
||||
),
|
||||
BadOrigin
|
||||
);
|
||||
|
||||
let result =
|
||||
Staking::deprecate_controller_batch(RuntimeOrigin::root(), bounded_controllers);
|
||||
assert_ok!(result);
|
||||
assert_eq!(
|
||||
result.unwrap().actual_weight.unwrap(),
|
||||
<Test as Config>::WeightInfo::deprecate_controller_batch(
|
||||
<Test as Config>::MaxControllersInDeprecationBatch::get()
|
||||
)
|
||||
);
|
||||
|
||||
// Then:
|
||||
|
||||
for n in start..(start + MaxControllersInDeprecationBatch::get()).into() {
|
||||
let ctlr: u64 = n.into();
|
||||
let stash: u64 = (n + 10000).into();
|
||||
|
||||
// Ledger no longer keyed by controller.
|
||||
assert_eq!(Ledger::<Test>::get(ctlr), None);
|
||||
// Bonded now maps to the stash.
|
||||
assert_eq!(Bonded::<Test>::get(stash), Some(stash));
|
||||
|
||||
// Ledger is now keyed by stash.
|
||||
let ledger_updated = Ledger::<Test>::get(stash).unwrap();
|
||||
assert_eq!(ledger_updated.stash, stash);
|
||||
|
||||
// Check `active` and `total` values match the original ledger set by controller.
|
||||
assert_eq!(ledger_updated.active, (10 + ctlr).into());
|
||||
assert_eq!(ledger_updated.total, (10 + ctlr).into());
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn deprecate_controller_batch_works_half_weight() {
|
||||
ExtBuilder::default().build_and_execute(|| {
|
||||
// Given:
|
||||
|
||||
let start = 1001;
|
||||
let mut controllers: Vec<_> = vec![];
|
||||
for n in start..(start + MaxControllersInDeprecationBatch::get()).into() {
|
||||
let ctlr: u64 = n.into();
|
||||
|
||||
// Only half of entries are unique pairs.
|
||||
let stash: u64 = if n % 2 == 0 { (n + 10000).into() } else { ctlr };
|
||||
|
||||
Ledger::<Test>::insert(
|
||||
ctlr,
|
||||
StakingLedger { controller: None, ..StakingLedger::default_from(stash) },
|
||||
);
|
||||
Bonded::<Test>::insert(stash, ctlr);
|
||||
Payee::<Test>::insert(stash, RewardDestination::Staked);
|
||||
|
||||
controllers.push(ctlr);
|
||||
}
|
||||
|
||||
// When:
|
||||
let bounded_controllers: BoundedVec<
|
||||
_,
|
||||
<Test as Config>::MaxControllersInDeprecationBatch,
|
||||
> = BoundedVec::try_from(controllers.clone()).unwrap();
|
||||
|
||||
let result =
|
||||
Staking::deprecate_controller_batch(RuntimeOrigin::root(), bounded_controllers);
|
||||
assert_ok!(result);
|
||||
assert_eq!(
|
||||
result.unwrap().actual_weight.unwrap(),
|
||||
<Test as Config>::WeightInfo::deprecate_controller_batch(controllers.len() as u32)
|
||||
);
|
||||
|
||||
// Then:
|
||||
|
||||
for n in start..(start + MaxControllersInDeprecationBatch::get()).into() {
|
||||
let unique_pair = n % 2 == 0;
|
||||
let ctlr: u64 = n.into();
|
||||
let stash: u64 = if unique_pair { (n + 10000).into() } else { ctlr };
|
||||
|
||||
// Side effect of migration for unique pair.
|
||||
if unique_pair {
|
||||
assert_eq!(Ledger::<Test>::get(ctlr), None);
|
||||
}
|
||||
// Bonded maps to the stash.
|
||||
assert_eq!(Bonded::<Test>::get(stash), Some(stash));
|
||||
|
||||
// Ledger is keyed by stash.
|
||||
let ledger_updated = Ledger::<Test>::get(stash).unwrap();
|
||||
assert_eq!(ledger_updated.stash, stash);
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn deprecate_controller_batch_skips_unmigrated_controller_payees() {
|
||||
ExtBuilder::default().build_and_execute(|| {
|
||||
// Given:
|
||||
|
||||
let stash: u64 = 1000;
|
||||
let ctlr: u64 = 1001;
|
||||
|
||||
Ledger::<Test>::insert(
|
||||
ctlr,
|
||||
StakingLedger { controller: None, ..StakingLedger::default_from(stash) },
|
||||
);
|
||||
Bonded::<Test>::insert(stash, ctlr);
|
||||
#[allow(deprecated)]
|
||||
Payee::<Test>::insert(stash, RewardDestination::Controller);
|
||||
|
||||
// When:
|
||||
|
||||
let bounded_controllers: BoundedVec<
|
||||
_,
|
||||
<Test as Config>::MaxControllersInDeprecationBatch,
|
||||
> = BoundedVec::try_from(vec![ctlr]).unwrap();
|
||||
|
||||
let result =
|
||||
Staking::deprecate_controller_batch(RuntimeOrigin::root(), bounded_controllers);
|
||||
assert_ok!(result);
|
||||
assert_eq!(
|
||||
result.unwrap().actual_weight.unwrap(),
|
||||
<Test as Config>::WeightInfo::deprecate_controller_batch(1 as u32)
|
||||
);
|
||||
|
||||
// Then:
|
||||
|
||||
// Esure deprecation did not happen.
|
||||
assert_eq!(Ledger::<Test>::get(ctlr).is_some(), true);
|
||||
|
||||
// Bonded still keyed by controller.
|
||||
assert_eq!(Bonded::<Test>::get(stash), Some(ctlr));
|
||||
|
||||
// Ledger is still keyed by controller.
|
||||
let ledger_updated = Ledger::<Test>::get(ctlr).unwrap();
|
||||
assert_eq!(ledger_updated.stash, stash);
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Generated
+223
-184
@@ -18,9 +18,9 @@
|
||||
//! Autogenerated weights for `pallet_staking`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2023-11-27, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! DATE: 2023-12-10, 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`
|
||||
//! HOSTNAME: `runner-itmxxexx-project-674-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: `1024`
|
||||
|
||||
// Executed Command:
|
||||
@@ -66,6 +66,7 @@ pub trait WeightInfo {
|
||||
fn force_new_era() -> Weight;
|
||||
fn force_new_era_always() -> Weight;
|
||||
fn set_invulnerables(v: u32, ) -> Weight;
|
||||
fn deprecate_controller_batch(i: u32, ) -> Weight;
|
||||
fn force_unstake(s: u32, ) -> Weight;
|
||||
fn cancel_deferred_slash(s: u32, ) -> Weight;
|
||||
fn payout_stakers_alive_staked(n: u32, ) -> Weight;
|
||||
@@ -98,8 +99,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `927`
|
||||
// Estimated: `4764`
|
||||
// Minimum execution time: 42_895_000 picoseconds.
|
||||
Weight::from_parts(44_924_000, 4764)
|
||||
// Minimum execution time: 42_491_000 picoseconds.
|
||||
Weight::from_parts(44_026_000, 4764)
|
||||
.saturating_add(T::DbWeight::get().reads(3_u64))
|
||||
.saturating_add(T::DbWeight::get().writes(4_u64))
|
||||
}
|
||||
@@ -119,8 +120,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `1990`
|
||||
// Estimated: `8877`
|
||||
// Minimum execution time: 87_734_000 picoseconds.
|
||||
Weight::from_parts(90_762_000, 8877)
|
||||
// Minimum execution time: 88_756_000 picoseconds.
|
||||
Weight::from_parts(91_000_000, 8877)
|
||||
.saturating_add(T::DbWeight::get().reads(9_u64))
|
||||
.saturating_add(T::DbWeight::get().writes(7_u64))
|
||||
}
|
||||
@@ -146,8 +147,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `2195`
|
||||
// Estimated: `8877`
|
||||
// Minimum execution time: 90_914_000 picoseconds.
|
||||
Weight::from_parts(94_156_000, 8877)
|
||||
// Minimum execution time: 91_331_000 picoseconds.
|
||||
Weight::from_parts(94_781_000, 8877)
|
||||
.saturating_add(T::DbWeight::get().reads(12_u64))
|
||||
.saturating_add(T::DbWeight::get().writes(7_u64))
|
||||
}
|
||||
@@ -166,10 +167,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `1115`
|
||||
// Estimated: `4764`
|
||||
// Minimum execution time: 43_141_000 picoseconds.
|
||||
Weight::from_parts(45_081_969, 4764)
|
||||
// Standard Error: 1_010
|
||||
.saturating_add(Weight::from_parts(39_539, 0).saturating_mul(s.into()))
|
||||
// Minimum execution time: 42_495_000 picoseconds.
|
||||
Weight::from_parts(44_189_470, 4764)
|
||||
// Standard Error: 1_389
|
||||
.saturating_add(Weight::from_parts(47_484, 0).saturating_mul(s.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(5_u64))
|
||||
.saturating_add(T::DbWeight::get().writes(2_u64))
|
||||
}
|
||||
@@ -206,10 +207,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: 87_743_000 picoseconds.
|
||||
Weight::from_parts(96_983_484, 6248)
|
||||
// Standard Error: 4_271
|
||||
.saturating_add(Weight::from_parts(1_382_993, 0).saturating_mul(s.into()))
|
||||
// Minimum execution time: 89_004_000 picoseconds.
|
||||
Weight::from_parts(96_677_570, 6248)
|
||||
// Standard Error: 4_635
|
||||
.saturating_add(Weight::from_parts(1_387_718, 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 +242,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `1372`
|
||||
// Estimated: `4556`
|
||||
// Minimum execution time: 51_888_000 picoseconds.
|
||||
Weight::from_parts(54_353_000, 4556)
|
||||
// Minimum execution time: 51_532_000 picoseconds.
|
||||
Weight::from_parts(53_308_000, 4556)
|
||||
.saturating_add(T::DbWeight::get().reads(11_u64))
|
||||
.saturating_add(T::DbWeight::get().writes(5_u64))
|
||||
}
|
||||
@@ -255,10 +256,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_944_000 picoseconds.
|
||||
Weight::from_parts(31_116_533, 4556)
|
||||
// Standard Error: 11_848
|
||||
.saturating_add(Weight::from_parts(6_422_601, 0).saturating_mul(k.into()))
|
||||
// Minimum execution time: 28_955_000 picoseconds.
|
||||
Weight::from_parts(29_609_869, 4556)
|
||||
// Standard Error: 6_793
|
||||
.saturating_add(Weight::from_parts(6_412_124, 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 +292,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: 63_921_000 picoseconds.
|
||||
Weight::from_parts(62_662_863, 6248)
|
||||
// Standard Error: 15_071
|
||||
.saturating_add(Weight::from_parts(3_950_084, 0).saturating_mul(n.into()))
|
||||
// Minimum execution time: 64_080_000 picoseconds.
|
||||
Weight::from_parts(61_985_382, 6248)
|
||||
// Standard Error: 13_320
|
||||
.saturating_add(Weight::from_parts(4_030_513, 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 +319,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `1650`
|
||||
// Estimated: `6248`
|
||||
// Minimum execution time: 54_605_000 picoseconds.
|
||||
Weight::from_parts(56_406_000, 6248)
|
||||
// Minimum execution time: 54_194_000 picoseconds.
|
||||
Weight::from_parts(55_578_000, 6248)
|
||||
.saturating_add(T::DbWeight::get().reads(8_u64))
|
||||
.saturating_add(T::DbWeight::get().writes(6_u64))
|
||||
}
|
||||
@@ -333,8 +334,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `902`
|
||||
// Estimated: `4556`
|
||||
// Minimum execution time: 16_826_000 picoseconds.
|
||||
Weight::from_parts(17_326_000, 4556)
|
||||
// Minimum execution time: 16_597_000 picoseconds.
|
||||
Weight::from_parts(16_980_000, 4556)
|
||||
.saturating_add(T::DbWeight::get().reads(2_u64))
|
||||
.saturating_add(T::DbWeight::get().writes(1_u64))
|
||||
}
|
||||
@@ -348,8 +349,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `969`
|
||||
// Estimated: `4556`
|
||||
// Minimum execution time: 20_831_000 picoseconds.
|
||||
Weight::from_parts(21_615_000, 4556)
|
||||
// Minimum execution time: 20_626_000 picoseconds.
|
||||
Weight::from_parts(21_242_000, 4556)
|
||||
.saturating_add(T::DbWeight::get().reads(3_u64))
|
||||
.saturating_add(T::DbWeight::get().writes(1_u64))
|
||||
}
|
||||
@@ -361,8 +362,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `902`
|
||||
// Estimated: `4556`
|
||||
// Minimum execution time: 20_190_000 picoseconds.
|
||||
Weight::from_parts(20_993_000, 4556)
|
||||
// Minimum execution time: 19_972_000 picoseconds.
|
||||
Weight::from_parts(20_470_000, 4556)
|
||||
.saturating_add(T::DbWeight::get().reads(2_u64))
|
||||
.saturating_add(T::DbWeight::get().writes(3_u64))
|
||||
}
|
||||
@@ -372,8 +373,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 2_603_000 picoseconds.
|
||||
Weight::from_parts(2_747_000, 0)
|
||||
// Minimum execution time: 2_571_000 picoseconds.
|
||||
Weight::from_parts(2_720_000, 0)
|
||||
.saturating_add(T::DbWeight::get().writes(1_u64))
|
||||
}
|
||||
/// Storage: `Staking::ForceEra` (r:0 w:1)
|
||||
@@ -382,8 +383,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 8_070_000 picoseconds.
|
||||
Weight::from_parts(8_745_000, 0)
|
||||
// Minimum execution time: 8_056_000 picoseconds.
|
||||
Weight::from_parts(8_413_000, 0)
|
||||
.saturating_add(T::DbWeight::get().writes(1_u64))
|
||||
}
|
||||
/// Storage: `Staking::ForceEra` (r:0 w:1)
|
||||
@@ -392,8 +393,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 7_999_000 picoseconds.
|
||||
Weight::from_parts(8_624_000, 0)
|
||||
// Minimum execution time: 8_162_000 picoseconds.
|
||||
Weight::from_parts(8_497_000, 0)
|
||||
.saturating_add(T::DbWeight::get().writes(1_u64))
|
||||
}
|
||||
/// Storage: `Staking::ForceEra` (r:0 w:1)
|
||||
@@ -402,8 +403,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 8_131_000 picoseconds.
|
||||
Weight::from_parts(8_467_000, 0)
|
||||
// Minimum execution time: 8_320_000 picoseconds.
|
||||
Weight::from_parts(8_564_000, 0)
|
||||
.saturating_add(T::DbWeight::get().writes(1_u64))
|
||||
}
|
||||
/// Storage: `Staking::Invulnerables` (r:0 w:1)
|
||||
@@ -413,12 +414,31 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 2_731_000 picoseconds.
|
||||
Weight::from_parts(3_298_421, 0)
|
||||
// Standard Error: 31
|
||||
.saturating_add(Weight::from_parts(10_075, 0).saturating_mul(v.into()))
|
||||
// Minimum execution time: 2_470_000 picoseconds.
|
||||
Weight::from_parts(3_110_242, 0)
|
||||
// Standard Error: 63
|
||||
.saturating_add(Weight::from_parts(11_786, 0).saturating_mul(v.into()))
|
||||
.saturating_add(T::DbWeight::get().writes(1_u64))
|
||||
}
|
||||
/// Storage: `Staking::Ledger` (r:5900 w:11800)
|
||||
/// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Staking::Payee` (r:5900 w:0)
|
||||
/// Proof: `Staking::Payee` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Staking::Bonded` (r:0 w:5900)
|
||||
/// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
|
||||
/// The range of component `i` is `[0, 5900]`.
|
||||
fn deprecate_controller_batch(i: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `1356 + i * (151 ±0)`
|
||||
// Estimated: `990 + i * (3566 ±0)`
|
||||
// Minimum execution time: 2_101_000 picoseconds.
|
||||
Weight::from_parts(2_238_000, 990)
|
||||
// Standard Error: 56_753
|
||||
.saturating_add(Weight::from_parts(18_404_902, 0).saturating_mul(i.into()))
|
||||
.saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(i.into())))
|
||||
.saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(i.into())))
|
||||
.saturating_add(Weight::from_parts(0, 3566).saturating_mul(i.into()))
|
||||
}
|
||||
/// Storage: `Staking::SlashingSpans` (r:1 w:1)
|
||||
/// Proof: `Staking::SlashingSpans` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `Staking::Bonded` (r:1 w:1)
|
||||
@@ -452,10 +472,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_305_000 picoseconds.
|
||||
Weight::from_parts(94_494_401, 6248)
|
||||
// Standard Error: 3_602
|
||||
.saturating_add(Weight::from_parts(1_339_477, 0).saturating_mul(s.into()))
|
||||
// Minimum execution time: 86_765_000 picoseconds.
|
||||
Weight::from_parts(95_173_565, 6248)
|
||||
// Standard Error: 4_596
|
||||
.saturating_add(Weight::from_parts(1_354_849, 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())))
|
||||
@@ -468,10 +488,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `66672`
|
||||
// Estimated: `70137`
|
||||
// Minimum execution time: 100_007_000 picoseconds.
|
||||
Weight::from_parts(894_033_025, 70137)
|
||||
// Standard Error: 57_584
|
||||
.saturating_add(Weight::from_parts(4_870_504, 0).saturating_mul(s.into()))
|
||||
// Minimum execution time: 104_490_000 picoseconds.
|
||||
Weight::from_parts(1_162_956_951, 70137)
|
||||
// Standard Error: 76_760
|
||||
.saturating_add(Weight::from_parts(6_485_569, 0).saturating_mul(s.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(1_u64))
|
||||
.saturating_add(T::DbWeight::get().writes(1_u64))
|
||||
}
|
||||
@@ -508,10 +528,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `33297 + n * (377 ±0)`
|
||||
// Estimated: `30944 + n * (3774 ±0)`
|
||||
// Minimum execution time: 142_575_000 picoseconds.
|
||||
Weight::from_parts(196_320_577, 30944)
|
||||
// Standard Error: 29_330
|
||||
.saturating_add(Weight::from_parts(45_325_062, 0).saturating_mul(n.into()))
|
||||
// Minimum execution time: 144_790_000 picoseconds.
|
||||
Weight::from_parts(36_764_791, 30944)
|
||||
// Standard Error: 89_592
|
||||
.saturating_add(Weight::from_parts(49_620_105, 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))
|
||||
@@ -535,10 +555,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_113_000 picoseconds.
|
||||
Weight::from_parts(84_470_927, 8877)
|
||||
// Standard Error: 5_588
|
||||
.saturating_add(Weight::from_parts(97_606, 0).saturating_mul(l.into()))
|
||||
// Minimum execution time: 81_768_000 picoseconds.
|
||||
Weight::from_parts(85_332_982, 8877)
|
||||
// Standard Error: 5_380
|
||||
.saturating_add(Weight::from_parts(70_298, 0).saturating_mul(l.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(9_u64))
|
||||
.saturating_add(T::DbWeight::get().writes(7_u64))
|
||||
}
|
||||
@@ -573,10 +593,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: 94_810_000 picoseconds.
|
||||
Weight::from_parts(99_292_156, 6248)
|
||||
// Standard Error: 3_677
|
||||
.saturating_add(Weight::from_parts(1_345_598, 0).saturating_mul(s.into()))
|
||||
// Minimum execution time: 96_123_000 picoseconds.
|
||||
Weight::from_parts(100_278_672, 6248)
|
||||
// Standard Error: 3_487
|
||||
.saturating_add(Weight::from_parts(1_326_503, 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())))
|
||||
@@ -621,13 +641,13 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
fn new_era(v: u32, n: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0 + n * (720 ±0) + v * (3598 ±0)`
|
||||
// Estimated: `512390 + n * (3566 ±4) + v * (3566 ±40)`
|
||||
// Minimum execution time: 583_230_000 picoseconds.
|
||||
Weight::from_parts(585_794_000, 512390)
|
||||
// Standard Error: 1_984_644
|
||||
.saturating_add(Weight::from_parts(65_914_551, 0).saturating_mul(v.into()))
|
||||
// Standard Error: 197_758
|
||||
.saturating_add(Weight::from_parts(18_105_424, 0).saturating_mul(n.into()))
|
||||
// Estimated: `512390 + n * (3566 ±0) + v * (3566 ±0)`
|
||||
// Minimum execution time: 572_893_000 picoseconds.
|
||||
Weight::from_parts(578_010_000, 512390)
|
||||
// Standard Error: 2_094_268
|
||||
.saturating_add(Weight::from_parts(68_419_710, 0).saturating_mul(v.into()))
|
||||
// Standard Error: 208_682
|
||||
.saturating_add(Weight::from_parts(18_826_175, 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())))
|
||||
@@ -658,12 +678,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: 33_312_958_000 picoseconds.
|
||||
Weight::from_parts(4_949_866_209, 512390)
|
||||
// Standard Error: 402_931
|
||||
.saturating_add(Weight::from_parts(16_448_367, 0).saturating_mul(v.into()))
|
||||
// Standard Error: 402_931
|
||||
.saturating_add(Weight::from_parts(25_361_503, 0).saturating_mul(n.into()))
|
||||
// Minimum execution time: 33_836_205_000 picoseconds.
|
||||
Weight::from_parts(34_210_443_000, 512390)
|
||||
// Standard Error: 441_692
|
||||
.saturating_add(Weight::from_parts(6_122_533, 0).saturating_mul(v.into()))
|
||||
// Standard Error: 441_692
|
||||
.saturating_add(Weight::from_parts(4_418_264, 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())))
|
||||
@@ -680,10 +700,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_474_646_000 picoseconds.
|
||||
Weight::from_parts(2_512_113_000, 3510)
|
||||
// Standard Error: 33_996
|
||||
.saturating_add(Weight::from_parts(1_992_173, 0).saturating_mul(v.into()))
|
||||
// Minimum execution time: 2_454_689_000 picoseconds.
|
||||
Weight::from_parts(161_771_064, 3510)
|
||||
// Standard Error: 31_022
|
||||
.saturating_add(Weight::from_parts(4_820_158, 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()))
|
||||
@@ -704,8 +724,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 5_466_000 picoseconds.
|
||||
Weight::from_parts(5_861_000, 0)
|
||||
// Minimum execution time: 5_073_000 picoseconds.
|
||||
Weight::from_parts(5_452_000, 0)
|
||||
.saturating_add(T::DbWeight::get().writes(6_u64))
|
||||
}
|
||||
/// Storage: `Staking::MinCommission` (r:0 w:1)
|
||||
@@ -724,8 +744,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 4_780_000 picoseconds.
|
||||
Weight::from_parts(4_998_000, 0)
|
||||
// Minimum execution time: 4_465_000 picoseconds.
|
||||
Weight::from_parts(4_832_000, 0)
|
||||
.saturating_add(T::DbWeight::get().writes(6_u64))
|
||||
}
|
||||
/// Storage: `Staking::Bonded` (r:1 w:0)
|
||||
@@ -754,8 +774,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `1939`
|
||||
// Estimated: `6248`
|
||||
// Minimum execution time: 71_261_000 picoseconds.
|
||||
Weight::from_parts(72_778_000, 6248)
|
||||
// Minimum execution time: 71_239_000 picoseconds.
|
||||
Weight::from_parts(74_649_000, 6248)
|
||||
.saturating_add(T::DbWeight::get().reads(12_u64))
|
||||
.saturating_add(T::DbWeight::get().writes(6_u64))
|
||||
}
|
||||
@@ -767,8 +787,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(13_049_000, 3510)
|
||||
// Minimum execution time: 12_525_000 picoseconds.
|
||||
Weight::from_parts(13_126_000, 3510)
|
||||
.saturating_add(T::DbWeight::get().reads(2_u64))
|
||||
.saturating_add(T::DbWeight::get().writes(1_u64))
|
||||
}
|
||||
@@ -778,8 +798,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 3_044_000 picoseconds.
|
||||
Weight::from_parts(3_278_000, 0)
|
||||
// Minimum execution time: 2_918_000 picoseconds.
|
||||
Weight::from_parts(3_176_000, 0)
|
||||
.saturating_add(T::DbWeight::get().writes(1_u64))
|
||||
}
|
||||
}
|
||||
@@ -800,8 +820,8 @@ impl WeightInfo for () {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `927`
|
||||
// Estimated: `4764`
|
||||
// Minimum execution time: 42_895_000 picoseconds.
|
||||
Weight::from_parts(44_924_000, 4764)
|
||||
// Minimum execution time: 42_491_000 picoseconds.
|
||||
Weight::from_parts(44_026_000, 4764)
|
||||
.saturating_add(RocksDbWeight::get().reads(3_u64))
|
||||
.saturating_add(RocksDbWeight::get().writes(4_u64))
|
||||
}
|
||||
@@ -821,8 +841,8 @@ impl WeightInfo for () {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `1990`
|
||||
// Estimated: `8877`
|
||||
// Minimum execution time: 87_734_000 picoseconds.
|
||||
Weight::from_parts(90_762_000, 8877)
|
||||
// Minimum execution time: 88_756_000 picoseconds.
|
||||
Weight::from_parts(91_000_000, 8877)
|
||||
.saturating_add(RocksDbWeight::get().reads(9_u64))
|
||||
.saturating_add(RocksDbWeight::get().writes(7_u64))
|
||||
}
|
||||
@@ -848,8 +868,8 @@ impl WeightInfo for () {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `2195`
|
||||
// Estimated: `8877`
|
||||
// Minimum execution time: 90_914_000 picoseconds.
|
||||
Weight::from_parts(94_156_000, 8877)
|
||||
// Minimum execution time: 91_331_000 picoseconds.
|
||||
Weight::from_parts(94_781_000, 8877)
|
||||
.saturating_add(RocksDbWeight::get().reads(12_u64))
|
||||
.saturating_add(RocksDbWeight::get().writes(7_u64))
|
||||
}
|
||||
@@ -868,10 +888,10 @@ impl WeightInfo for () {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `1115`
|
||||
// Estimated: `4764`
|
||||
// Minimum execution time: 43_141_000 picoseconds.
|
||||
Weight::from_parts(45_081_969, 4764)
|
||||
// Standard Error: 1_010
|
||||
.saturating_add(Weight::from_parts(39_539, 0).saturating_mul(s.into()))
|
||||
// Minimum execution time: 42_495_000 picoseconds.
|
||||
Weight::from_parts(44_189_470, 4764)
|
||||
// Standard Error: 1_389
|
||||
.saturating_add(Weight::from_parts(47_484, 0).saturating_mul(s.into()))
|
||||
.saturating_add(RocksDbWeight::get().reads(5_u64))
|
||||
.saturating_add(RocksDbWeight::get().writes(2_u64))
|
||||
}
|
||||
@@ -908,10 +928,10 @@ impl WeightInfo for () {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `2196 + s * (4 ±0)`
|
||||
// Estimated: `6248 + s * (4 ±0)`
|
||||
// Minimum execution time: 87_743_000 picoseconds.
|
||||
Weight::from_parts(96_983_484, 6248)
|
||||
// Standard Error: 4_271
|
||||
.saturating_add(Weight::from_parts(1_382_993, 0).saturating_mul(s.into()))
|
||||
// Minimum execution time: 89_004_000 picoseconds.
|
||||
Weight::from_parts(96_677_570, 6248)
|
||||
// Standard Error: 4_635
|
||||
.saturating_add(Weight::from_parts(1_387_718, 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())))
|
||||
@@ -943,8 +963,8 @@ impl WeightInfo for () {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `1372`
|
||||
// Estimated: `4556`
|
||||
// Minimum execution time: 51_888_000 picoseconds.
|
||||
Weight::from_parts(54_353_000, 4556)
|
||||
// Minimum execution time: 51_532_000 picoseconds.
|
||||
Weight::from_parts(53_308_000, 4556)
|
||||
.saturating_add(RocksDbWeight::get().reads(11_u64))
|
||||
.saturating_add(RocksDbWeight::get().writes(5_u64))
|
||||
}
|
||||
@@ -957,10 +977,10 @@ impl WeightInfo for () {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `1280 + k * (569 ±0)`
|
||||
// Estimated: `4556 + k * (3033 ±0)`
|
||||
// Minimum execution time: 28_944_000 picoseconds.
|
||||
Weight::from_parts(31_116_533, 4556)
|
||||
// Standard Error: 11_848
|
||||
.saturating_add(Weight::from_parts(6_422_601, 0).saturating_mul(k.into()))
|
||||
// Minimum execution time: 28_955_000 picoseconds.
|
||||
Weight::from_parts(29_609_869, 4556)
|
||||
// Standard Error: 6_793
|
||||
.saturating_add(Weight::from_parts(6_412_124, 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())))
|
||||
@@ -993,10 +1013,10 @@ impl WeightInfo for () {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `1866 + n * (102 ±0)`
|
||||
// Estimated: `6248 + n * (2520 ±0)`
|
||||
// Minimum execution time: 63_921_000 picoseconds.
|
||||
Weight::from_parts(62_662_863, 6248)
|
||||
// Standard Error: 15_071
|
||||
.saturating_add(Weight::from_parts(3_950_084, 0).saturating_mul(n.into()))
|
||||
// Minimum execution time: 64_080_000 picoseconds.
|
||||
Weight::from_parts(61_985_382, 6248)
|
||||
// Standard Error: 13_320
|
||||
.saturating_add(Weight::from_parts(4_030_513, 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))
|
||||
@@ -1020,8 +1040,8 @@ impl WeightInfo for () {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `1650`
|
||||
// Estimated: `6248`
|
||||
// Minimum execution time: 54_605_000 picoseconds.
|
||||
Weight::from_parts(56_406_000, 6248)
|
||||
// Minimum execution time: 54_194_000 picoseconds.
|
||||
Weight::from_parts(55_578_000, 6248)
|
||||
.saturating_add(RocksDbWeight::get().reads(8_u64))
|
||||
.saturating_add(RocksDbWeight::get().writes(6_u64))
|
||||
}
|
||||
@@ -1035,8 +1055,8 @@ impl WeightInfo for () {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `902`
|
||||
// Estimated: `4556`
|
||||
// Minimum execution time: 16_826_000 picoseconds.
|
||||
Weight::from_parts(17_326_000, 4556)
|
||||
// Minimum execution time: 16_597_000 picoseconds.
|
||||
Weight::from_parts(16_980_000, 4556)
|
||||
.saturating_add(RocksDbWeight::get().reads(2_u64))
|
||||
.saturating_add(RocksDbWeight::get().writes(1_u64))
|
||||
}
|
||||
@@ -1050,8 +1070,8 @@ impl WeightInfo for () {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `969`
|
||||
// Estimated: `4556`
|
||||
// Minimum execution time: 20_831_000 picoseconds.
|
||||
Weight::from_parts(21_615_000, 4556)
|
||||
// Minimum execution time: 20_626_000 picoseconds.
|
||||
Weight::from_parts(21_242_000, 4556)
|
||||
.saturating_add(RocksDbWeight::get().reads(3_u64))
|
||||
.saturating_add(RocksDbWeight::get().writes(1_u64))
|
||||
}
|
||||
@@ -1063,8 +1083,8 @@ impl WeightInfo for () {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `902`
|
||||
// Estimated: `4556`
|
||||
// Minimum execution time: 20_190_000 picoseconds.
|
||||
Weight::from_parts(20_993_000, 4556)
|
||||
// Minimum execution time: 19_972_000 picoseconds.
|
||||
Weight::from_parts(20_470_000, 4556)
|
||||
.saturating_add(RocksDbWeight::get().reads(2_u64))
|
||||
.saturating_add(RocksDbWeight::get().writes(3_u64))
|
||||
}
|
||||
@@ -1074,8 +1094,8 @@ impl WeightInfo for () {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 2_603_000 picoseconds.
|
||||
Weight::from_parts(2_747_000, 0)
|
||||
// Minimum execution time: 2_571_000 picoseconds.
|
||||
Weight::from_parts(2_720_000, 0)
|
||||
.saturating_add(RocksDbWeight::get().writes(1_u64))
|
||||
}
|
||||
/// Storage: `Staking::ForceEra` (r:0 w:1)
|
||||
@@ -1084,8 +1104,8 @@ impl WeightInfo for () {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 8_070_000 picoseconds.
|
||||
Weight::from_parts(8_745_000, 0)
|
||||
// Minimum execution time: 8_056_000 picoseconds.
|
||||
Weight::from_parts(8_413_000, 0)
|
||||
.saturating_add(RocksDbWeight::get().writes(1_u64))
|
||||
}
|
||||
/// Storage: `Staking::ForceEra` (r:0 w:1)
|
||||
@@ -1094,8 +1114,8 @@ impl WeightInfo for () {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 7_999_000 picoseconds.
|
||||
Weight::from_parts(8_624_000, 0)
|
||||
// Minimum execution time: 8_162_000 picoseconds.
|
||||
Weight::from_parts(8_497_000, 0)
|
||||
.saturating_add(RocksDbWeight::get().writes(1_u64))
|
||||
}
|
||||
/// Storage: `Staking::ForceEra` (r:0 w:1)
|
||||
@@ -1104,8 +1124,8 @@ impl WeightInfo for () {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 8_131_000 picoseconds.
|
||||
Weight::from_parts(8_467_000, 0)
|
||||
// Minimum execution time: 8_320_000 picoseconds.
|
||||
Weight::from_parts(8_564_000, 0)
|
||||
.saturating_add(RocksDbWeight::get().writes(1_u64))
|
||||
}
|
||||
/// Storage: `Staking::Invulnerables` (r:0 w:1)
|
||||
@@ -1115,12 +1135,31 @@ impl WeightInfo for () {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 2_731_000 picoseconds.
|
||||
Weight::from_parts(3_298_421, 0)
|
||||
// Standard Error: 31
|
||||
.saturating_add(Weight::from_parts(10_075, 0).saturating_mul(v.into()))
|
||||
// Minimum execution time: 2_470_000 picoseconds.
|
||||
Weight::from_parts(3_110_242, 0)
|
||||
// Standard Error: 63
|
||||
.saturating_add(Weight::from_parts(11_786, 0).saturating_mul(v.into()))
|
||||
.saturating_add(RocksDbWeight::get().writes(1_u64))
|
||||
}
|
||||
/// Storage: `Staking::Ledger` (r:5900 w:11800)
|
||||
/// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Staking::Payee` (r:5900 w:0)
|
||||
/// Proof: `Staking::Payee` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Staking::Bonded` (r:0 w:5900)
|
||||
/// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
|
||||
/// The range of component `i` is `[0, 5900]`.
|
||||
fn deprecate_controller_batch(i: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `1356 + i * (151 ±0)`
|
||||
// Estimated: `990 + i * (3566 ±0)`
|
||||
// Minimum execution time: 2_101_000 picoseconds.
|
||||
Weight::from_parts(2_238_000, 990)
|
||||
// Standard Error: 56_753
|
||||
.saturating_add(Weight::from_parts(18_404_902, 0).saturating_mul(i.into()))
|
||||
.saturating_add(RocksDbWeight::get().reads((2_u64).saturating_mul(i.into())))
|
||||
.saturating_add(RocksDbWeight::get().writes((3_u64).saturating_mul(i.into())))
|
||||
.saturating_add(Weight::from_parts(0, 3566).saturating_mul(i.into()))
|
||||
}
|
||||
/// Storage: `Staking::SlashingSpans` (r:1 w:1)
|
||||
/// Proof: `Staking::SlashingSpans` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `Staking::Bonded` (r:1 w:1)
|
||||
@@ -1154,10 +1193,10 @@ impl WeightInfo for () {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `2196 + s * (4 ±0)`
|
||||
// Estimated: `6248 + s * (4 ±0)`
|
||||
// Minimum execution time: 86_305_000 picoseconds.
|
||||
Weight::from_parts(94_494_401, 6248)
|
||||
// Standard Error: 3_602
|
||||
.saturating_add(Weight::from_parts(1_339_477, 0).saturating_mul(s.into()))
|
||||
// Minimum execution time: 86_765_000 picoseconds.
|
||||
Weight::from_parts(95_173_565, 6248)
|
||||
// Standard Error: 4_596
|
||||
.saturating_add(Weight::from_parts(1_354_849, 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())))
|
||||
@@ -1170,10 +1209,10 @@ impl WeightInfo for () {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `66672`
|
||||
// Estimated: `70137`
|
||||
// Minimum execution time: 100_007_000 picoseconds.
|
||||
Weight::from_parts(894_033_025, 70137)
|
||||
// Standard Error: 57_584
|
||||
.saturating_add(Weight::from_parts(4_870_504, 0).saturating_mul(s.into()))
|
||||
// Minimum execution time: 104_490_000 picoseconds.
|
||||
Weight::from_parts(1_162_956_951, 70137)
|
||||
// Standard Error: 76_760
|
||||
.saturating_add(Weight::from_parts(6_485_569, 0).saturating_mul(s.into()))
|
||||
.saturating_add(RocksDbWeight::get().reads(1_u64))
|
||||
.saturating_add(RocksDbWeight::get().writes(1_u64))
|
||||
}
|
||||
@@ -1210,10 +1249,10 @@ impl WeightInfo for () {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `33297 + n * (377 ±0)`
|
||||
// Estimated: `30944 + n * (3774 ±0)`
|
||||
// Minimum execution time: 142_575_000 picoseconds.
|
||||
Weight::from_parts(196_320_577, 30944)
|
||||
// Standard Error: 29_330
|
||||
.saturating_add(Weight::from_parts(45_325_062, 0).saturating_mul(n.into()))
|
||||
// Minimum execution time: 144_790_000 picoseconds.
|
||||
Weight::from_parts(36_764_791, 30944)
|
||||
// Standard Error: 89_592
|
||||
.saturating_add(Weight::from_parts(49_620_105, 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))
|
||||
@@ -1237,10 +1276,10 @@ impl WeightInfo for () {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `1991 + l * (7 ±0)`
|
||||
// Estimated: `8877`
|
||||
// Minimum execution time: 81_113_000 picoseconds.
|
||||
Weight::from_parts(84_470_927, 8877)
|
||||
// Standard Error: 5_588
|
||||
.saturating_add(Weight::from_parts(97_606, 0).saturating_mul(l.into()))
|
||||
// Minimum execution time: 81_768_000 picoseconds.
|
||||
Weight::from_parts(85_332_982, 8877)
|
||||
// Standard Error: 5_380
|
||||
.saturating_add(Weight::from_parts(70_298, 0).saturating_mul(l.into()))
|
||||
.saturating_add(RocksDbWeight::get().reads(9_u64))
|
||||
.saturating_add(RocksDbWeight::get().writes(7_u64))
|
||||
}
|
||||
@@ -1275,10 +1314,10 @@ impl WeightInfo for () {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `2196 + s * (4 ±0)`
|
||||
// Estimated: `6248 + s * (4 ±0)`
|
||||
// Minimum execution time: 94_810_000 picoseconds.
|
||||
Weight::from_parts(99_292_156, 6248)
|
||||
// Standard Error: 3_677
|
||||
.saturating_add(Weight::from_parts(1_345_598, 0).saturating_mul(s.into()))
|
||||
// Minimum execution time: 96_123_000 picoseconds.
|
||||
Weight::from_parts(100_278_672, 6248)
|
||||
// Standard Error: 3_487
|
||||
.saturating_add(Weight::from_parts(1_326_503, 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())))
|
||||
@@ -1323,13 +1362,13 @@ impl WeightInfo for () {
|
||||
fn new_era(v: u32, n: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0 + n * (720 ±0) + v * (3598 ±0)`
|
||||
// Estimated: `512390 + n * (3566 ±4) + v * (3566 ±40)`
|
||||
// Minimum execution time: 583_230_000 picoseconds.
|
||||
Weight::from_parts(585_794_000, 512390)
|
||||
// Standard Error: 1_984_644
|
||||
.saturating_add(Weight::from_parts(65_914_551, 0).saturating_mul(v.into()))
|
||||
// Standard Error: 197_758
|
||||
.saturating_add(Weight::from_parts(18_105_424, 0).saturating_mul(n.into()))
|
||||
// Estimated: `512390 + n * (3566 ±0) + v * (3566 ±0)`
|
||||
// Minimum execution time: 572_893_000 picoseconds.
|
||||
Weight::from_parts(578_010_000, 512390)
|
||||
// Standard Error: 2_094_268
|
||||
.saturating_add(Weight::from_parts(68_419_710, 0).saturating_mul(v.into()))
|
||||
// Standard Error: 208_682
|
||||
.saturating_add(Weight::from_parts(18_826_175, 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())))
|
||||
@@ -1360,12 +1399,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: 33_312_958_000 picoseconds.
|
||||
Weight::from_parts(4_949_866_209, 512390)
|
||||
// Standard Error: 402_931
|
||||
.saturating_add(Weight::from_parts(16_448_367, 0).saturating_mul(v.into()))
|
||||
// Standard Error: 402_931
|
||||
.saturating_add(Weight::from_parts(25_361_503, 0).saturating_mul(n.into()))
|
||||
// Minimum execution time: 33_836_205_000 picoseconds.
|
||||
Weight::from_parts(34_210_443_000, 512390)
|
||||
// Standard Error: 441_692
|
||||
.saturating_add(Weight::from_parts(6_122_533, 0).saturating_mul(v.into()))
|
||||
// Standard Error: 441_692
|
||||
.saturating_add(Weight::from_parts(4_418_264, 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())))
|
||||
@@ -1382,10 +1421,10 @@ impl WeightInfo for () {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `979 + v * (50 ±0)`
|
||||
// Estimated: `3510 + v * (2520 ±0)`
|
||||
// Minimum execution time: 2_474_646_000 picoseconds.
|
||||
Weight::from_parts(2_512_113_000, 3510)
|
||||
// Standard Error: 33_996
|
||||
.saturating_add(Weight::from_parts(1_992_173, 0).saturating_mul(v.into()))
|
||||
// Minimum execution time: 2_454_689_000 picoseconds.
|
||||
Weight::from_parts(161_771_064, 3510)
|
||||
// Standard Error: 31_022
|
||||
.saturating_add(Weight::from_parts(4_820_158, 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()))
|
||||
@@ -1406,8 +1445,8 @@ impl WeightInfo for () {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 5_466_000 picoseconds.
|
||||
Weight::from_parts(5_861_000, 0)
|
||||
// Minimum execution time: 5_073_000 picoseconds.
|
||||
Weight::from_parts(5_452_000, 0)
|
||||
.saturating_add(RocksDbWeight::get().writes(6_u64))
|
||||
}
|
||||
/// Storage: `Staking::MinCommission` (r:0 w:1)
|
||||
@@ -1426,8 +1465,8 @@ impl WeightInfo for () {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 4_780_000 picoseconds.
|
||||
Weight::from_parts(4_998_000, 0)
|
||||
// Minimum execution time: 4_465_000 picoseconds.
|
||||
Weight::from_parts(4_832_000, 0)
|
||||
.saturating_add(RocksDbWeight::get().writes(6_u64))
|
||||
}
|
||||
/// Storage: `Staking::Bonded` (r:1 w:0)
|
||||
@@ -1456,8 +1495,8 @@ impl WeightInfo for () {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `1939`
|
||||
// Estimated: `6248`
|
||||
// Minimum execution time: 71_261_000 picoseconds.
|
||||
Weight::from_parts(72_778_000, 6248)
|
||||
// Minimum execution time: 71_239_000 picoseconds.
|
||||
Weight::from_parts(74_649_000, 6248)
|
||||
.saturating_add(RocksDbWeight::get().reads(12_u64))
|
||||
.saturating_add(RocksDbWeight::get().writes(6_u64))
|
||||
}
|
||||
@@ -1469,8 +1508,8 @@ impl WeightInfo for () {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `691`
|
||||
// Estimated: `3510`
|
||||
// Minimum execution time: 12_497_000 picoseconds.
|
||||
Weight::from_parts(13_049_000, 3510)
|
||||
// Minimum execution time: 12_525_000 picoseconds.
|
||||
Weight::from_parts(13_126_000, 3510)
|
||||
.saturating_add(RocksDbWeight::get().reads(2_u64))
|
||||
.saturating_add(RocksDbWeight::get().writes(1_u64))
|
||||
}
|
||||
@@ -1480,8 +1519,8 @@ impl WeightInfo for () {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 3_044_000 picoseconds.
|
||||
Weight::from_parts(3_278_000, 0)
|
||||
// Minimum execution time: 2_918_000 picoseconds.
|
||||
Weight::from_parts(3_176_000, 0)
|
||||
.saturating_add(RocksDbWeight::get().writes(1_u64))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user