Skip to content

Commit

Permalink
Add Snowbridge initialize migration on Westend (#5747)
Browse files Browse the repository at this point in the history
# Description

Fix #5074 which missed
the runtime migration to initialize channels of the bridge.

---------

Co-authored-by: Adrian Catangiu <[email protected]>
  • Loading branch information
yrong and acatangiu committed Sep 20, 2024
1 parent 221565d commit 86bb5cb
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 3 deletions.
2 changes: 1 addition & 1 deletion 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
@@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<AccountId, ()>;

Expand Down Expand Up @@ -152,6 +154,11 @@ pub type Migrations = (
>,
// permanent
pallet_xcm::migration::MigrateToLatestXcmVersion<Runtime>,
snowbridge_pallet_system::migration::v0::InitializeOnUpgrade<
Runtime,
ConstU32<BRIDGE_HUB_ID>,
ConstU32<ASSET_HUB_ID>,
>,
);

parameter_types! {
Expand Down Expand Up @@ -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,
Expand Down
13 changes: 13 additions & 0 deletions prdoc/pr_5747.prdoc
Original file line number Diff line number Diff line change
@@ -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


0 comments on commit 86bb5cb

Please sign in to comment.