Skip to content

Commit

Permalink
Merge pull request #5115 from mnaamani/luxor-remove-nara-runtime-migr…
Browse files Browse the repository at this point in the history
…ations

Remove nara migrations
  • Loading branch information
mnaamani authored Apr 3, 2024
2 parents aed16d0 + 9f77d88 commit d6d184b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 38 deletions.
1 change: 0 additions & 1 deletion runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,6 @@ impl pallet_staking::Config for Runtime {
type ElectionProvider = ElectionProviderMultiPhase;
type GenesisElectionProvider = onchain::OnChainExecution<OnChainSeqPhragmen>;
type VoterList = VoterList;
// type VoterList = VoterList; // not renaming for now
type TargetList = pallet_staking::UseValidatorsMap<Self>;
type MaxUnlockingChunks = ConstU32<32>;
type HistoryDepth = HistoryDepth;
Expand Down
40 changes: 3 additions & 37 deletions runtime/src/runtime_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use pallet_transaction_payment::{FeeDetails, RuntimeDispatchInfo};
use sp_api::impl_runtime_apis;
use sp_core::crypto::KeyTypeId;
use sp_core::OpaqueMetadata;
use sp_runtime::traits::{BlakeTwo256, Block as BlockT, Get, NumberFor};
use sp_runtime::traits::{BlakeTwo256, Block as BlockT, NumberFor};
use sp_runtime::{generic, ApplyExtrinsicResult};

use sp_std::vec::Vec;
Expand All @@ -15,7 +15,7 @@ use crate::{
AccountId, AllPalletsWithSystem, AuthorityDiscovery, AuthorityDiscoveryId, Babe, Balance,
BlockNumber, EpochDuration, Grandpa, GrandpaAuthorityList, GrandpaId, Historical, Index,
InherentDataExt, ProposalsEngine, Runtime, RuntimeCall, RuntimeVersion, SessionKeys, Signature,
Staking, System, TransactionPayment, VoterList, BABE_GENESIS_EPOCH_CONFIG, VERSION,
Staking, System, TransactionPayment, BABE_GENESIS_EPOCH_CONFIG, VERSION,
};

#[cfg(feature = "try-runtime")]
Expand Down Expand Up @@ -75,44 +75,10 @@ impl OnRuntimeUpgrade for CancelActiveAndPendingProposals {
}
}

pub struct MigrateStakingPalletToV8;
impl OnRuntimeUpgrade for MigrateStakingPalletToV8 {
fn on_runtime_upgrade() -> Weight {
pallet_staking::migrations::v8::migrate::<Runtime>()
}
}

pub struct StakingMigrationV11OldPallet;
impl Get<&'static str> for StakingMigrationV11OldPallet {
fn get() -> &'static str {
"BagsList"
}
}

/// Migrations to run on runtime upgrade.
/// Migrations will run before pallet on_runtime_upgrade hooks
/// Always include 'CancelActiveAndPendingProposals' as first migration
pub type Migrations = (
CancelActiveAndPendingProposals,
// == start Staking migrations (from Release v7 to Release v13)
MigrateStakingPalletToV8,
// list will not produce duplicates..
pallet_staking::migrations::v9::InjectValidatorsIntoVoterList<Runtime>,
// slash all pending slashes correctly
pallet_staking::migrations::v10::MigrateToV10<Runtime>,
// Rename BagsList to VoterList
pallet_staking::migrations::v11::MigrateToV11<Runtime, VoterList, StakingMigrationV11OldPallet>,
// Kill HistoryDepth storage
pallet_staking::migrations::v12::MigrateToV12<Runtime>,
// Migrate to new storage versioning
pallet_staking::migrations::v13::MigrateToV13<Runtime>,
// == end Staking Migrations
// unreserve balances from old stored calls in multisig pallet
pallet_multisig::migrations::v1::MigrateToV1<Runtime>,
pallet_election_provider_multi_phase::migrations::v1::MigrateToV1<Runtime>,
pallet_grandpa::migrations::CleanupSetIdSessionMap<Runtime>,
content::migrations::nara::MigrateToV1<Runtime>,
);
pub type Migrations = (CancelActiveAndPendingProposals,);

/// Executive: handles dispatch to the various modules with Migrations.
pub type Executive = frame_executive::Executive<
Expand Down

0 comments on commit d6d184b

Please sign in to comment.