Skip to content

Commit

Permalink
Remove dmp queue (#1279)
Browse files Browse the repository at this point in the history
  • Loading branch information
hqwangningbo authored Jun 24, 2024
1 parent 7e58dc5 commit 299d779
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 47 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 @@ -124,7 +124,6 @@ orml-oracle = { git = "https://github.com/bifrost-finance/open-runtime-m
cumulus-client-collator = { version = "0.8.0", default-features = false }
cumulus-client-consensus-proposer = { version = "0.8.0", default-features = false }
cumulus-pallet-aura-ext = { version = "0.8.0", default-features = false }
cumulus-pallet-dmp-queue = { version = "0.8.0", default-features = false }
cumulus-pallet-parachain-system = { version = "0.8.0", default-features = false, features = ["parameterized-consensus-hook"] }
cumulus-pallet-xcm = { version = "0.8.0", default-features = false }
cumulus-pallet-xcmp-queue = { version = "0.8.0", default-features = false }
Expand Down
3 changes: 0 additions & 3 deletions runtime/bifrost-kusama/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ sp-genesis-builder = { workspace = true }

# Cumulus dependencies
cumulus-pallet-aura-ext = { workspace = true }
cumulus-pallet-dmp-queue = { workspace = true }
cumulus-pallet-parachain-system = { workspace = true }
cumulus-pallet-xcm = { workspace = true }
cumulus-pallet-xcmp-queue = { workspace = true }
Expand Down Expand Up @@ -206,7 +205,6 @@ std = [
"sp-version/std",

"cumulus-pallet-aura-ext/std",
"cumulus-pallet-dmp-queue/std",
"cumulus-pallet-parachain-system/std",
"cumulus-pallet-xcm/std",
"cumulus-pallet-xcmp-queue/std",
Expand Down Expand Up @@ -348,7 +346,6 @@ try-runtime = [
"cumulus-pallet-xcmp-queue/try-runtime",
"pallet-xcm/try-runtime",
"cumulus-pallet-xcm/try-runtime",
"cumulus-pallet-dmp-queue/try-runtime",
"pallet-utility/try-runtime",
"pallet-scheduler/try-runtime",
"pallet-proxy/try-runtime",
Expand Down
14 changes: 12 additions & 2 deletions runtime/bifrost-kusama/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1934,7 +1934,6 @@ construct_runtime! {
XcmpQueue: cumulus_pallet_xcmp_queue = 40,
PolkadotXcm: pallet_xcm = 41,
CumulusXcm: cumulus_pallet_xcm = 42,
DmpQueue: cumulus_pallet_dmp_queue = 43,
MessageQueue: pallet_message_queue = 44,

// utilities
Expand Down Expand Up @@ -2030,6 +2029,10 @@ pub type CheckedExtrinsic = generic::CheckedExtrinsic<AccountId, RuntimeCall, Si
/// The payload being signed in transactions.
pub type SignedPayload = generic::SignedPayload<RuntimeCall, SignedExtra>;

parameter_types! {
pub const DmpQueuePalletName: &'static str = "DmpQueue";
}

/// 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
Expand All @@ -2042,7 +2045,14 @@ pub mod migrations {
use super::*;

/// Unreleased migrations. Add new ones here:
pub type Unreleased = (bifrost_slpx::migration::v1::MigrateToV1<Runtime>,);
pub type Unreleased = (
bifrost_slpx::migration::v1::MigrateToV1<Runtime>,
frame_support::migrations::RemovePallet<
DmpQueuePalletName,
<Runtime as frame_system::Config>::DbWeight,
>,
pallet_xcm::migration::MigrateToLatestXcmVersion<Runtime>,
);
}

/// Executive: handles dispatch to the various modules.
Expand Down
6 changes: 0 additions & 6 deletions runtime/bifrost-kusama/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -728,12 +728,6 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime {
type PriceForSiblingDelivery = NoPriceForMessageDelivery<ParaId>;
}

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

parameter_types! {
pub MessageQueueServiceWeight: Weight = Perbill::from_percent(35) * RuntimeBlockWeights::get().max_block;
}
Expand Down
3 changes: 0 additions & 3 deletions runtime/bifrost-polkadot/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ sp-genesis-builder = { workspace = true }

# Cumulus dependencies
cumulus-pallet-aura-ext = { workspace = true }
cumulus-pallet-dmp-queue = { workspace = true }
cumulus-pallet-parachain-system = { workspace = true }
cumulus-pallet-xcm = { workspace = true }
cumulus-pallet-xcmp-queue = { workspace = true }
Expand Down Expand Up @@ -200,7 +199,6 @@ std = [
"sp-genesis-builder/std",

"cumulus-pallet-aura-ext/std",
"cumulus-pallet-dmp-queue/std",
"cumulus-pallet-parachain-system/std",
"cumulus-pallet-xcm/std",
"cumulus-pallet-xcmp-queue/std",
Expand Down Expand Up @@ -325,7 +323,6 @@ try-runtime = [
"bifrost-vtoken-voting/try-runtime",
"bifrost-xcm-interface/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",
Expand Down
14 changes: 12 additions & 2 deletions runtime/bifrost-polkadot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1769,7 +1769,6 @@ construct_runtime! {
XcmpQueue: cumulus_pallet_xcmp_queue = 40,
PolkadotXcm: pallet_xcm = 41,
CumulusXcm: cumulus_pallet_xcm = 42,
DmpQueue: cumulus_pallet_dmp_queue = 43,
MessageQueue: pallet_message_queue = 44,

// utilities
Expand Down Expand Up @@ -1864,6 +1863,10 @@ pub type CheckedExtrinsic = generic::CheckedExtrinsic<AccountId, RuntimeCall, Si
/// The payload being signed in transactions.
pub type SignedPayload = generic::SignedPayload<RuntimeCall, SignedExtra>;

parameter_types! {
pub const DmpQueuePalletName: &'static str = "DmpQueue";
}

/// 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
Expand All @@ -1876,7 +1879,14 @@ pub mod migrations {
use super::*;

/// Unreleased migrations. Add new ones here:
pub type Unreleased = (bifrost_slpx::migration::v1::MigrateToV1<Runtime>,);
pub type Unreleased = (
bifrost_slpx::migration::v1::MigrateToV1<Runtime>,
frame_support::migrations::RemovePallet<
DmpQueuePalletName,
<Runtime as frame_system::Config>::DbWeight,
>,
pallet_xcm::migration::MigrateToLatestXcmVersion<Runtime>,
);
}

/// Executive: handles dispatch to the various modules.
Expand Down
6 changes: 0 additions & 6 deletions runtime/bifrost-polkadot/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -579,12 +579,6 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime {
type PriceForSiblingDelivery = NoPriceForMessageDelivery<ParaId>;
}

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

parameter_types! {
pub MessageQueueServiceWeight: Weight = Perbill::from_percent(35) * RuntimeBlockWeights::get().max_block;
}
Expand Down
2 changes: 0 additions & 2 deletions runtime/common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ cumulus-pallet-parachain-system = { workspace = true }
cumulus-primitives-core = { workspace = true }
cumulus-primitives-timestamp = { workspace = true }
cumulus-primitives-utility = { workspace = true }
cumulus-pallet-dmp-queue = { workspace = true }
cumulus-pallet-xcmp-queue = { workspace = true }
cumulus-pallet-xcm = { workspace = true }
parachain-info = { workspace = true }
Expand Down Expand Up @@ -98,7 +97,6 @@ std = [
"pallet-treasury/std",
"pallet-scheduler/std",
"pallet-transaction-payment/std",
"cumulus-pallet-dmp-queue/std",
"cumulus-pallet-parachain-system/std",
"cumulus-pallet-xcmp-queue/std",
"cumulus-pallet-xcm/std",
Expand Down

0 comments on commit 299d779

Please sign in to comment.