mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 08:11: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:
@@ -192,8 +192,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;
|
||||
@@ -1388,7 +1386,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} = 32,
|
||||
|
||||
// Must be before session.
|
||||
Babe: pallet_babe::{Pallet, Call, Storage, Config, ValidateUnsigned} = 1,
|
||||
@@ -1509,28 +1506,18 @@ pub type Executive = frame_executive::Executive<
|
||||
frame_system::ChainContext<Runtime>,
|
||||
Runtime,
|
||||
AllPallets,
|
||||
SetStakingLimits,
|
||||
RemoveCollectiveFlip,
|
||||
>;
|
||||
/// The payload being signed in the 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 {
|
||||
// This will be the threshold needed henceforth to become a nominator. All nominators will
|
||||
// less than this amount bonded are at the risk of being chilled by another reporter.
|
||||
let min_nominator_bond = UNITS / 10;
|
||||
// The absolute maximum number of nominators. This number is set rather conservatively, and
|
||||
// is expected to increase soon after this runtime upgrade via another governance proposal.
|
||||
// The current Polkadot state has more than 30_000 nominators, therefore no other nominator
|
||||
// can join.
|
||||
let max_nominators = 20_000;
|
||||
<pallet_staking::MinNominatorBond<Runtime>>::put(min_nominator_bond);
|
||||
<pallet_staking::MaxNominatorsCount<Runtime>>::put(max_nominators);
|
||||
|
||||
// we set no limits on validators for now.
|
||||
|
||||
<Runtime as frame_system::Config>::DbWeight::get().writes(2)
|
||||
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