Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove DMP Queue and Allow system::authorize_upgrade in XCM #280

Merged
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

- Add `pallet-vesting` to Asset Hubs ([polkadot-fellows/runtimes#269](https://github.com/polkadot-fellows/runtimes/pull/269))
- Fix Kusama Coretime launch issues: import leases and fix renewals for short leases ([polkadot-fellows/runtimes#276](https://github.com/polkadot-fellows/runtimes/pull/276))
- Remove DMP queue and allow `system::authorize_upgrade` in XCM's call filter ([polkadot-fellows/runtimes#280](https://github.com/polkadot-fellows/runtimes/pull/280))

### Fixed

Expand Down
4 changes: 0 additions & 4 deletions Cargo.lock

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

Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,8 @@ impl Contains<RuntimeCall> for SafeCallFilter {
frame_system::Call::set_heap_pages { .. } |
frame_system::Call::set_code { .. } |
frame_system::Call::set_code_without_checks { .. } |
frame_system::Call::authorize_upgrade { .. } |
frame_system::Call::authorize_upgrade_without_checks { .. } |
frame_system::Call::kill_prefix { .. },
) | RuntimeCall::ParachainSystem(..) |
RuntimeCall::Timestamp(..) |
Expand Down
4 changes: 0 additions & 4 deletions system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ xcm-executor = { package = "staging-xcm-executor", default-features = false, ver

# Cumulus
cumulus-pallet-aura-ext = { workspace = true }
cumulus-pallet-dmp-queue = { workspace = true }
cumulus-pallet-parachain-system = { features = ["parameterized-consensus-hook",] , workspace = true }
cumulus-pallet-session-benchmarking = { workspace = true }
cumulus-pallet-xcm = { workspace = true }
Expand Down Expand Up @@ -109,7 +108,6 @@ substrate-wasm-builder = { optional = true , workspace = true }
default = [ "std" ]
runtime-benchmarks = [
"assets-common/runtime-benchmarks",
"cumulus-pallet-dmp-queue/runtime-benchmarks",
"cumulus-pallet-parachain-system/runtime-benchmarks",
"cumulus-pallet-session-benchmarking/runtime-benchmarks",
"cumulus-pallet-xcmp-queue/runtime-benchmarks",
Expand Down Expand Up @@ -145,7 +143,6 @@ runtime-benchmarks = [
]
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 Expand Up @@ -184,7 +181,6 @@ std = [
"bp-bridge-hub-polkadot/std",
"codec/std",
"cumulus-pallet-aura-ext/std",
"cumulus-pallet-dmp-queue/std",
"cumulus-pallet-parachain-system/std",
"cumulus-pallet-session-benchmarking/std",
"cumulus-pallet-xcm/std",
Expand Down
18 changes: 7 additions & 11 deletions system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -673,13 +673,6 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime {
type PriceForSiblingDelivery = PriceForSiblingParachainDelivery;
}

// TODO: remove dmp with 1.3.0 (https://github.com/polkadot-fellows/runtimes/issues/186)
impl cumulus_pallet_dmp_queue::Config for Runtime {
type WeightInfo = weights::cumulus_pallet_dmp_queue::WeightInfo<Runtime>;
type RuntimeEvent = RuntimeEvent;
type DmpSink = frame_support::traits::EnqueueWithOrigin<MessageQueue, RelayOrigin>;
}

parameter_types! {
pub const Period: u32 = 6 * HOURS;
pub const Offset: u32 = 0;
Expand Down Expand Up @@ -962,9 +955,7 @@ construct_runtime!(
XcmpQueue: cumulus_pallet_xcmp_queue = 30,
PolkadotXcm: pallet_xcm = 31,
CumulusXcm: cumulus_pallet_xcm = 32,
// TODO: remove dmp with 1.3.0 (https://github.com/polkadot-fellows/runtimes/issues/186)
// Temporary to migrate the remaining DMP messages:
DmpQueue: cumulus_pallet_dmp_queue = 33,
// DmpQueue: cumulus_pallet_dmp_queue = 33, removed
ToKusamaXcmRouter: pallet_xcm_bridge_hub_router::<Instance1> = 34,
MessageQueue: pallet_message_queue = 35,

Expand Down Expand Up @@ -1005,9 +996,15 @@ pub type SignedExtra = (
/// Unchecked extrinsic type as expected by this runtime.
pub type UncheckedExtrinsic =
generic::UncheckedExtrinsic<Address, RuntimeCall, Signature, SignedExtra>;

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

/// Migrations to apply on runtime upgrade.
pub type Migrations = (
// unreleased
frame_support::migrations::RemovePallet<DmpQueueName, RocksDbWeight>,
cumulus_pallet_xcmp_queue::migration::v4::MigrationToV4<Runtime>,
// permanent
pallet_xcm::migration::MigrateToLatestXcmVersion<Runtime>,
Expand Down Expand Up @@ -1044,7 +1041,6 @@ mod benches {
[pallet_collator_selection, CollatorSelection]
[cumulus_pallet_parachain_system, ParachainSystem]
[cumulus_pallet_xcmp_queue, XcmpQueue]
[cumulus_pallet_dmp_queue, DmpQueue]
// XCM
[pallet_xcm, PalletXcmExtrinsiscsBenchmark::<Runtime>]
// Bridges
Expand Down

This file was deleted.

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

Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,8 @@ impl Contains<RuntimeCall> for SafeCallFilter {
frame_system::Call::set_heap_pages { .. } |
frame_system::Call::set_code { .. } |
frame_system::Call::set_code_without_checks { .. } |
frame_system::Call::authorize_upgrade { .. } |
frame_system::Call::authorize_upgrade_without_checks { .. } |
frame_system::Call::kill_prefix { .. },
) | RuntimeCall::ParachainSystem(..) |
RuntimeCall::Timestamp(..) |
Expand All @@ -323,7 +325,6 @@ impl Contains<RuntimeCall> for SafeCallFilter {
pallet_collator_selection::Call::remove_invulnerable { .. },
) | RuntimeCall::Session(pallet_session::Call::purge_keys { .. }) |
RuntimeCall::XcmpQueue(..) |
RuntimeCall::DmpQueue(..) |
RuntimeCall::Assets(
pallet_assets::Call::create { .. } |
pallet_assets::Call::force_create { .. } |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,8 @@ impl Contains<RuntimeCall> for SafeCallFilter {
frame_system::Call::set_heap_pages { .. } |
frame_system::Call::set_code { .. } |
frame_system::Call::set_code_without_checks { .. } |
frame_system::Call::authorize_upgrade { .. } |
frame_system::Call::authorize_upgrade_without_checks { .. } |
frame_system::Call::kill_prefix { .. },
) | RuntimeCall::ParachainSystem(..) |
RuntimeCall::Timestamp(..) |
Expand Down
4 changes: 0 additions & 4 deletions system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ xcm-executor = { package = "staging-xcm-executor", default-features = false, ver

# Cumulus
cumulus-pallet-aura-ext = { workspace = true }
cumulus-pallet-dmp-queue = { workspace = true }
cumulus-pallet-parachain-system = { features = ["parameterized-consensus-hook",] , workspace = true }
cumulus-pallet-session-benchmarking = { workspace = true }
cumulus-pallet-xcm = { workspace = true }
Expand Down Expand Up @@ -140,7 +139,6 @@ std = [
"bridge-runtime-common/std",
"codec/std",
"cumulus-pallet-aura-ext/std",
"cumulus-pallet-dmp-queue/std",
"cumulus-pallet-parachain-system/std",
"cumulus-pallet-session-benchmarking/std",
"cumulus-pallet-xcm/std",
Expand Down Expand Up @@ -217,7 +215,6 @@ std = [
runtime-benchmarks = [
"bridge-hub-common/runtime-benchmarks",
"bridge-runtime-common/runtime-benchmarks",
"cumulus-pallet-dmp-queue/runtime-benchmarks",
"cumulus-pallet-parachain-system/runtime-benchmarks",
"cumulus-pallet-session-benchmarking/runtime-benchmarks",
"cumulus-pallet-xcmp-queue/runtime-benchmarks",
Expand Down Expand Up @@ -258,7 +255,6 @@ runtime-benchmarks = [

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
17 changes: 6 additions & 11 deletions system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,14 @@ bridge_runtime_common::generate_bridge_reject_obsolete_headers_and_messages! {
pub type UncheckedExtrinsic =
generic::UncheckedExtrinsic<Address, RuntimeCall, Signature, SignedExtra>;

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

/// Migrations to apply on runtime upgrade.
pub type Migrations = (
// unreleased
frame_support::migrations::RemovePallet<DmpQueueName, RocksDbWeight>,
cumulus_pallet_xcmp_queue::migration::v4::MigrationToV4<Runtime>,
snowbridge_pallet_system::migration::v0::InitializeOnUpgrade<
Runtime,
Expand Down Expand Up @@ -416,13 +421,6 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime {
type PriceForSiblingDelivery = PriceForSiblingParachainDelivery;
}

// TODO: remove dmp with 1.3.0 (https://github.com/polkadot-fellows/runtimes/issues/186)
impl cumulus_pallet_dmp_queue::Config for Runtime {
type WeightInfo = weights::cumulus_pallet_dmp_queue::WeightInfo<Runtime>;
type RuntimeEvent = RuntimeEvent;
type DmpSink = frame_support::traits::EnqueueWithOrigin<MessageQueue, RelayOrigin>;
}

pub const PERIOD: u32 = 6 * HOURS;
pub const OFFSET: u32 = 0;

Expand Down Expand Up @@ -526,9 +524,7 @@ construct_runtime!(
XcmpQueue: cumulus_pallet_xcmp_queue = 30,
PolkadotXcm: pallet_xcm = 31,
CumulusXcm: cumulus_pallet_xcm = 32,
// TODO: remove dmp with 1.3.0 (https://github.com/polkadot-fellows/runtimes/issues/186)
// Temporary to migrate the remaining DMP messages:
DmpQueue: cumulus_pallet_dmp_queue = 33,
// DmpQueue: cumulus_pallet_dmp_queue = 33, removed

// Handy utilities.
Utility: pallet_utility = 40,
Expand Down Expand Up @@ -568,7 +564,6 @@ mod benches {
[pallet_collator_selection, CollatorSelection]
[cumulus_pallet_parachain_system, ParachainSystem]
[cumulus_pallet_xcmp_queue, XcmpQueue]
[cumulus_pallet_dmp_queue, DmpQueue]
// XCM
[pallet_xcm, PalletXcmExtrinsiscsBenchmark::<Runtime>]
// NOTE: Make sure you point to the individual modules below.
Expand Down
Loading
Loading