From f66b90be3eaab0596c3daec678c7157a50415809 Mon Sep 17 00:00:00 2001 From: joepetrowski Date: Sun, 29 May 2022 21:01:02 +0200 Subject: [PATCH 1/3] remove kusama nomination pools init --- runtime/kusama/src/lib.rs | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/runtime/kusama/src/lib.rs b/runtime/kusama/src/lib.rs index 515bcddcd2fb..371f140cfb15 100644 --- a/runtime/kusama/src/lib.rs +++ b/runtime/kusama/src/lib.rs @@ -1455,32 +1455,6 @@ impl pallet_nomination_pools::Config for Runtime { type MinPointsToBalance = MinPointsToBalance; } -pub struct InitiatePoolConfigs; -impl OnRuntimeUpgrade for InitiatePoolConfigs { - fn on_runtime_upgrade() -> frame_support::weights::Weight { - // we use one as an indicator if this has already been set. - if pallet_nomination_pools::MaxPools::::get().is_none() { - // 1/600 KSM to join a pool. - pallet_nomination_pools::MinJoinBond::::put(50 * CENTS); - // 1 KSM to create a pool. - pallet_nomination_pools::MinCreateBond::::put(UNITS); - - // 128 initial pools: only for initial safety: can be set to infinity when needed. - pallet_nomination_pools::MaxPools::::put(128); - // 64k total pool members: only for initial safety: can be set to infinity when needed. - pallet_nomination_pools::MaxPoolMembers::::put(64 * 1024); - // 1024 members per pool: only for initial safety: can be set to infinity when needed. - pallet_nomination_pools::MaxPoolMembersPerPool::::put(1024); - - log::info!(target: "runtime::kusama", "pools config initiated 🎉"); - ::DbWeight::get().reads_writes(1, 5) - } else { - log::info!(target: "runtime::kusama", "pools config already initiated 😏"); - ::DbWeight::get().reads(1) - } - } -} - construct_runtime! { pub enum Runtime where Block = Block, @@ -1627,7 +1601,6 @@ pub type Executive = frame_executive::Executive< ( RenameBagsListToVoterList, pallet_bags_list::migrations::AddScore, - InitiatePoolConfigs, pallet_nomination_pools::migration::v1::MigrateToV1, ), >; From a8656680f9d3d704cc7d75f39e7aa9bbad44822d Mon Sep 17 00:00:00 2001 From: joepetrowski Date: Mon, 30 May 2022 07:44:19 +0200 Subject: [PATCH 2/3] remove OnRuntimeUpgrade import --- runtime/kusama/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/kusama/src/lib.rs b/runtime/kusama/src/lib.rs index 371f140cfb15..81ee25e3ef06 100644 --- a/runtime/kusama/src/lib.rs +++ b/runtime/kusama/src/lib.rs @@ -53,7 +53,7 @@ use frame_support::{ construct_runtime, parameter_types, traits::{ ConstU32, Contains, EnsureOneOf, InstanceFilter, KeyOwnerProofSystem, LockIdentifier, - OnRuntimeUpgrade, PrivilegeCmp, + PrivilegeCmp, }, weights::ConstantMultiplier, PalletId, RuntimeDebug, From a0dc26b6ef64e70261cc368a0ad167e3f06bdd91 Mon Sep 17 00:00:00 2001 From: joepetrowski Date: Thu, 16 Jun 2022 11:33:04 +0200 Subject: [PATCH 3/3] remove stale migrations from westend --- runtime/westend/src/lib.rs | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/runtime/westend/src/lib.rs b/runtime/westend/src/lib.rs index dcbee5ef7040..8b0c06beb16a 100644 --- a/runtime/westend/src/lib.rs +++ b/runtime/westend/src/lib.rs @@ -1170,30 +1170,11 @@ pub type Executive = frame_executive::Executive< frame_system::ChainContext, Runtime, AllPalletsWithSystem, - ( - RenameBagsListToVoterList, - pallet_bags_list::migrations::AddScore, - pallet_nomination_pools::migration::v1::MigrateToV1, - ), + (), >; /// The payload being signed in transactions. pub type SignedPayload = generic::SignedPayload; -/// A migration which renames the pallet `BagsList` to `VoterList` -pub struct RenameBagsListToVoterList; -impl frame_support::traits::OnRuntimeUpgrade for RenameBagsListToVoterList { - #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result<(), &'static str> { - // For other pre-upgrade checks, we need the storage to already be migrated. - frame_support::storage::migration::move_pallet(b"BagsList", b"VoterList"); - Ok(()) - } - fn on_runtime_upgrade() -> frame_support::weights::Weight { - frame_support::storage::migration::move_pallet(b"BagsList", b"VoterList"); - frame_support::weights::Weight::MAX - } -} - #[cfg(feature = "runtime-benchmarks")] #[macro_use] extern crate frame_benchmarking;