mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 04:41:03 +00:00
runtime: remove randomness collective flip pallet (#3347)
* runtime: remove randomness collective flip pallet * add storage migration to remove key Co-Authored-By: parity-processbot <> Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
This commit is contained in:
@@ -55,7 +55,6 @@ pallet-multisig = { git = "https://github.com/paritytech/substrate", branch = "m
|
||||
pallet-nicks = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
pallet-offences = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
pallet-proxy = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
pallet-randomness-collective-flip = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
pallet-recovery = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
pallet-scheduler = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
pallet-session = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
@@ -152,7 +151,6 @@ std = [
|
||||
"pallet-vesting/std",
|
||||
"pallet-xcm/std",
|
||||
"pallet-babe/std",
|
||||
"pallet-randomness-collective-flip/std",
|
||||
"frame-executive/std",
|
||||
"sp-runtime/std",
|
||||
"sp-staking/std",
|
||||
@@ -239,7 +237,6 @@ try-runtime = [
|
||||
"pallet-utility/try-runtime",
|
||||
"pallet-vesting/try-runtime",
|
||||
"pallet-babe/try-runtime",
|
||||
"pallet-randomness-collective-flip/try-runtime",
|
||||
"runtime-common/try-runtime",
|
||||
]
|
||||
# When enabled, the runtime api will not be build.
|
||||
|
||||
@@ -183,8 +183,6 @@ impl frame_system::Config for Runtime {
|
||||
type OnSetCode = ();
|
||||
}
|
||||
|
||||
impl pallet_randomness_collective_flip::Config for Runtime {}
|
||||
|
||||
parameter_types! {
|
||||
pub MaximumSchedulerWeight: Weight = Perbill::from_percent(80) *
|
||||
BlockWeights::get().max_block;
|
||||
@@ -999,7 +997,6 @@ construct_runtime! {
|
||||
{
|
||||
// Basic stuff; balances is uncallable initially.
|
||||
System: frame_system::{Pallet, Call, Storage, Config, Event<T>} = 0,
|
||||
RandomnessCollectiveFlip: pallet_randomness_collective_flip::{Pallet, Storage} = 25,
|
||||
|
||||
// Must be before session.
|
||||
Babe: pallet_babe::{Pallet, Call, Storage, Config, ValidateUnsigned} = 1,
|
||||
@@ -1101,20 +1098,18 @@ pub type Executive = frame_executive::Executive<
|
||||
frame_system::ChainContext<Runtime>,
|
||||
Runtime,
|
||||
AllPallets,
|
||||
SetStakingLimits,
|
||||
RemoveCollectiveFlip,
|
||||
>;
|
||||
/// The payload being signed in transactions.
|
||||
pub type SignedPayload = generic::SignedPayload<Call, SignedExtra>;
|
||||
|
||||
pub struct SetStakingLimits;
|
||||
impl frame_support::traits::OnRuntimeUpgrade for SetStakingLimits {
|
||||
pub struct RemoveCollectiveFlip;
|
||||
impl frame_support::traits::OnRuntimeUpgrade for RemoveCollectiveFlip {
|
||||
fn on_runtime_upgrade() -> Weight {
|
||||
<pallet_staking::MinNominatorBond<Runtime>>::put(1 * UNITS);
|
||||
<pallet_staking::MaxNominatorsCount<Runtime>>::put(1000);
|
||||
<pallet_staking::MinValidatorBond<Runtime>>::put(10 * UNITS);
|
||||
<pallet_staking::MaxValidatorsCount<Runtime>>::put(10);
|
||||
|
||||
<Runtime as frame_system::Config>::DbWeight::get().writes(4)
|
||||
use frame_support::storage::migration;
|
||||
// Remove the storage value `RandomMaterial` from removed pallet `RandomnessCollectiveFlip`
|
||||
migration::remove_storage_prefix(b"RandomnessCollectiveFlip", b"RandomMaterial", b"");
|
||||
<Runtime as frame_system::Config>::DbWeight::get().writes(1)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user