mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 14:01:02 +00:00
[Companion] Get rid of HistoryDepth storage (#5996)
* remove history depth from storage and add it as config for pallet staking * add migration to v11 for staking pallet * revert local substrate dependency patch * remove history depth from storage and add it as config for pallet staking * add migration to v11 for staking pallet * revert local substrate dependency patch * update substrate dependencies * update cargo lock * update to latest substrate * revert all changes to Cargo.lock * cargo update -p sp-io * mark migration job as failable Co-authored-by: kianenigma <kian@parity.io>
This commit is contained in:
@@ -651,6 +651,7 @@ check-runtime-migration:
|
||||
else
|
||||
echo "runtimemigration label not found. Skipping"
|
||||
fi
|
||||
allow_failure: true
|
||||
|
||||
|
||||
check-no-default-features:
|
||||
|
||||
Generated
+230
-222
File diff suppressed because it is too large
Load Diff
@@ -615,6 +615,7 @@ impl pallet_staking::Config for Runtime {
|
||||
type VoterList = VoterList;
|
||||
type TargetList = UseValidatorsMap<Self>;
|
||||
type MaxUnlockingChunks = frame_support::traits::ConstU32<32>;
|
||||
type HistoryDepth = frame_support::traits::ConstU32<84>;
|
||||
type BenchmarkingConfig = runtime_common::StakingBenchmarkingConfig;
|
||||
type OnStakerSlash = NominationPools;
|
||||
type WeightInfo = weights::pallet_staking::WeightInfo<Runtime>;
|
||||
@@ -1460,6 +1461,7 @@ pub type Executive = frame_executive::Executive<
|
||||
VoterList,
|
||||
StakingMigrationV11OldPallet,
|
||||
>,
|
||||
pallet_staking::migrations::v12::MigrateToV12<Runtime>,
|
||||
),
|
||||
>;
|
||||
/// The payload being signed in the transactions.
|
||||
|
||||
@@ -297,24 +297,6 @@ impl<T: frame_system::Config> pallet_staking::WeightInfo for WeightInfo<T> {
|
||||
.saturating_add(T::DbWeight::get().reads(9 as u64))
|
||||
.saturating_add(T::DbWeight::get().writes(8 as u64))
|
||||
}
|
||||
// Storage: Staking CurrentEra (r:1 w:0)
|
||||
// Storage: Staking HistoryDepth (r:1 w:1)
|
||||
// Storage: Staking ErasStakersClipped (r:0 w:2)
|
||||
// Storage: Staking ErasValidatorPrefs (r:0 w:2)
|
||||
// Storage: Staking ErasValidatorReward (r:0 w:1)
|
||||
// Storage: Staking ErasRewardPoints (r:0 w:1)
|
||||
// Storage: Staking ErasStakers (r:0 w:2)
|
||||
// Storage: Staking ErasTotalStake (r:0 w:1)
|
||||
// Storage: Staking ErasStartSessionIndex (r:0 w:1)
|
||||
/// The range of component `e` is `[1, 100]`.
|
||||
fn set_history_depth(e: u32, ) -> Weight {
|
||||
Weight::from_ref_time(0 as u64)
|
||||
// Standard Error: 89_000
|
||||
.saturating_add(Weight::from_ref_time(21_655_000 as u64).saturating_mul(e as u64))
|
||||
.saturating_add(T::DbWeight::get().reads(2 as u64))
|
||||
.saturating_add(T::DbWeight::get().writes(4 as u64))
|
||||
.saturating_add(T::DbWeight::get().writes((7 as u64).saturating_mul(e as u64)))
|
||||
}
|
||||
// Storage: System Account (r:1 w:1)
|
||||
// Storage: Staking Bonded (r:1 w:1)
|
||||
// Storage: Staking Ledger (r:1 w:1)
|
||||
|
||||
@@ -560,6 +560,7 @@ impl pallet_staking::Config for Runtime {
|
||||
type VoterList = VoterList;
|
||||
type TargetList = UseValidatorsMap<Self>;
|
||||
type MaxUnlockingChunks = frame_support::traits::ConstU32<32>;
|
||||
type HistoryDepth = frame_support::traits::ConstU32<84>;
|
||||
type BenchmarkingConfig = runtime_common::StakingBenchmarkingConfig;
|
||||
type OnStakerSlash = NominationPools;
|
||||
type WeightInfo = weights::pallet_staking::WeightInfo<Runtime>;
|
||||
@@ -1543,6 +1544,7 @@ pub type Executive = frame_executive::Executive<
|
||||
VoterList,
|
||||
StakingMigrationV11OldPallet,
|
||||
>,
|
||||
pallet_staking::migrations::v12::MigrateToV12<Runtime>,
|
||||
),
|
||||
>;
|
||||
|
||||
|
||||
@@ -297,24 +297,6 @@ impl<T: frame_system::Config> pallet_staking::WeightInfo for WeightInfo<T> {
|
||||
.saturating_add(T::DbWeight::get().reads(9 as u64))
|
||||
.saturating_add(T::DbWeight::get().writes(8 as u64))
|
||||
}
|
||||
// Storage: Staking CurrentEra (r:1 w:0)
|
||||
// Storage: Staking HistoryDepth (r:1 w:1)
|
||||
// Storage: Staking ErasStakersClipped (r:0 w:2)
|
||||
// Storage: Staking ErasValidatorPrefs (r:0 w:2)
|
||||
// Storage: Staking ErasValidatorReward (r:0 w:1)
|
||||
// Storage: Staking ErasRewardPoints (r:0 w:1)
|
||||
// Storage: Staking ErasStakers (r:0 w:2)
|
||||
// Storage: Staking ErasTotalStake (r:0 w:1)
|
||||
// Storage: Staking ErasStartSessionIndex (r:0 w:1)
|
||||
/// The range of component `e` is `[1, 100]`.
|
||||
fn set_history_depth(e: u32, ) -> Weight {
|
||||
Weight::from_ref_time(0 as u64)
|
||||
// Standard Error: 87_000
|
||||
.saturating_add(Weight::from_ref_time(21_687_000 as u64).saturating_mul(e as u64))
|
||||
.saturating_add(T::DbWeight::get().reads(2 as u64))
|
||||
.saturating_add(T::DbWeight::get().writes(4 as u64))
|
||||
.saturating_add(T::DbWeight::get().writes((7 as u64).saturating_mul(e as u64)))
|
||||
}
|
||||
// Storage: System Account (r:1 w:1)
|
||||
// Storage: Staking Bonded (r:1 w:1)
|
||||
// Storage: Staking Ledger (r:1 w:1)
|
||||
|
||||
@@ -356,6 +356,7 @@ impl pallet_staking::Config for Runtime {
|
||||
type VoterList = pallet_staking::UseNominatorsAndValidatorsMap<Runtime>;
|
||||
type TargetList = pallet_staking::UseValidatorsMap<Runtime>;
|
||||
type MaxUnlockingChunks = frame_support::traits::ConstU32<32>;
|
||||
type HistoryDepth = frame_support::traits::ConstU32<84>;
|
||||
type BenchmarkingConfig = runtime_common::StakingBenchmarkingConfig;
|
||||
type OnStakerSlash = ();
|
||||
type WeightInfo = ();
|
||||
|
||||
@@ -511,6 +511,7 @@ impl pallet_staking::Config for Runtime {
|
||||
type VoterList = VoterList;
|
||||
type TargetList = UseValidatorsMap<Self>;
|
||||
type MaxUnlockingChunks = frame_support::traits::ConstU32<32>;
|
||||
type HistoryDepth = frame_support::traits::ConstU32<84>;
|
||||
type BenchmarkingConfig = runtime_common::StakingBenchmarkingConfig;
|
||||
type OnStakerSlash = NominationPools;
|
||||
type WeightInfo = weights::pallet_staking::WeightInfo<Runtime>;
|
||||
@@ -1200,6 +1201,7 @@ pub type Executive = frame_executive::Executive<
|
||||
StakingMigrationV11OldPallet,
|
||||
>,
|
||||
pallet_nomination_pools::migration::v3::MigrateToV3<Runtime>,
|
||||
pallet_staking::migrations::v12::MigrateToV12<Runtime>,
|
||||
),
|
||||
>;
|
||||
/// The payload being signed in transactions.
|
||||
|
||||
@@ -297,24 +297,6 @@ impl<T: frame_system::Config> pallet_staking::WeightInfo for WeightInfo<T> {
|
||||
.saturating_add(T::DbWeight::get().reads(9 as u64))
|
||||
.saturating_add(T::DbWeight::get().writes(8 as u64))
|
||||
}
|
||||
// Storage: Staking CurrentEra (r:1 w:0)
|
||||
// Storage: Staking HistoryDepth (r:1 w:1)
|
||||
// Storage: Staking ErasStakersClipped (r:0 w:2)
|
||||
// Storage: Staking ErasValidatorPrefs (r:0 w:2)
|
||||
// Storage: Staking ErasValidatorReward (r:0 w:1)
|
||||
// Storage: Staking ErasRewardPoints (r:0 w:1)
|
||||
// Storage: Staking ErasStakers (r:0 w:2)
|
||||
// Storage: Staking ErasTotalStake (r:0 w:1)
|
||||
// Storage: Staking ErasStartSessionIndex (r:0 w:1)
|
||||
/// The range of component `e` is `[1, 100]`.
|
||||
fn set_history_depth(e: u32, ) -> Weight {
|
||||
Weight::from_ref_time(0 as u64)
|
||||
// Standard Error: 86_000
|
||||
.saturating_add(Weight::from_ref_time(21_617_000 as u64).saturating_mul(e as u64))
|
||||
.saturating_add(T::DbWeight::get().reads(2 as u64))
|
||||
.saturating_add(T::DbWeight::get().writes(4 as u64))
|
||||
.saturating_add(T::DbWeight::get().writes((7 as u64).saturating_mul(e as u64)))
|
||||
}
|
||||
// Storage: System Account (r:1 w:1)
|
||||
// Storage: Staking Bonded (r:1 w:1)
|
||||
// Storage: Staking Ledger (r:1 w:1)
|
||||
|
||||
Reference in New Issue
Block a user