From 432100cb6f595d75ca6c30a1f4a2b5d9452d2a3d Mon Sep 17 00:00:00 2001 From: Xiliang Chen Date: Tue, 26 Mar 2024 19:32:40 +1300 Subject: [PATCH] Remove dmp queue (#2726) * wip * remove dmp queue --- Cargo.lock | 23 ----------------------- Cargo.toml | 1 - runtime/acala/Cargo.toml | 3 --- runtime/acala/src/lib.rs | 9 +++++++-- runtime/acala/src/xcm_config.rs | 6 ------ runtime/integration-tests/Cargo.toml | 1 - runtime/karura/Cargo.toml | 3 --- runtime/karura/src/lib.rs | 9 +++++++-- runtime/karura/src/xcm_config.rs | 6 ------ runtime/mandala/Cargo.toml | 3 --- runtime/mandala/src/lib.rs | 4 ++-- runtime/mandala/src/xcm_config.rs | 6 ------ 12 files changed, 16 insertions(+), 58 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index fb7dc5c53..c56526b66 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -104,7 +104,6 @@ version = "2.24.0" dependencies = [ "acala-primitives", "cumulus-pallet-aura-ext", - "cumulus-pallet-dmp-queue", "cumulus-pallet-parachain-system", "cumulus-pallet-xcm", "cumulus-pallet-xcmp-queue", @@ -2334,25 +2333,6 @@ dependencies = [ "sp-std", ] -[[package]] -name = "cumulus-pallet-dmp-queue" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f461956a4a85c053657fe64e73852940c8a52e7d8fc20ccb4f91688e73f0820b" -dependencies = [ - "cumulus-primitives-core", - "frame-benchmarking", - "frame-support", - "frame-system", - "log", - "parity-scale-codec", - "scale-info", - "sp-io", - "sp-runtime", - "sp-std", - "staging-xcm", -] - [[package]] name = "cumulus-pallet-parachain-system" version = "0.7.0" @@ -5069,7 +5049,6 @@ version = "2.24.0" dependencies = [ "acala-primitives", "cumulus-pallet-aura-ext", - "cumulus-pallet-dmp-queue", "cumulus-pallet-parachain-system", "cumulus-pallet-xcm", "cumulus-pallet-xcmp-queue", @@ -5945,7 +5924,6 @@ dependencies = [ "acala-primitives", "acala-service", "cumulus-pallet-aura-ext", - "cumulus-pallet-dmp-queue", "cumulus-pallet-parachain-system", "cumulus-pallet-xcm", "cumulus-pallet-xcmp-queue", @@ -11630,7 +11608,6 @@ dependencies = [ "acala-runtime", "acala-service", "cumulus-pallet-aura-ext", - "cumulus-pallet-dmp-queue", "cumulus-pallet-parachain-system", "cumulus-pallet-xcm", "cumulus-pallet-xcmp-queue", diff --git a/Cargo.toml b/Cargo.toml index a7c28cb7b..98f2a5f21 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -231,7 +231,6 @@ orml-build-script-utils = { path = "orml/build-script-utils" } # polkadot-sdk (wasm) cumulus-pallet-aura-ext = { version = "0.7.0", default-features = false } -cumulus-pallet-dmp-queue = { version = "0.7.0", default-features = false } cumulus-pallet-parachain-system = { version = "0.7.0", default-features = false } cumulus-pallet-xcm = { version = "0.7.0", default-features = false } cumulus-pallet-xcmp-queue = { version = "0.7.0", default-features = false } diff --git a/runtime/acala/Cargo.toml b/runtime/acala/Cargo.toml index cdb5b5f53..c361281d9 100644 --- a/runtime/acala/Cargo.toml +++ b/runtime/acala/Cargo.toml @@ -61,7 +61,6 @@ cumulus-primitives-core = { workspace = true } cumulus-primitives-utility = { workspace = true } cumulus-primitives-timestamp = { workspace = true } cumulus-pallet-parachain-system = { workspace = true } -cumulus-pallet-dmp-queue = { workspace = true } cumulus-pallet-xcmp-queue = { workspace = true } cumulus-pallet-xcm = { workspace = true } parachain-info = { workspace = true } @@ -194,7 +193,6 @@ std = [ "substrate-wasm-builder", "cumulus-pallet-aura-ext/std", - "cumulus-pallet-dmp-queue/std", "cumulus-pallet-parachain-system/std", "cumulus-pallet-xcm/std", "cumulus-pallet-xcmp-queue/std", @@ -351,7 +349,6 @@ try-runtime = [ "pallet-utility/try-runtime", "cumulus-pallet-aura-ext/try-runtime", - "cumulus-pallet-dmp-queue/try-runtime", "cumulus-pallet-parachain-system/try-runtime", "cumulus-pallet-xcm/try-runtime", "cumulus-pallet-xcmp-queue/try-runtime", diff --git a/runtime/acala/src/lib.rs b/runtime/acala/src/lib.rs index 5a31b90d6..818519dfc 100644 --- a/runtime/acala/src/lib.rs +++ b/runtime/acala/src/lib.rs @@ -1794,7 +1794,7 @@ construct_runtime!( XcmpQueue: cumulus_pallet_xcmp_queue = 50, PolkadotXcm: pallet_xcm = 51, CumulusXcm: cumulus_pallet_xcm exclude_parts { Call } = 52, - DmpQueue: cumulus_pallet_dmp_queue = 53, + // 53 was used by DmpQueue which is now replaced by MessageQueue XTokens: orml_xtokens = 54, UnknownTokens: orml_unknown_tokens = 55, OrmlXcm: orml_xcm = 56, @@ -1905,8 +1905,13 @@ pub type Executive = frame_executive::Executive< Migrations, >; +parameter_types! { + pub const DmpQueuePalletName: &'static str = "DmpQueue"; +} + #[allow(unused_parens)] -type Migrations = (cumulus_pallet_xcmp_queue::migration::v4::MigrationToV4,); +type Migrations = + (frame_support::migrations::RemovePallet::DbWeight>,); #[cfg(feature = "runtime-benchmarks")] #[macro_use] diff --git a/runtime/acala/src/xcm_config.rs b/runtime/acala/src/xcm_config.rs index ac1cefeab..1effa5959 100644 --- a/runtime/acala/src/xcm_config.rs +++ b/runtime/acala/src/xcm_config.rs @@ -212,12 +212,6 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime { type PriceForSiblingDelivery = NoPriceForMessageDelivery; } -impl cumulus_pallet_dmp_queue::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type WeightInfo = cumulus_pallet_dmp_queue::weights::SubstrateWeight; - type DmpSink = frame_support::traits::EnqueueWithOrigin; -} - parameter_types! { pub MessageQueueServiceWeight: Weight = Perbill::from_percent(35) * RuntimeBlockWeights::get().max_block; } diff --git a/runtime/integration-tests/Cargo.toml b/runtime/integration-tests/Cargo.toml index ef166f1a9..7806db5d2 100644 --- a/runtime/integration-tests/Cargo.toml +++ b/runtime/integration-tests/Cargo.toml @@ -57,7 +57,6 @@ cumulus-primitives-core = { workspace = true, features = ["std"] } cumulus-primitives-utility = { workspace = true, features = ["std"] } cumulus-primitives-timestamp = { workspace = true, features = ["std"] } cumulus-pallet-parachain-system = { workspace = true, features = ["std"] } -cumulus-pallet-dmp-queue = { workspace = true, features = ["std"] } cumulus-pallet-xcmp-queue = { workspace = true, features = ["std"] } cumulus-pallet-xcm = { workspace = true, features = ["std"] } parachain-info = { workspace = true, features = ["std"] } diff --git a/runtime/karura/Cargo.toml b/runtime/karura/Cargo.toml index 3bb5eab50..5580f8c52 100644 --- a/runtime/karura/Cargo.toml +++ b/runtime/karura/Cargo.toml @@ -61,7 +61,6 @@ cumulus-primitives-core = { workspace = true } cumulus-primitives-utility = { workspace = true } cumulus-primitives-timestamp = { workspace = true } cumulus-pallet-parachain-system = { workspace = true } -cumulus-pallet-dmp-queue = { workspace = true } cumulus-pallet-xcmp-queue = { workspace = true } cumulus-pallet-xcm = { workspace = true } parachain-info = { workspace = true } @@ -195,7 +194,6 @@ std = [ "substrate-wasm-builder", "cumulus-pallet-aura-ext/std", - "cumulus-pallet-dmp-queue/std", "cumulus-pallet-parachain-system/std", "cumulus-pallet-xcm/std", "cumulus-pallet-xcmp-queue/std", @@ -353,7 +351,6 @@ try-runtime = [ "pallet-utility/try-runtime", "cumulus-pallet-aura-ext/try-runtime", - "cumulus-pallet-dmp-queue/try-runtime", "cumulus-pallet-parachain-system/try-runtime", "cumulus-pallet-xcm/try-runtime", "cumulus-pallet-xcmp-queue/try-runtime", diff --git a/runtime/karura/src/lib.rs b/runtime/karura/src/lib.rs index e8e77cd6e..983d8d782 100644 --- a/runtime/karura/src/lib.rs +++ b/runtime/karura/src/lib.rs @@ -1797,7 +1797,7 @@ construct_runtime!( XcmpQueue: cumulus_pallet_xcmp_queue = 50, PolkadotXcm: pallet_xcm = 51, CumulusXcm: cumulus_pallet_xcm exclude_parts { Call } = 52, - DmpQueue: cumulus_pallet_dmp_queue = 53, + // 53 was used by DmpQueue which is now replaced by MessageQueue XTokens: orml_xtokens = 54, UnknownTokens: orml_unknown_tokens = 55, OrmlXcm: orml_xcm = 56, @@ -1909,8 +1909,13 @@ pub type Executive = frame_executive::Executive< Migrations, >; +parameter_types! { + pub const DmpQueuePalletName: &'static str = "DmpQueue"; +} + #[allow(unused_parens)] -type Migrations = (cumulus_pallet_xcmp_queue::migration::v4::MigrationToV4,); +type Migrations = + (frame_support::migrations::RemovePallet::DbWeight>,); #[cfg(feature = "runtime-benchmarks")] #[macro_use] diff --git a/runtime/karura/src/xcm_config.rs b/runtime/karura/src/xcm_config.rs index c540b0191..b4656d4df 100644 --- a/runtime/karura/src/xcm_config.rs +++ b/runtime/karura/src/xcm_config.rs @@ -259,12 +259,6 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime { type PriceForSiblingDelivery = NoPriceForMessageDelivery; } -impl cumulus_pallet_dmp_queue::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type WeightInfo = cumulus_pallet_dmp_queue::weights::SubstrateWeight; - type DmpSink = frame_support::traits::EnqueueWithOrigin; -} - parameter_types! { pub MessageQueueServiceWeight: Weight = Perbill::from_percent(35) * RuntimeBlockWeights::get().max_block; } diff --git a/runtime/mandala/Cargo.toml b/runtime/mandala/Cargo.toml index d8c246f42..c9267de97 100644 --- a/runtime/mandala/Cargo.toml +++ b/runtime/mandala/Cargo.toml @@ -65,7 +65,6 @@ cumulus-primitives-core = { workspace = true } cumulus-primitives-utility = { workspace = true } cumulus-primitives-timestamp = { workspace = true } cumulus-pallet-parachain-system = { workspace = true } -cumulus-pallet-dmp-queue = { workspace = true } cumulus-pallet-xcmp-queue = { workspace = true } cumulus-pallet-xcm = { workspace = true } parachain-info = { workspace = true } @@ -211,7 +210,6 @@ std = [ "substrate-wasm-builder", "cumulus-pallet-aura-ext/std", - "cumulus-pallet-dmp-queue/std", "cumulus-pallet-parachain-system/std", "cumulus-pallet-xcm/std", "cumulus-pallet-xcmp-queue/std", @@ -383,7 +381,6 @@ try-runtime = [ "pallet-utility/try-runtime", "cumulus-pallet-aura-ext/try-runtime", - "cumulus-pallet-dmp-queue/try-runtime", "cumulus-pallet-parachain-system/try-runtime", "cumulus-pallet-xcm/try-runtime", "cumulus-pallet-xcmp-queue/try-runtime", diff --git a/runtime/mandala/src/lib.rs b/runtime/mandala/src/lib.rs index 25234aa33..ab96ccbb7 100644 --- a/runtime/mandala/src/lib.rs +++ b/runtime/mandala/src/lib.rs @@ -1989,7 +1989,7 @@ pub type Executive = frame_executive::Executive< >; #[allow(unused_parens)] -type Migrations = (cumulus_pallet_xcmp_queue::migration::v4::MigrationToV4,); +type Migrations = (); construct_runtime!( pub enum Runtime { @@ -2080,7 +2080,7 @@ construct_runtime!( XcmpQueue: cumulus_pallet_xcmp_queue = 170, PolkadotXcm: pallet_xcm = 171, CumulusXcm: cumulus_pallet_xcm exclude_parts { Call } = 172, - DmpQueue: cumulus_pallet_dmp_queue = 173, + // DmpQueue is removed XTokens: orml_xtokens = 174, UnknownTokens: orml_unknown_tokens = 175, OrmlXcm: orml_xcm = 176, diff --git a/runtime/mandala/src/xcm_config.rs b/runtime/mandala/src/xcm_config.rs index 5feb2f9f2..88cce7abc 100644 --- a/runtime/mandala/src/xcm_config.rs +++ b/runtime/mandala/src/xcm_config.rs @@ -202,12 +202,6 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime { type PriceForSiblingDelivery = NoPriceForMessageDelivery; } -impl cumulus_pallet_dmp_queue::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type WeightInfo = cumulus_pallet_dmp_queue::weights::SubstrateWeight; - type DmpSink = frame_support::traits::EnqueueWithOrigin; -} - parameter_types! { pub MessageQueueServiceWeight: Weight = Perbill::from_percent(35) * RuntimeBlockWeights::get().max_block; }