Skip to content

Commit

Permalink
Revert changes in Kusama runtime causing bench test failure (#8)
Browse files Browse the repository at this point in the history
* revert delegate stake configuration in kusama

* update pool migrating max count
  • Loading branch information
Ank4n authored Nov 22, 2024
1 parent adc262e commit 0cc2571
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 18 deletions.
17 changes: 2 additions & 15 deletions relay/kusama/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -807,7 +807,7 @@ impl pallet_staking::Config for Runtime {
type HistoryDepth = frame_support::traits::ConstU32<84>;
type MaxControllersInDeprecationBatch = ConstU32<5169>;
type BenchmarkingConfig = polkadot_runtime_common::StakingBenchmarkingConfig;
type EventListeners = (NominationPools, DelegatedStaking);
type EventListeners = NominationPools;
type DisablingStrategy = pallet_staking::UpToLimitDisablingStrategy;
type WeightInfo = weights::pallet_staking::WeightInfo<Runtime>;
}
Expand Down Expand Up @@ -1615,8 +1615,7 @@ impl pallet_nomination_pools::Config for Runtime {
type RewardCounter = FixedU128;
type BalanceToU256 = BalanceToU256;
type U256ToBalance = U256ToBalance;
type StakeAdapter =
pallet_nomination_pools::adapter::DelegateStake<Self, Staking, DelegatedStaking>;
type StakeAdapter = pallet_nomination_pools::adapter::TransferStake<Self, Staking>;
type PostUnbondingPoolsWindow = ConstU32<4>;
type MaxMetadataLen = ConstU32<256>;
// we use the same number of allowed unlocking chunks as with staking.
Expand Down Expand Up @@ -1831,13 +1830,6 @@ impl Get<Perbill> for NominationPoolsMigrationV4OldPallet {
}
}

parameter_types! {
// This is used to limit max pools that migrates in the runtime upgrade. This is set to
// existing_pool_count plus ~15 to also account for any new pools getting created before the
// migration is actually executed.
pub const MaxPoolsToMigrate: u32 = 200;
}

/// All migrations that will run on the next runtime upgrade.
///
/// This contains the combined migrations of the last 10 releases. It allows to skip runtime
Expand All @@ -1856,11 +1848,6 @@ pub mod migrations {
parachains_inclusion::migration::MigrateToV1<Runtime>,
parachains_on_demand::migration::MigrateV0ToV1<Runtime>,
restore_corrupted_ledgers::Migrate<Runtime>,
// Migrate NominationPools to `DelegateStake` adapter. This is an unversioned upgrade.
pallet_nomination_pools::migration::unversioned::DelegationStakeMigration<
Runtime,
MaxPoolsToMigrate,
>,
);

/// Migrations/checks that do not need to be versioned and can run on every update.
Expand Down
6 changes: 3 additions & 3 deletions relay/polkadot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2059,10 +2059,10 @@ pub mod migrations {
}

parameter_types! {
// This is used to limit max pools that migrates in the runtime upgrade. This is set to
// existing_pool_count plus ~15 to also account for any new pools getting created before the
// This is used to bound number of pools migrating in the runtime upgrade. This is set to
// ~existing_pool_count * 2 to also account for any new pools getting created before the
// migration is actually executed.
pub const MaxPoolsToMigrate: u32 = 250;
pub const MaxPoolsToMigrate: u32 = 500;
}

/// Unreleased migrations. Add new ones here:
Expand Down

0 comments on commit 0cc2571

Please sign in to comment.