From 90ad211a46d57213fa37f8b7f14ca8cb68d9a60b Mon Sep 17 00:00:00 2001 From: Rodrigo Quelhas Date: Thu, 7 Aug 2025 15:38:53 +0100 Subject: [PATCH 1/2] Moves single block migrations from frame_executive to frame_system config --- relay/kusama/src/lib.rs | 5 ++--- relay/polkadot/src/lib.rs | 5 ++--- system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs | 5 ++--- system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs | 5 ++--- system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs | 5 ++--- system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs | 5 ++--- .../collectives/collectives-polkadot/src/lib.rs | 5 ++--- system-parachains/coretime/coretime-kusama/src/lib.rs | 5 ++--- system-parachains/coretime/coretime-polkadot/src/lib.rs | 5 ++--- system-parachains/encointer/src/lib.rs | 5 ++--- system-parachains/people/people-kusama/src/lib.rs | 4 ++-- system-parachains/people/people-polkadot/src/lib.rs | 4 ++-- 12 files changed, 24 insertions(+), 34 deletions(-) diff --git a/relay/kusama/src/lib.rs b/relay/kusama/src/lib.rs index 045877a30a..657d0bb78b 100644 --- a/relay/kusama/src/lib.rs +++ b/relay/kusama/src/lib.rs @@ -239,7 +239,7 @@ impl frame_system::Config for Runtime { type SS58Prefix = SS58Prefix; type OnSetCode = (); type MaxConsumers = frame_support::traits::ConstU32<16>; - type SingleBlockMigrations = (); + type SingleBlockMigrations = SingleBlockMigrations; type MultiBlockMigrator = (); type PreInherents = (); type PostInherents = (); @@ -1956,7 +1956,7 @@ pub type TxExtension = ( /// /// 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); +pub type SingleBlockMigrations = (migrations::Unreleased, migrations::Permanent); /// The runtime migrations per release. #[allow(deprecated, missing_docs)] @@ -1992,7 +1992,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 89d41354cb..a28264aeb4 100644 --- a/relay/polkadot/src/lib.rs +++ b/relay/polkadot/src/lib.rs @@ -215,7 +215,7 @@ impl frame_system::Config for Runtime { type SS58Prefix = SS58Prefix; type OnSetCode = (); type MaxConsumers = frame_support::traits::ConstU32<16>; - type SingleBlockMigrations = (); + type SingleBlockMigrations = SingleBlockMigrations; type MultiBlockMigrator = (); type PreInherents = (); type PostInherents = (); @@ -1704,7 +1704,7 @@ pub type TxExtension = ( /// /// 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); +pub type SingleBlockMigrations = (migrations::Unreleased, migrations::Permanent); /// The runtime migrations per release. #[allow(deprecated, missing_docs)] @@ -1743,7 +1743,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 b3413bbfc8..2b8ab2fd80 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs @@ -201,7 +201,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 = SingleBlockMigrations; type MultiBlockMigrator = (); type PreInherents = (); type PostInherents = (); @@ -1164,7 +1164,7 @@ pub type UncheckedExtrinsic = pallet_revive::evm::runtime::UncheckedExtrinsic; /// Migrations to apply on runtime upgrade. -pub type Migrations = ( +pub type SingleBlockMigrations = ( pallet_session::migrations::v1::MigrateV0ToV1< Runtime, pallet_session::migrations::v1::InitOffenceSeverity, @@ -1181,7 +1181,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 8abf1093eb..d1afc3dad5 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs @@ -240,7 +240,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 = SingleBlockMigrations; type MultiBlockMigrator = (); type PreInherents = (); type PostInherents = (); @@ -1065,7 +1065,7 @@ pub type UncheckedExtrinsic = generic::UncheckedExtrinsic; /// Migrations to apply on runtime upgrade. -pub type Migrations = ( +pub type SingleBlockMigrations = ( pallet_session::migrations::v1::MigrateV0ToV1< Runtime, pallet_session::migrations::v1::InitOffenceSeverity, @@ -1082,7 +1082,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 fc217b6ff0..7d505a0ffb 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs @@ -150,7 +150,7 @@ parameter_types! { } /// Migrations to apply on runtime upgrade. -pub type Migrations = ( +pub type SingleBlockMigrations = ( // Unreleased bridge_to_polkadot_config::migration::MigrateToXcm5< Runtime, @@ -177,7 +177,6 @@ pub type Executive = frame_executive::Executive< frame_system::ChainContext, Runtime, AllPalletsWithSystem, - Migrations, >; impl_opaque_keys! { @@ -279,7 +278,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 = 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 720c32f4ed..aebbefc427 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs @@ -148,7 +148,7 @@ parameter_types! { } /// Migrations to apply on runtime upgrade. -pub type Migrations = ( +pub type SingleBlockMigrations = ( // Unreleased bridge_to_kusama_config::migration::MigrateToXcm5< Runtime, @@ -180,7 +180,6 @@ pub type Executive = frame_executive::Executive< frame_system::ChainContext, Runtime, AllPalletsWithSystem, - Migrations, >; impl_opaque_keys! { @@ -282,7 +281,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 = 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 11b4506fbf..3b8d7d8f31 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 = SingleBlockMigrations; type MultiBlockMigrator = (); type PreInherents = (); type PostInherents = (); @@ -807,7 +807,7 @@ pub type UncheckedExtrinsic = /// All migrations executed on runtime upgrade as a nested tuple of types implementing /// `OnRuntimeUpgrade`. Included migrations must be idempotent. -type Migrations = ( +type SingleBlockMigrations = ( pallet_session::migrations::v1::MigrateV0ToV1< Runtime, pallet_session::migrations::v1::InitOffenceSeverity, @@ -824,7 +824,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 694c44af34..0b383b8abe 100644 --- a/system-parachains/coretime/coretime-kusama/src/lib.rs +++ b/system-parachains/coretime/coretime-kusama/src/lib.rs @@ -116,7 +116,7 @@ pub type UncheckedExtrinsic = generic::UncheckedExtrinsic; /// Migrations to apply on runtime upgrade. -pub type Migrations = ( +pub type SingleBlockMigrations = ( pallet_session::migrations::v1::MigrateV0ToV1< Runtime, pallet_session::migrations::v1::InitOffenceSeverity, @@ -134,7 +134,6 @@ pub type Executive = frame_executive::Executive< frame_system::ChainContext, Runtime, AllPalletsWithSystem, - Migrations, >; impl_opaque_keys! { @@ -248,7 +247,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 = 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 bca446ee7b..171ca12f0f 100644 --- a/system-parachains/coretime/coretime-polkadot/src/lib.rs +++ b/system-parachains/coretime/coretime-polkadot/src/lib.rs @@ -116,7 +116,7 @@ pub type UncheckedExtrinsic = generic::UncheckedExtrinsic; /// Migrations to apply on runtime upgrade. -pub type Migrations = ( +pub type SingleBlockMigrations = ( pallet_session::migrations::v1::MigrateV0ToV1< Runtime, pallet_session::migrations::v1::InitOffenceSeverity, @@ -134,7 +134,6 @@ pub type Executive = frame_executive::Executive< frame_system::ChainContext, Runtime, AllPalletsWithSystem, - Migrations, >; impl_opaque_keys! { @@ -254,7 +253,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 = SingleBlockMigrations; type MultiBlockMigrator = (); type PreInherents = (); type PostInherents = (); diff --git a/system-parachains/encointer/src/lib.rs b/system-parachains/encointer/src/lib.rs index 23785bb5cd..dc0a835ff9 100644 --- a/system-parachains/encointer/src/lib.rs +++ b/system-parachains/encointer/src/lib.rs @@ -288,7 +288,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 = SingleBlockMigrations; type MultiBlockMigrator = (); type PreInherents = (); type PostInherents = (); @@ -850,7 +850,7 @@ pub type UncheckedExtrinsic = pub type CheckedExtrinsic = generic::CheckedExtrinsic; /// Migrations to apply on runtime upgrade. -pub type Migrations = ( +pub type SingleBlockMigrations = ( pallet_session::migrations::v1::MigrateV0ToV1< Runtime, pallet_session::migrations::v1::InitOffenceSeverity, @@ -867,7 +867,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 7e18499aff..037c937b57 100644 --- a/system-parachains/people/people-kusama/src/lib.rs +++ b/system-parachains/people/people-kusama/src/lib.rs @@ -133,7 +133,7 @@ pub type UncheckedExtrinsic = generic::UncheckedExtrinsic; /// Migrations to apply on runtime upgrade. -pub type Migrations = ( +pub type SingleBlockMigrations = ( pallet_session::migrations::v1::MigrateV0ToV1< Runtime, pallet_session::migrations::v1::InitOffenceSeverity, @@ -156,7 +156,6 @@ pub type Executive = frame_executive::Executive< frame_system::ChainContext, Runtime, AllPalletsWithSystem, - Migrations, >; impl_opaque_keys! { @@ -226,6 +225,7 @@ impl frame_system::Config for Runtime { type SS58Prefix = SS58Prefix; type OnSetCode = cumulus_pallet_parachain_system::ParachainSetCode; type MaxConsumers = ConstU32<16>; + type SingleBlockMigrations = 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 e86d399f94..99deb4fea7 100644 --- a/system-parachains/people/people-polkadot/src/lib.rs +++ b/system-parachains/people/people-polkadot/src/lib.rs @@ -120,7 +120,7 @@ parameter_types! { } /// Migrations to apply on runtime upgrade. -pub type Migrations = ( +pub type SingleBlockMigrations = ( pallet_session::migrations::v1::MigrateV0ToV1< Runtime, pallet_session::migrations::v1::InitOffenceSeverity, @@ -143,7 +143,6 @@ pub type Executive = frame_executive::Executive< frame_system::ChainContext, Runtime, AllPalletsWithSystem, - Migrations, >; impl_opaque_keys! { @@ -213,6 +212,7 @@ impl frame_system::Config for Runtime { type SS58Prefix = SS58Prefix; type OnSetCode = cumulus_pallet_parachain_system::ParachainSetCode; type MaxConsumers = ConstU32<16>; + type SingleBlockMigrations = SingleBlockMigrations; type MultiBlockMigrator = MultiBlockMigrations; } From 68495dc90a2ccda872441ca3bcdbd25d84b932ff Mon Sep 17 00:00:00 2001 From: Rodrigo Quelhas Date: Thu, 7 Aug 2025 16:15:36 +0100 Subject: [PATCH 2/2] update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8133e78726..2ace6883e2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -106,6 +106,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - [#8021](https://github.com/paritytech/polkadot-sdk/pull/8021): XCMP: use batching when enqueuing inbound messages This PR implements batching for the XCMP inbound enqueueing logic, which leads to an about ~75x performance improvement for that specific code. - [#9202](https://github.com/paritytech/polkadot-sdk/pull/9202): `apply_authorized_force_set_current_code` does not need to consume the whole block +- 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