Skip to content

Commit

Permalink
Remove DMP Queue (#1340)
Browse files Browse the repository at this point in the history
* remove dmp pallet

Signed-off-by: Charles Ferrell <charlie@manta.network>

* fix integration test

Signed-off-by: Charles Ferrell <charlie@manta.network>

* [no ci] remove migration

Signed-off-by: Charles Ferrell <charlie@manta.network>

---------

Signed-off-by: Charles Ferrell <charlie@manta.network>
Signed-off-by: Jamie <djptux@gmail.com>
Co-authored-by: Jamie <djptux@gmail.com>
  • Loading branch information
ferrell-code and Dengjianping authored Jun 28, 2024
1 parent 7491ac0 commit dab9548
Show file tree
Hide file tree
Showing 13 changed files with 6 additions and 53 deletions.
22 changes: 0 additions & 22 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,6 @@ cumulus-client-consensus-relay-chain = { git = "https://github.com/paritytech/po
cumulus-client-network = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0" }
cumulus-client-parachain-inherent = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0" }
cumulus-client-service = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0" }
cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false }
cumulus-pallet-parachain-system = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false, features = [
"parameterized-consensus-hook",
] }
Expand Down
3 changes: 0 additions & 3 deletions runtime/calamari/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ pallet-ranked-collective = { workspace = true }
pallet-referenda = { workspace = true }

# Cumulus dependencies
cumulus-pallet-dmp-queue = { workspace = true }
cumulus-pallet-parachain-system = { workspace = true, features = ["parameterized-consensus-hook"] }
cumulus-pallet-session-benchmarking = { workspace = true, optional = true }
cumulus-pallet-xcm = { workspace = true }
Expand Down Expand Up @@ -221,7 +220,6 @@ try-runtime = [
'parachain-info/try-runtime',
'cumulus-pallet-parachain-system/try-runtime',
'cumulus-pallet-xcmp-queue/try-runtime',
'cumulus-pallet-dmp-queue/try-runtime',
'pallet-aura-style-filter/try-runtime',
'manta-collator-selection/try-runtime',
'cumulus-pallet-xcm/try-runtime',
Expand Down Expand Up @@ -290,7 +288,6 @@ std = [
'runtime-common/std',
'parachain-info/std',
'cumulus-pallet-parachain-system/std',
'cumulus-pallet-dmp-queue/std',
"cumulus-pallet-xcmp-queue/std",
'cumulus-pallet-xcm/std',
'cumulus-primitives-core/std',
Expand Down
6 changes: 3 additions & 3 deletions runtime/calamari/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ impl Contains<RuntimeCall> for BaseFilter {
| pallet_democracy::Call::clear_public_proposals {..})
| RuntimeCall::Treasury(_) // Treasury calls are filtered while it is accumulating funds.
// Filter callables from XCM pallets, we use XTokens exclusively
| RuntimeCall::XcmpQueue(_) | RuntimeCall::DmpQueue(_) => false,
| RuntimeCall::XcmpQueue(_) => false,

// Explicitly ALLOWED calls
| RuntimeCall::Multisig(_)
Expand Down Expand Up @@ -1057,7 +1057,7 @@ construct_runtime!(
XcmpQueue: cumulus_pallet_xcmp_queue::{Pallet, Call, Storage, Event<T>} = 30,
PolkadotXcm: pallet_xcm::{Pallet, Call, Storage, Event<T>, Origin, Config<T>} = 31,
CumulusXcm: cumulus_pallet_xcm::{Pallet, Event<T>, Origin} = 32,
DmpQueue: cumulus_pallet_dmp_queue::{Pallet, Call, Storage, Event<T>} = 33,
// DMP queue pallet used to occupy 33
XTokens: orml_xtokens::{Pallet, Call, Event<T>, Storage} = 34,
MessageQueue: pallet_message_queue::{Pallet, Call, Storage, Event<T>} = 35,

Expand Down Expand Up @@ -1113,7 +1113,7 @@ pub type CheckedExtrinsic = generic::CheckedExtrinsic<AccountId, RuntimeCall, Si

/// Types for runtime upgrading.
/// Each type should implement trait `OnRuntimeUpgrade`.
pub type OnRuntimeUpgradeHooks = cumulus_pallet_xcmp_queue::migration::v4::MigrationToV4<Runtime>;
pub type OnRuntimeUpgradeHooks = ();
/// Executive: handles dispatch to the various modules.
pub type Executive = frame_executive::Executive<
Runtime,
Expand Down
6 changes: 0 additions & 6 deletions runtime/calamari/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -350,12 +350,6 @@ parameter_types! {
pub const RelayOrigin: AggregateMessageOrigin = AggregateMessageOrigin::Parent;
}

impl cumulus_pallet_dmp_queue::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type DmpSink = EnqueueWithOrigin<MessageQueue, RelayOrigin>;
type WeightInfo = cumulus_pallet_dmp_queue::weights::SubstrateWeight<Self>;
}

/// We wrap AssetId for XToken
#[derive(Clone, Eq, Debug, PartialEq, Ord, PartialOrd, Encode, Decode, TypeInfo)]
pub enum CurrencyId {
Expand Down
1 change: 0 additions & 1 deletion runtime/common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ xcm-executor = { workspace = true, features = ["std"] }
xcm-simulator = { workspace = true }

# Cumulus dependencies
cumulus-pallet-dmp-queue = { workspace = true, features = ["std"] }
cumulus-pallet-parachain-system = { workspace = true, features = ["std"] }
cumulus-pallet-xcm = { workspace = true, features = ["std"] }
cumulus-pallet-xcmp-queue = { workspace = true, features = ["std"] }
Expand Down
1 change: 0 additions & 1 deletion runtime/integration-tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ polkadot-runtime-parachains = { workspace = true, features = ["std"] }
xcm-simulator = { workspace = true }

# Cumulus dependencies
cumulus-pallet-dmp-queue = { workspace = true, features = ["std"] }
cumulus-pallet-parachain-system = { workspace = true, features = ["std"] }
cumulus-pallet-xcm = { workspace = true, features = ["std"] }
cumulus-pallet-xcmp-queue = { workspace = true, features = ["std"] }
Expand Down
2 changes: 1 addition & 1 deletion runtime/integration-tests/src/integrations_mock/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ cfg_if::cfg_if! {
RuntimeOrigin, ParachainStaking, PolkadotXcm, Range, Runtime, Session, System, Timestamp, TransactionPause,
TransactionPayment, Treasury, Utility, TechnicalCommittee, Council, EnactmentPeriod, VotingPeriod,
LaunchPeriod, Preimage, Democracy, Scheduler, Aura, Multisig, ParachainSystem, ParachainInfo,
XTokens, DmpQueue, CumulusXcm, XcmpQueue, AuraAuthorFilter, NonPausablePallets, AllPalletsWithSystem
XTokens, CumulusXcm, XcmpQueue, AuraAuthorFilter, NonPausablePallets, AllPalletsWithSystem
};
type RuntimeAssetConfig = manta_runtime::assets_config::MantaAssetConfig;
type RuntimeConcreteFungibleLedger = manta_runtime::assets_config::MantaConcreteFungibleLedger;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ fn verify_pallet_prefixes() {
is_pallet_prefix::<calamari_runtime::XcmpQueue>("XcmpQueue");
is_pallet_prefix::<calamari_runtime::PolkadotXcm>("PolkadotXcm");
is_pallet_prefix::<calamari_runtime::CumulusXcm>("CumulusXcm");
is_pallet_prefix::<calamari_runtime::DmpQueue>("DmpQueue");
is_pallet_prefix::<calamari_runtime::XTokens>("XTokens");

is_pallet_prefix::<calamari_runtime::Utility>("Utility");
Expand Down Expand Up @@ -304,7 +303,6 @@ fn verify_calamari_pallet_indices() {
is_pallet_index::<calamari_runtime::XcmpQueue>(30);
is_pallet_index::<calamari_runtime::PolkadotXcm>(31);
is_pallet_index::<calamari_runtime::CumulusXcm>(32);
is_pallet_index::<calamari_runtime::DmpQueue>(33);
is_pallet_index::<calamari_runtime::XTokens>(34);

is_pallet_index::<calamari_runtime::Utility>(40);
Expand Down
2 changes: 0 additions & 2 deletions runtime/integration-tests/src/integrations_mock/test_manta.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ fn verify_pallet_prefixes() {
is_pallet_prefix::<XcmpQueue>("XcmpQueue");
is_pallet_prefix::<PolkadotXcm>("PolkadotXcm");
is_pallet_prefix::<CumulusXcm>("CumulusXcm");
is_pallet_prefix::<DmpQueue>("DmpQueue");
is_pallet_prefix::<XTokens>("XTokens");

is_pallet_prefix::<Utility>("Utility");
Expand Down Expand Up @@ -192,7 +191,6 @@ fn verify_manta_pallet_indices() {
is_pallet_index::<XcmpQueue>(30);
is_pallet_index::<PolkadotXcm>(31);
is_pallet_index::<CumulusXcm>(32);
is_pallet_index::<DmpQueue>(33);
is_pallet_index::<XTokens>(34);

is_pallet_index::<Utility>(40);
Expand Down
3 changes: 0 additions & 3 deletions runtime/manta/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ pallet-treasury = { workspace = true }
pallet-utility = { workspace = true }

# Cumulus dependencies
cumulus-pallet-dmp-queue = { workspace = true }
cumulus-pallet-parachain-system = { workspace = true }
cumulus-pallet-session-benchmarking = { workspace = true, optional = true }
cumulus-pallet-xcm = { workspace = true }
Expand Down Expand Up @@ -198,7 +197,6 @@ try-runtime = [
"parachain-info/try-runtime",
'pallet-aura/try-runtime',
'pallet-xcm/try-runtime',
"cumulus-pallet-dmp-queue/try-runtime",
'pallet-aura-style-filter/try-runtime',
'manta-collator-selection/try-runtime',
'pallet-sudo/try-runtime',
Expand Down Expand Up @@ -269,7 +267,6 @@ std = [
'runtime-common/std',
'parachain-info/std',
'cumulus-pallet-parachain-system/std',
'cumulus-pallet-dmp-queue/std',
"cumulus-pallet-xcmp-queue/std",
"cumulus-pallet-xcm/std",
"cumulus-primitives-core/std",
Expand Down
4 changes: 2 additions & 2 deletions runtime/manta/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -999,7 +999,7 @@ construct_runtime!(
XcmpQueue: cumulus_pallet_xcmp_queue::{Pallet, Call, Storage, Event<T>} = 30,
PolkadotXcm: pallet_xcm::{Pallet, Call, Storage, Event<T>, Origin, Config<T>} = 31,
CumulusXcm: cumulus_pallet_xcm::{Pallet, Event<T>, Origin} = 32,
DmpQueue: cumulus_pallet_dmp_queue::{Pallet, Call, Storage, Event<T>} = 33,
// DMP queue pallet used to occupy 33
XTokens: orml_xtokens::{Pallet, Call, Event<T>, Storage} = 34,
MessageQueue: pallet_message_queue::{Pallet, Call, Storage, Event<T>} = 35,

Expand Down Expand Up @@ -1053,7 +1053,7 @@ pub type CheckedExtrinsic = generic::CheckedExtrinsic<AccountId, RuntimeCall, Si

/// Types for runtime upgrading.
/// Each type should implement trait `OnRuntimeUpgrade`.
pub type OnRuntimeUpgradeHooks = cumulus_pallet_xcmp_queue::migration::v4::MigrationToV4<Runtime>;
pub type OnRuntimeUpgradeHooks = ();
/// Executive: handles dispatch to the various modules.
pub type Executive = frame_executive::Executive<
Runtime,
Expand Down
6 changes: 0 additions & 6 deletions runtime/manta/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -299,12 +299,6 @@ parameter_types! {
pub const RelayOrigin: AggregateMessageOrigin = AggregateMessageOrigin::Parent;
}

impl cumulus_pallet_dmp_queue::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type DmpSink = EnqueueWithOrigin<MessageQueue, RelayOrigin>;
type WeightInfo = cumulus_pallet_dmp_queue::weights::SubstrateWeight<Self>;
}

impl cumulus_pallet_xcm::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type XcmExecutor = XcmExecutor<XcmExecutorConfig>;
Expand Down

0 comments on commit dab9548

Please sign in to comment.