From 117aff73dbc22a5cc79f450ef5b444dee2ec9d69 Mon Sep 17 00:00:00 2001 From: Ron Date: Fri, 20 Sep 2024 14:45:48 +0800 Subject: [PATCH] Add Snowbridge initialize migration on Westend (#5747) # Description Fix https://github.com/paritytech/polkadot-sdk/pull/5074 which missed the runtime migration to initialize channels of the bridge. --------- Co-authored-by: Adrian Catangiu (cherry picked from commit 86bb5cb5068463f006fda3a4ac4236686c989b86) --- Cargo.lock | 2 +- .../bridge-hubs/bridge-hub-westend/Cargo.toml | 2 +- .../bridge-hubs/bridge-hub-westend/src/lib.rs | 9 ++++++++- prdoc/pr_5747.prdoc | 13 +++++++++++++ 4 files changed, 23 insertions(+), 3 deletions(-) create mode 100644 prdoc/pr_5747.prdoc diff --git a/Cargo.lock b/Cargo.lock index 4ad2ce0dbd57..daa5144ebf88 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2287,7 +2287,7 @@ dependencies = [ [[package]] name = "bridge-hub-westend-runtime" -version = "0.2.0" +version = "0.3.0" dependencies = [ "bp-asset-hub-rococo", "bp-asset-hub-westend", diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/Cargo.toml b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/Cargo.toml index 67d4eff0f7fe..e0ad1acc0476 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/Cargo.toml +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bridge-hub-westend-runtime" -version = "0.2.0" +version = "0.3.0" authors.workspace = true edition.workspace = true description = "Westend's BridgeHub parachain runtime" diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/lib.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/lib.rs index 5717db456a77..c1c708a1b1f5 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/lib.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/lib.rs @@ -100,6 +100,8 @@ use snowbridge_core::{ use testnet_parachains_constants::westend::{consensus::*, currency::*, fee::WeightToFee, time::*}; use xcm::VersionedLocation; +use westend_runtime_constants::system_parachain::{ASSET_HUB_ID, BRIDGE_HUB_ID}; + /// The address format for describing accounts. pub type Address = MultiAddress; @@ -152,6 +154,11 @@ pub type Migrations = ( >, // permanent pallet_xcm::migration::MigrateToLatestXcmVersion, + snowbridge_pallet_system::migration::v0::InitializeOnUpgrade< + Runtime, + ConstU32, + ConstU32, + >, ); parameter_types! { @@ -209,7 +216,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("bridge-hub-westend"), impl_name: create_runtime_str!("bridge-hub-westend"), authoring_version: 1, - spec_version: 1_016_000, + spec_version: 1_016_001, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 5, diff --git a/prdoc/pr_5747.prdoc b/prdoc/pr_5747.prdoc new file mode 100644 index 000000000000..ee786db658c8 --- /dev/null +++ b/prdoc/pr_5747.prdoc @@ -0,0 +1,13 @@ +title: "Snowbridge runtime migration on Westend" + +doc: + - audience: Runtime Dev + description: | + This is a backport for https://github.com/paritytech/polkadot-sdk/pull/5074 which missed + the runtime migration to initialize channels of the bridge. + +crates: + - name: bridge-hub-westend-runtime + bump: patch + +