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

Unstuck Polkadot<>Kusama bridge #277

Merged
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,16 @@ Changelog for the runtimes governed by the Polkadot Fellowship.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## Unreleased
## [Unreleased]

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please change the heading to ## [Unreleased] and then the migration checks will work.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, that's the reason. Thank you

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, AH migration still fails. I can do the same trick as for Kusama BH: 22dc93e, but perhaps worth a separate PR

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Encointer fails for all PRs iiuc

- Add `pallet-vesting` to Asset Hubs ([polkadot-fellows/runtimes#269](https://github.com/polkadot-fellows/runtimes/pull/269))

### Fixed

- Bumped `bp-header-chain` dependency and added migration to Polkadot Bridge Hub to unstuck
bridge with Kusama. Details may be found in relevant
[polkadot-sdk](https://github.com/paritytech/polkadot-sdk/pull/4208) PR.

## [1.2.1] 09.04.2024

### Changed
Expand Down
4 changes: 2 additions & 2 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ asset-test-utils = { version = "8.0.1" }
assets-common = { version = "0.8.0", default-features = false }
binary-merkle-tree = { version = "14.0.0", default-features = false }
bp-bridge-hub-cumulus = { version = "0.8.0", default-features = false }
bp-header-chain = { version = "0.8.0", default-features = false }
bp-header-chain = { version = "0.8.1", default-features = false }
bp-kusama = { version = "0.6.0", default-features = false }
bp-messages = { version = "0.8.0", default-features = false }
bp-parachains = { version = "0.8.0", default-features = false }
Expand Down
20 changes: 7 additions & 13 deletions system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -747,13 +747,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 @@ -972,9 +965,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 = 33
ToPolkadotXcmRouter: pallet_xcm_bridge_hub_router::<Instance1> = 34,
MessageQueue: pallet_message_queue = 35,

Expand Down Expand Up @@ -1020,10 +1011,14 @@ 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
cumulus_pallet_xcmp_queue::migration::v4::MigrationToV4<Runtime>,
frame_support::migrations::RemovePallet<DmpQueueName, RocksDbWeight>,
// permanent
pallet_xcm::migration::MigrateToLatestXcmVersion<Runtime>,
);
Expand Down Expand Up @@ -1060,7 +1055,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 @@ -292,7 +292,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
26 changes: 6 additions & 20 deletions system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ use xcm_config::{FellowshipLocation, GovernanceLocation, XcmOriginToTransactDisp
#[cfg(any(feature = "std", test))]
pub use sp_runtime::BuildStorage;

use kusama_runtime_constants::system_parachain::{ASSET_HUB_ID, BRIDGE_HUB_ID};
use polkadot_runtime_common::{BlockHashCount, SlowAdjustingFeeUpdate};

use weights::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight};
Expand Down Expand Up @@ -132,15 +131,13 @@ 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
cumulus_pallet_xcmp_queue::migration::v4::MigrationToV4<Runtime>,
snowbridge_pallet_system::migration::v0::InitializeOnUpgrade<
Runtime,
ConstU32<BRIDGE_HUB_ID>,
ConstU32<ASSET_HUB_ID>,
>,
frame_support::migrations::RemovePallet<DmpQueueName, RocksDbWeight>,
// permanent
pallet_xcm::migration::MigrateToLatestXcmVersion<Runtime>,
);
Expand All @@ -166,7 +163,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("bridge-hub-kusama"),
impl_name: create_runtime_str!("bridge-hub-kusama"),
authoring_version: 1,
spec_version: 1_002_000,
spec_version: 1_002_002,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 4,
Expand Down Expand Up @@ -413,13 +410,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 @@ -523,9 +513,6 @@ 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,

// Handy utilities.
Utility: pallet_utility = 40,
Expand Down Expand Up @@ -565,7 +552,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