Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

all runtimes: remove already applied migrations #420

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
all runtimes: remove already applied migrations
Signed-off-by: Adrian Catangiu <adrian@parity.io>
  • Loading branch information
acatangiu committed Aug 5, 2024
commit 0d25df12e54ee219f9610bf657bad6cc2165d021
7 changes: 1 addition & 6 deletions system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1071,14 +1071,9 @@ pub type SignedExtra = (
pub type UncheckedExtrinsic =
generic::UncheckedExtrinsic<Address, RuntimeCall, Signature, SignedExtra>;

parameter_types! {
pub DmpQueueName: &'static str = "DmpQueue";
}

/// Migrations to apply on runtime upgrade.
pub type Migrations = (
frame_support::migrations::RemovePallet<DmpQueueName, RocksDbWeight>,
acatangiu marked this conversation as resolved.
Show resolved Hide resolved
pallet_collator_selection::migration::v2::MigrationToV2<Runtime>,
// unreleased and/or un-applied
cumulus_pallet_xcmp_queue::migration::v5::MigrateV4ToV5<Runtime>,
// permanent
pallet_xcm::migration::MigrateToLatestXcmVersion<Runtime>,
Expand Down
9 changes: 1 addition & 8 deletions system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1050,16 +1050,9 @@ pub type SignedExtra = (
pub type UncheckedExtrinsic =
generic::UncheckedExtrinsic<Address, RuntimeCall, Signature, SignedExtra>;

parameter_types! {
pub DmpQueueName: &'static str = "DmpQueue";
}

/// Migrations to apply on runtime upgrade.
pub type Migrations = (
// unreleased
frame_support::migrations::RemovePallet<DmpQueueName, RocksDbWeight>,
cumulus_pallet_xcmp_queue::migration::v4::MigrationToV4<Runtime>,
pallet_collator_selection::migration::v2::MigrationToV2<Runtime>,
// unreleased and/or un-applied
cumulus_pallet_xcmp_queue::migration::v5::MigrateV4ToV5<Runtime>,
// permanent
pallet_xcm::migration::MigrateToLatestXcmVersion<Runtime>,
Expand Down
7 changes: 1 addition & 6 deletions system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,14 +140,9 @@ bridge_runtime_common::generate_bridge_reject_obsolete_headers_and_messages! {
pub type UncheckedExtrinsic =
generic::UncheckedExtrinsic<Address, RuntimeCall, Signature, SignedExtra>;

parameter_types! {
pub DmpQueueName: &'static str = "DmpQueue";
}

/// Migrations to apply on runtime upgrade.
pub type Migrations = (
frame_support::migrations::RemovePallet<DmpQueueName, RocksDbWeight>,
pallet_collator_selection::migration::v2::MigrationToV2<Runtime>,
// unreleased and/or un-applied
cumulus_pallet_xcmp_queue::migration::v5::MigrateV4ToV5<Runtime>,
// permanent
pallet_xcm::migration::MigrateToLatestXcmVersion<Runtime>,
Expand Down
15 changes: 1 addition & 14 deletions system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ pub use sp_runtime::BuildStorage;

// Polkadot imports
use polkadot_runtime_common::{BlockHashCount, SlowAdjustingFeeUpdate};
use polkadot_runtime_constants::system_parachain::{ASSET_HUB_ID, BRIDGE_HUB_ID};

use weights::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight};

Expand Down Expand Up @@ -141,21 +140,9 @@ bridge_runtime_common::generate_bridge_reject_obsolete_headers_and_messages! {
pub type UncheckedExtrinsic =
generic::UncheckedExtrinsic<Address, RuntimeCall, Signature, SignedExtra>;

parameter_types! {
pub DmpQueueName: &'static str = "DmpQueue";
}

/// Migrations to apply on runtime upgrade.
pub type Migrations = (
// unreleased
frame_support::migrations::RemovePallet<DmpQueueName, RocksDbWeight>,
cumulus_pallet_xcmp_queue::migration::v4::MigrationToV4<Runtime>,
snowbridge_pallet_system::migration::v0::InitializeOnUpgrade<
Runtime,
ConstU32<BRIDGE_HUB_ID>,
ConstU32<ASSET_HUB_ID>,
>,
pallet_collator_selection::migration::v2::MigrationToV2<Runtime>,
// unreleased and/or un-applied
cumulus_pallet_xcmp_queue::migration::v5::MigrateV4ToV5<Runtime>,
// permanent
pallet_xcm::migration::MigrateToLatestXcmVersion<Runtime>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -749,17 +749,10 @@ pub type SignedExtra = (
pub type UncheckedExtrinsic =
generic::UncheckedExtrinsic<Address, RuntimeCall, Signature, SignedExtra>;

parameter_types! {
pub DmpQueueName: &'static str = "DmpQueue";
}

/// All migrations executed on runtime upgrade as a nested tuple of types implementing
/// `OnRuntimeUpgrade`. Included migrations must be idempotent.
type Migrations = (
// unreleased
frame_support::migrations::RemovePallet<DmpQueueName, RocksDbWeight>,
cumulus_pallet_xcmp_queue::migration::v4::MigrationToV4<Runtime>,
pallet_collator_selection::migration::v2::MigrationToV2<Runtime>,
// unreleased and/or un-applied
cumulus_pallet_xcmp_queue::migration::v5::MigrateV4ToV5<Runtime>,
pallet_core_fellowship::migration::MigrateV0ToV1<Runtime, fellowship::FellowshipCoreInstance>,
pallet_core_fellowship::migration::MigrateV0ToV1<Runtime, ambassador::AmbassadorCoreInstance>,
Expand Down
5 changes: 3 additions & 2 deletions system-parachains/coretime/coretime-kusama/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,13 @@ pub type UncheckedExtrinsic =

/// Migrations to apply on runtime upgrade.
pub type Migrations = (
pallet_xcm::migration::MigrateToLatestXcmVersion<Runtime>,
pallet_collator_selection::migration::v2::MigrationToV2<Runtime>,
// unreleased and/or un-applied
cumulus_pallet_xcmp_queue::migration::v5::MigrateV4ToV5<Runtime>,
pallet_broker::migration::MigrateV0ToV1<Runtime>,
pallet_broker::migration::MigrateV1ToV2<Runtime>,
pallet_broker::migration::MigrateV2ToV3<Runtime>,
// permanent
acatangiu marked this conversation as resolved.
Show resolved Hide resolved
pallet_xcm::migration::MigrateToLatestXcmVersion<Runtime>,
);

/// Executive: handles dispatch to the various modules.
Expand Down
7 changes: 1 addition & 6 deletions system-parachains/encointer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -754,14 +754,9 @@ pub type UncheckedExtrinsic =
/// Extrinsic type that has already been checked.
pub type CheckedExtrinsic = generic::CheckedExtrinsic<AccountId, RuntimeCall, SignedExtra>;

parameter_types! {
pub DmpQueueName: &'static str = "DmpQueue";
}

/// Migrations to apply on runtime upgrade.
pub type Migrations = (
frame_support::migrations::RemovePallet<DmpQueueName, RocksDbWeight>,
migrations_fix::collator_selection_init::v0::InitInvulnerables<Runtime>,
// unreleased and/or un-applied
cumulus_pallet_xcmp_queue::migration::v5::MigrateV4ToV5<Runtime>,
// permanent
pallet_xcm::migration::MigrateToLatestXcmVersion<Runtime>,
Expand Down
10 changes: 1 addition & 9 deletions system-parachains/people/people-kusama/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,17 +151,9 @@ pub type SignedExtra = (
pub type UncheckedExtrinsic =
generic::UncheckedExtrinsic<Address, RuntimeCall, Signature, SignedExtra>;

parameter_types! {
pub const IdentityMigratorPalletName: &'static str = "IdentityMigrator";
}
/// Migrations to apply on runtime upgrade.
pub type Migrations = (
pallet_collator_selection::migration::v2::MigrationToV2<Runtime>,
// remove `identity-migrator`
frame_support::migrations::RemovePallet<
IdentityMigratorPalletName,
<Runtime as frame_system::Config>::DbWeight,
>,
// unreleased and/or un-applied
cumulus_pallet_xcmp_queue::migration::v5::MigrateV4ToV5<Runtime>,
// permanent
pallet_xcm::migration::MigrateToLatestXcmVersion<Runtime>,
Expand Down
1 change: 1 addition & 0 deletions system-parachains/people/people-polkadot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ parameter_types! {

/// Migrations to apply on runtime upgrade.
pub type Migrations = (
// unreleased and/or un-applied
cumulus_pallet_xcmp_queue::migration::v5::MigrateV4ToV5<Runtime>,
frame_support::migrations::RemovePallet<
IdentityMigratorPalletName,
Expand Down
Loading