From 7320a1887ea30dd0f524133fc4dd3d52dfd74ae5 Mon Sep 17 00:00:00 2001 From: Christian Langenbacher Date: Tue, 4 Jun 2024 11:59:01 +0200 Subject: [PATCH 1/2] [runtime] execute single block migrations in the `Executive` again --- runtime/bajun/src/lib.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/runtime/bajun/src/lib.rs b/runtime/bajun/src/lib.rs index 56ab2de..7e6cf3c 100644 --- a/runtime/bajun/src/lib.rs +++ b/runtime/bajun/src/lib.rs @@ -157,6 +157,7 @@ pub type Executive = frame_executive::Executive< frame_system::ChainContext, Runtime, AllPalletsWithSystem, + SingleBlockMigrations, >; /// Handles converting a weight scalar to a fee value, based on the scale and granularity of the @@ -374,8 +375,13 @@ impl frame_system::Config for Runtime { /// The Block provider type type Block = Block; type RuntimeTask = RuntimeTask; - type SingleBlockMigrations = SingleBlockMigrations; - type MultiBlockMigrator = pallet_migrations::Pallet; + // Note: Single block migrations are currently run in the classical way in the `Executive` + // because try-runtime doesn't support the pallet-migrations yet. + // + // Once it is supported, we want to switch to the pallet-migrations, but we **must** ensure + // that we remove the migrations from the `Executive` to prevent running the migrations twice. + type SingleBlockMigrations = (); + type MultiBlockMigrator = (); type PreInherents = (); type PostInherents = (); type PostTransactions = (); From 4ec23af24824c1b4eff556815e6bf1d86a2b63c6 Mon Sep 17 00:00:00 2001 From: Christian Langenbacher Date: Tue, 4 Jun 2024 13:42:10 +0200 Subject: [PATCH 2/2] [runtime] fix: configure the Multiblock migrator without configuring multiblock migrations --- runtime/bajun/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/bajun/src/lib.rs b/runtime/bajun/src/lib.rs index 7e6cf3c..b8d1b50 100644 --- a/runtime/bajun/src/lib.rs +++ b/runtime/bajun/src/lib.rs @@ -381,7 +381,7 @@ impl frame_system::Config for Runtime { // Once it is supported, we want to switch to the pallet-migrations, but we **must** ensure // that we remove the migrations from the `Executive` to prevent running the migrations twice. type SingleBlockMigrations = (); - type MultiBlockMigrator = (); + type MultiBlockMigrator = pallet_migrations::Pallet; type PreInherents = (); type PostInherents = (); type PostTransactions = ();