Adds Snowbridge to Rococo runtime (#2522)

# Description

Adds Snowbridge to the Rococo bridge hub runtime. Includes config
changes required in Rococo asset hub.

---------

Co-authored-by: Alistair Singh <alistair.singh7@gmail.com>
Co-authored-by: ron <yrong1997@gmail.com>
Co-authored-by: Vincent Geddes <vincent.geddes@hey.com>
Co-authored-by: claravanstaden <Cats 4 life!>
This commit is contained in:
Clara van Staden
2023-12-21 18:06:36 +02:00
committed by GitHub
parent 9f5221cc2f
commit 18d53dbf91
151 changed files with 19379 additions and 149 deletions
+7 -1
View File
@@ -118,10 +118,13 @@ tokio = { version = "1.32.0", features = ["macros", "parking_lot", "time"] }
wait-timeout = "0.2"
[features]
default = []
default = [
"beacon-spec-mainnet",
]
runtime-benchmarks = [
"asset-hub-rococo-runtime/runtime-benchmarks",
"asset-hub-westend-runtime/runtime-benchmarks",
"beacon-spec-mainnet",
"bridge-hub-rococo-runtime/runtime-benchmarks",
"bridge-hub-westend-runtime/runtime-benchmarks",
"collectives-westend-runtime/runtime-benchmarks",
@@ -161,3 +164,6 @@ try-runtime = [
"shell-runtime/try-runtime",
"sp-runtime/try-runtime",
]
beacon-spec-mainnet = [
"bridge-hub-rococo-runtime/beacon-spec-mainnet",
]
@@ -231,6 +231,10 @@ pub mod rococo {
"bridgeWestendMessages": {
"owner": bridges_pallet_owner.clone(),
},
"ethereumSystem": {
"paraId": id,
"assetHubParaId": 1000
}
})
}
}
+5 -1
View File
@@ -262,6 +262,7 @@ fn load_spec(id: &str) -> std::result::Result<Box<dyn ChainSpec>, String> {
/// (H/T to Phala for the idea)
/// E.g. "penpal-kusama-2004" yields ("penpal-kusama", Some(2004))
fn extract_parachain_id(id: &str) -> (&str, &str, Option<ParaId>) {
const ROCOCO_TEST_PARA_PREFIX: &str = "penpal-rococo-";
const KUSAMA_TEST_PARA_PREFIX: &str = "penpal-kusama-";
const POLKADOT_TEST_PARA_PREFIX: &str = "penpal-polkadot-";
@@ -273,7 +274,10 @@ fn extract_parachain_id(id: &str) -> (&str, &str, Option<ParaId>) {
const GLUTTON_WESTEND_PARA_LOCAL_PREFIX: &str = "glutton-westend-local-";
const GLUTTON_WESTEND_PARA_GENESIS_PREFIX: &str = "glutton-westend-genesis-";
let (norm_id, orig_id, para) = if let Some(suffix) = id.strip_prefix(KUSAMA_TEST_PARA_PREFIX) {
let (norm_id, orig_id, para) = if let Some(suffix) = id.strip_prefix(ROCOCO_TEST_PARA_PREFIX) {
let para_id: u32 = suffix.parse().expect("Invalid parachain-id suffix");
(&id[..ROCOCO_TEST_PARA_PREFIX.len() - 1], id, Some(para_id))
} else if let Some(suffix) = id.strip_prefix(KUSAMA_TEST_PARA_PREFIX) {
let para_id: u32 = suffix.parse().expect("Invalid parachain-id suffix");
(&id[..KUSAMA_TEST_PARA_PREFIX.len() - 1], id, Some(para_id))
} else if let Some(suffix) = id.strip_prefix(POLKADOT_TEST_PARA_PREFIX) {