diff --git a/CHANGELOG.md b/CHANGELOG.md index 4009148cab..af4c2328de 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -165,6 +165,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - [#9202](https://github.com/paritytech/polkadot-sdk/pull/9202): `apply_authorized_force_set_current_code` does not need to consume the whole block - Proxy type `NonTranfer`: Use a whitelist of calls and remove some not useful calls from the whitelist ([polkadot-fellows/runtimes/pull/646](https://github.com/polkadot-fellows/runtimes/pull/646)) - Add Snowbridge V2 pallets, to enable Snowbridge V2 bridging: [polkadot-fellows/runtimes/pull/796](https://github.com/polkadot-fellows/runtimes/pull/796)) +- Moves single block migrations from frame_executive::Executive to frame_system::Config. [polkadot-fellows/runtimes/pull/844](https://github.com/polkadot-fellows/runtimes/pull/844) ## [1.6.1] 24.06.2025 diff --git a/relay/kusama/src/lib.rs b/relay/kusama/src/lib.rs index 15c148de46..f8b658294f 100644 --- a/relay/kusama/src/lib.rs +++ b/relay/kusama/src/lib.rs @@ -241,7 +241,7 @@ impl frame_system::Config for Runtime { type SS58Prefix = SS58Prefix; type OnSetCode = (); type MaxConsumers = frame_support::traits::ConstU32<16>; - type SingleBlockMigrations = (); + type SingleBlockMigrations = migrations::SingleBlockMigrations; type MultiBlockMigrator = (); type PreInherents = (); type PostInherents = (); @@ -2195,12 +2195,6 @@ pub type TxExtension = ( frame_metadata_hash_extension::CheckMetadataHash, ); -/// All migrations that will run on the next runtime upgrade. -/// -/// This contains the combined migrations of the last 10 releases. It allows to skip runtime -/// upgrades in case governance decides to do so. THE ORDER IS IMPORTANT. -pub type Migrations = (migrations::Unreleased, migrations::Permanent); - /// The runtime migrations per release. #[allow(deprecated, missing_docs)] pub mod migrations { @@ -2214,6 +2208,9 @@ pub mod migrations { /// Migrations/checks that do not need to be versioned and can run on every update. pub type Permanent = pallet_xcm::migration::MigrateToLatestXcmVersion; + /// All migrations that will run on the next runtime upgrade. + pub type SingleBlockMigrations = (Unreleased, Permanent); + /// Kick off the Asset Hub Migration. pub struct KickOffAhm(pub core::marker::PhantomData); impl OnRuntimeUpgrade for KickOffAhm { @@ -2259,7 +2256,6 @@ pub type Executive = frame_executive::Executive< frame_system::ChainContext, Runtime, AllPalletsWithSystem, - Migrations, >; /// The payload being signed in the transactions. pub type SignedPayload = generic::SignedPayload; diff --git a/relay/polkadot/src/lib.rs b/relay/polkadot/src/lib.rs index d5a06244d3..98cc21a1c9 100644 --- a/relay/polkadot/src/lib.rs +++ b/relay/polkadot/src/lib.rs @@ -228,7 +228,7 @@ impl frame_system::Config for Runtime { type SS58Prefix = SS58Prefix; type OnSetCode = (); type MaxConsumers = frame_support::traits::ConstU32<16>; - type SingleBlockMigrations = (); + type SingleBlockMigrations = migrations::SingleBlockMigrations; type MultiBlockMigrator = (); type PreInherents = (); type PostInherents = (); @@ -1927,12 +1927,6 @@ pub type TxExtension = ( frame_metadata_hash_extension::CheckMetadataHash, ); -/// All migrations that will run on the next runtime upgrade. -/// -/// This contains the combined migrations of the last 10 releases. It allows to skip runtime -/// upgrades in case governance decides to do so. THE ORDER IS IMPORTANT. -pub type Migrations = (migrations::Unreleased, migrations::Permanent); - /// The runtime migrations per release. #[allow(deprecated, missing_docs)] pub mod migrations { @@ -1943,6 +1937,9 @@ pub mod migrations { /// Migrations/checks that do not need to be versioned and can run on every update. pub type Permanent = pallet_xcm::migration::MigrateToLatestXcmVersion; + + /// All migrations that will run on the next runtime upgrade. + pub type SingleBlockMigrations = (Unreleased, Permanent); } /// Unchecked extrinsic type as expected by this runtime. @@ -1955,7 +1952,6 @@ pub type Executive = frame_executive::Executive< frame_system::ChainContext, Runtime, AllPalletsWithSystem, - Migrations, >; /// The payload being signed in transactions. diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs index bd31c5f2aa..18ea326551 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs @@ -209,7 +209,7 @@ impl frame_system::Config for Runtime { type SS58Prefix = SS58Prefix; type OnSetCode = cumulus_pallet_parachain_system::ParachainSetCode; type MaxConsumers = ConstU32<256>; - type SingleBlockMigrations = (); + type SingleBlockMigrations = migrations::SingleBlockMigrations; type MultiBlockMigrator = MultiBlockMigrations; type PreInherents = (); type PostInherents = (); @@ -1691,12 +1691,6 @@ impl EthExtra for EthExtraImpl { pub type UncheckedExtrinsic = pallet_revive::evm::runtime::UncheckedExtrinsic; -/// All migrations that will run on the next runtime upgrade. -/// -/// This contains the combined migrations of the last 10 releases. It allows to skip runtime -/// upgrades in case the government decides to do so. THE ORDER IS IMPORTANT. -pub type Migrations = (migrations::Unreleased, migrations::Permanent); - /// The runtime migrations per release. #[allow(deprecated, missing_docs)] pub mod migrations { @@ -1708,6 +1702,9 @@ pub mod migrations { /// Migrations/checks that do not need to be versioned and can run on every update. pub type Permanent = pallet_xcm::migration::MigrateToLatestXcmVersion; + /// All single block migrations that will run on the next runtime upgrade. + pub type SingleBlockMigrations = (Unreleased, Permanent); + /// MBM migrations to apply on runtime upgrade. pub type MbmMigrations = pallet_revive::migrations::v1::Migration; } @@ -1719,7 +1716,6 @@ pub type Executive = frame_executive::Executive< frame_system::ChainContext, Runtime, AllPalletsWithSystem, - Migrations, >; #[cfg(feature = "runtime-benchmarks")] diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs index c9f699d511..71f52cbd63 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs @@ -257,7 +257,7 @@ impl frame_system::Config for Runtime { type SS58Prefix = SS58Prefix; type OnSetCode = cumulus_pallet_parachain_system::ParachainSetCode; type MaxConsumers = ConstU32<64>; - type SingleBlockMigrations = (); + type SingleBlockMigrations = migrations::SingleBlockMigrations; type MultiBlockMigrator = (); type PreInherents = (); type PostInherents = (); @@ -1458,12 +1458,6 @@ pub type TxExtension = ( pub type UncheckedExtrinsic = generic::UncheckedExtrinsic; -/// All migrations that will run on the next runtime upgrade. -/// -/// This contains the combined migrations of the last 10 releases. It allows to skip runtime -/// upgrades in case governance decides to do so. THE ORDER IS IMPORTANT. -pub type Migrations = (migrations::Unreleased, migrations::Permanent); - /// The runtime migrations per release. #[allow(deprecated, missing_docs)] pub mod migrations { @@ -1482,6 +1476,9 @@ pub mod migrations { /// Migrations/checks that do not need to be versioned and can run on every update. pub type Permanent = pallet_xcm::migration::MigrateToLatestXcmVersion; + /// All single block migrations that will run on the next runtime upgrade. + pub type SingleBlockMigrations = (Unreleased, Permanent); + /// MBM migrations to apply on runtime upgrade. pub type MbmMigrations = (); } @@ -1493,7 +1490,6 @@ pub type Executive = frame_executive::Executive< frame_system::ChainContext, Runtime, AllPalletsWithSystem, - Migrations, >; #[cfg(feature = "runtime-benchmarks")] diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs index 70ddf19240..a9e548aecd 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs @@ -138,12 +138,6 @@ bridge_runtime_common::generate_bridge_reject_obsolete_headers_and_messages! { pub type UncheckedExtrinsic = generic::UncheckedExtrinsic; -/// All migrations that will run on the next runtime upgrade. -/// -/// This contains the combined migrations of the last 10 releases. It allows to skip runtime -/// upgrades in case governance decides to do so. THE ORDER IS IMPORTANT. -pub type Migrations = (migrations::Unreleased, migrations::Permanent); - /// The runtime migrations per release. #[allow(deprecated, missing_docs)] pub mod migrations { @@ -155,6 +149,9 @@ pub mod migrations { /// Migrations/checks that do not need to be versioned and can run on every update. pub type Permanent = pallet_xcm::migration::MigrateToLatestXcmVersion; + /// All migrations that will run on the next runtime upgrade. + pub type SingleBlockMigrations = (Unreleased, Permanent); + /// MBM migrations to apply on runtime upgrade. pub type MbmMigrations = (); } @@ -166,7 +163,6 @@ pub type Executive = frame_executive::Executive< frame_system::ChainContext, Runtime, AllPalletsWithSystem, - Migrations, >; impl_opaque_keys! { @@ -268,7 +264,7 @@ impl frame_system::Config for Runtime { /// The action to take on a Runtime Upgrade type OnSetCode = cumulus_pallet_parachain_system::ParachainSetCode; type MaxConsumers = ConstU32<16>; - type SingleBlockMigrations = (); + type SingleBlockMigrations = migrations::SingleBlockMigrations; type MultiBlockMigrator = (); type PreInherents = (); type PostInherents = (); diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs index 6efb869870..86d4acb867 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs @@ -148,12 +148,6 @@ parameter_types! { pub const NativeToForeignIdKey: &'static str = "NativeToForeignId"; } -/// All migrations that will run on the next runtime upgrade. -/// -/// This contains the combined migrations of the last 10 releases. It allows to skip runtime -/// upgrades in case governance decides to do so. THE ORDER IS IMPORTANT. -pub type Migrations = (migrations::Unreleased, migrations::Permanent); - /// The runtime migrations per release. #[allow(deprecated, missing_docs)] pub mod migrations { @@ -185,6 +179,9 @@ pub mod migrations { /// Migrations/checks that do not need to be versioned and can run on every update. pub type Permanent = pallet_xcm::migration::MigrateToLatestXcmVersion; + /// All migrations that will run on the next runtime upgrade. + pub type SingleBlockMigrations = (Unreleased, Permanent); + /// MBM migrations to apply on runtime upgrade. pub type MbmMigrations = (); } @@ -196,7 +193,6 @@ pub type Executive = frame_executive::Executive< frame_system::ChainContext, Runtime, AllPalletsWithSystem, - Migrations, >; impl_opaque_keys! { @@ -298,7 +294,7 @@ impl frame_system::Config for Runtime { /// The action to take on a Runtime Upgrade type OnSetCode = cumulus_pallet_parachain_system::ParachainSetCode; type MaxConsumers = ConstU32<16>; - type SingleBlockMigrations = (); + type SingleBlockMigrations = migrations::SingleBlockMigrations; type MultiBlockMigrator = (); type PreInherents = (); type PostInherents = (); diff --git a/system-parachains/collectives/collectives-polkadot/src/lib.rs b/system-parachains/collectives/collectives-polkadot/src/lib.rs index 44edefbebd..d77c3645d4 100644 --- a/system-parachains/collectives/collectives-polkadot/src/lib.rs +++ b/system-parachains/collectives/collectives-polkadot/src/lib.rs @@ -200,7 +200,7 @@ impl frame_system::Config for Runtime { type SS58Prefix = ConstU16<0>; type OnSetCode = cumulus_pallet_parachain_system::ParachainSetCode; type MaxConsumers = frame_support::traits::ConstU32<16>; - type SingleBlockMigrations = (); + type SingleBlockMigrations = migrations::SingleBlockMigrations; type MultiBlockMigrator = (); type PreInherents = (); type PostInherents = (); @@ -839,12 +839,6 @@ pub type TxExtension = ( pub type UncheckedExtrinsic = generic::UncheckedExtrinsic; -/// All migrations that will run on the next runtime upgrade. -/// -/// This contains the combined migrations of the last 10 releases. It allows to skip runtime -/// upgrades in case governance decides to do so. THE ORDER IS IMPORTANT. -pub type Migrations = (migrations::Unreleased, migrations::Permanent); - /// The runtime migrations per release. #[allow(deprecated, missing_docs)] pub mod migrations { @@ -862,6 +856,9 @@ pub mod migrations { /// Migrations/checks that do not need to be versioned and can run on every update. pub type Permanent = pallet_xcm::migration::MigrateToLatestXcmVersion; + /// All migrations that will run on the next runtime upgrade. + pub type SingleBlockMigrations = (Unreleased, Permanent); + /// MBM migrations to apply on runtime upgrade. pub type MbmMigrations = (); } @@ -873,7 +870,6 @@ pub type Executive = frame_executive::Executive< frame_system::ChainContext, Runtime, AllPalletsWithSystem, - Migrations, >; #[cfg(feature = "runtime-benchmarks")] diff --git a/system-parachains/coretime/coretime-kusama/src/lib.rs b/system-parachains/coretime/coretime-kusama/src/lib.rs index 7c6636d3b0..33d17a3c43 100644 --- a/system-parachains/coretime/coretime-kusama/src/lib.rs +++ b/system-parachains/coretime/coretime-kusama/src/lib.rs @@ -115,12 +115,6 @@ pub type TxExtensions = ( pub type UncheckedExtrinsic = generic::UncheckedExtrinsic; -/// All migrations that will run on the next runtime upgrade. -/// -/// This contains the combined migrations of the last 10 releases. It allows to skip runtime -/// upgrades in case governance decides to do so. THE ORDER IS IMPORTANT. -pub type Migrations = (migrations::Unreleased, migrations::Permanent); - /// The runtime migrations per release. #[allow(deprecated, missing_docs)] pub mod migrations { @@ -131,6 +125,9 @@ pub mod migrations { /// Migrations/checks that do not need to be versioned and can run on every update. pub type Permanent = pallet_xcm::migration::MigrateToLatestXcmVersion; + + /// All migrations that will run on the next runtime upgrade. + pub type SingleBlockMigrations = (Unreleased, Permanent); } /// Executive: handles dispatch to the various modules. @@ -140,7 +137,6 @@ pub type Executive = frame_executive::Executive< frame_system::ChainContext, Runtime, AllPalletsWithSystem, - Migrations, >; impl_opaque_keys! { @@ -254,7 +250,7 @@ impl frame_system::Config for Runtime { /// The action to take on a Runtime Upgrade type OnSetCode = cumulus_pallet_parachain_system::ParachainSetCode; type MaxConsumers = ConstU32<16>; - type SingleBlockMigrations = (); + type SingleBlockMigrations = migrations::SingleBlockMigrations; type MultiBlockMigrator = (); type PreInherents = (); type PostInherents = (); diff --git a/system-parachains/coretime/coretime-polkadot/src/lib.rs b/system-parachains/coretime/coretime-polkadot/src/lib.rs index 9cc2ee909e..e53d395ac5 100644 --- a/system-parachains/coretime/coretime-polkadot/src/lib.rs +++ b/system-parachains/coretime/coretime-polkadot/src/lib.rs @@ -115,12 +115,6 @@ pub type TxExtension = ( pub type UncheckedExtrinsic = generic::UncheckedExtrinsic; -/// All migrations that will run on the next runtime upgrade. -/// -/// This contains the combined migrations of the last 10 releases. It allows to skip runtime -/// upgrades in case governance decides to do so. THE ORDER IS IMPORTANT. -pub type Migrations = (migrations::Unreleased, migrations::Permanent); - /// The runtime migrations per release. #[allow(deprecated, missing_docs)] pub mod migrations { @@ -138,6 +132,9 @@ pub mod migrations { /// Migrations/checks that do not need to be versioned and can run on every update. pub type Permanent = pallet_xcm::migration::MigrateToLatestXcmVersion; + + /// All migrations that will run on the next runtime upgrade. + pub type SingleBlockMigrations = (Unreleased, Permanent); } /// Executive: handles dispatch to the various modules. @@ -147,7 +144,6 @@ pub type Executive = frame_executive::Executive< frame_system::ChainContext, Runtime, AllPalletsWithSystem, - Migrations, >; impl_opaque_keys! { @@ -267,7 +263,7 @@ impl frame_system::Config for Runtime { /// The action to take on a Runtime Upgrade type OnSetCode = cumulus_pallet_parachain_system::ParachainSetCode; type MaxConsumers = ConstU32<16>; - type SingleBlockMigrations = (); + type SingleBlockMigrations = migrations::SingleBlockMigrations; type MultiBlockMigrator = (); type PreInherents = (); type PostInherents = (); diff --git a/system-parachains/encointer/src/lib.rs b/system-parachains/encointer/src/lib.rs index 880fad1c7f..88d687b421 100644 --- a/system-parachains/encointer/src/lib.rs +++ b/system-parachains/encointer/src/lib.rs @@ -319,7 +319,7 @@ impl frame_system::Config for Runtime { type SS58Prefix = SS58Prefix; type OnSetCode = cumulus_pallet_parachain_system::ParachainSetCode; type MaxConsumers = frame_support::traits::ConstU32<16>; - type SingleBlockMigrations = (); + type SingleBlockMigrations = migrations::SingleBlockMigrations; type MultiBlockMigrator = (); type PreInherents = (); type PostInherents = (); @@ -906,12 +906,6 @@ pub type TxExtension = ( pub type UncheckedExtrinsic = generic::UncheckedExtrinsic; -/// All migrations that will run on the next runtime upgrade. -/// -/// This contains the combined migrations of the last 10 releases. It allows to skip runtime -/// upgrades in case governance decides to do so. THE ORDER IS IMPORTANT. -pub type Migrations = (migrations::Unreleased, migrations::Permanent); - /// The runtime migrations per release. #[allow(deprecated, missing_docs)] pub mod migrations { @@ -920,6 +914,9 @@ pub mod migrations { /// Unreleased migrations. Add new ones here: pub type Unreleased = (); + /// All migrations that will run on the next runtime upgrade. + pub type SingleBlockMigrations = (Unreleased, Permanent); + /// Migrations/checks that do not need to be versioned and can run on every update. pub type Permanent = pallet_xcm::migration::MigrateToLatestXcmVersion; } @@ -931,7 +928,6 @@ pub type Executive = frame_executive::Executive< frame_system::ChainContext, Runtime, AllPalletsWithSystem, - Migrations, >; #[cfg(feature = "runtime-benchmarks")] diff --git a/system-parachains/people/people-kusama/src/lib.rs b/system-parachains/people/people-kusama/src/lib.rs index e7272903b1..db51d20f38 100644 --- a/system-parachains/people/people-kusama/src/lib.rs +++ b/system-parachains/people/people-kusama/src/lib.rs @@ -133,12 +133,6 @@ pub type TxExtension = ( pub type UncheckedExtrinsic = generic::UncheckedExtrinsic; -/// All migrations that will run on the next runtime upgrade. -/// -/// This contains the combined migrations of the last 10 releases. It allows to skip runtime -/// upgrades in case governance decides to do so. THE ORDER IS IMPORTANT. -pub type Migrations = (migrations::Unreleased, migrations::Permanent); - /// The runtime migrations per release. #[allow(deprecated, missing_docs)] pub mod migrations { @@ -150,6 +144,9 @@ pub mod migrations { /// Migrations/checks that do not need to be versioned and can run on every update. pub type Permanent = pallet_xcm::migration::MigrateToLatestXcmVersion; + /// All migrations that will run on the next runtime upgrade. + pub type SingleBlockMigrations = (Unreleased, Permanent); + /// MBM migrations to apply on runtime upgrade. pub type MbmMigrations = (); } @@ -161,7 +158,6 @@ pub type Executive = frame_executive::Executive< frame_system::ChainContext, Runtime, AllPalletsWithSystem, - Migrations, >; impl_opaque_keys! { @@ -231,6 +227,7 @@ impl frame_system::Config for Runtime { type SS58Prefix = SS58Prefix; type OnSetCode = cumulus_pallet_parachain_system::ParachainSetCode; type MaxConsumers = ConstU32<16>; + type SingleBlockMigrations = migrations::SingleBlockMigrations; type MultiBlockMigrator = MultiBlockMigrations; } diff --git a/system-parachains/people/people-polkadot/src/lib.rs b/system-parachains/people/people-polkadot/src/lib.rs index 8709a22d5a..0dfda5d924 100644 --- a/system-parachains/people/people-polkadot/src/lib.rs +++ b/system-parachains/people/people-polkadot/src/lib.rs @@ -114,13 +114,6 @@ pub type TxExtension = ( /// Unchecked extrinsic type as expected by this runtime. pub type UncheckedExtrinsic = generic::UncheckedExtrinsic; - -/// All migrations that will run on the next runtime upgrade. -/// -/// This contains the combined migrations of the last 10 releases. It allows to skip runtime -/// upgrades in case governance decides to do so. THE ORDER IS IMPORTANT. -pub type Migrations = (migrations::Unreleased, migrations::Permanent); - /// The runtime migrations per release. #[allow(deprecated, missing_docs)] pub mod migrations { @@ -138,6 +131,9 @@ pub mod migrations { /// Migrations/checks that do not need to be versioned and can run on every update. pub type Permanent = pallet_xcm::migration::MigrateToLatestXcmVersion; + /// All migrations that will run on the next runtime upgrade. + pub type SingleBlockMigrations = (Unreleased, Permanent); + /// MBM migrations to apply on runtime upgrade. pub type MbmMigrations = (); } @@ -149,7 +145,6 @@ pub type Executive = frame_executive::Executive< frame_system::ChainContext, Runtime, AllPalletsWithSystem, - Migrations, >; impl_opaque_keys! { @@ -219,6 +214,7 @@ impl frame_system::Config for Runtime { type SS58Prefix = SS58Prefix; type OnSetCode = cumulus_pallet_parachain_system::ParachainSetCode; type MaxConsumers = ConstU32<16>; + type SingleBlockMigrations = migrations::SingleBlockMigrations; type MultiBlockMigrator = MultiBlockMigrations; }