[testnet] Add AssetHubRococo <-> AssetHubWestend asset bridging support (#1967)

## Summary

Asset bridging support for AssetHub**Rococo** <-> AssetHub**Wococo** was
added [here](https://github.com/paritytech/polkadot-sdk/pull/1215), so
now we aim to bridge AssetHub**Rococo** and AssetHub**Westend**. (And
perhaps retire AssetHubWococo and the Wococo chains).

## Solution

**bridge-hub-westend-runtime**
- added new runtime as a copy of `bridge-hub-rococo-runtime`
- added support for bridging to `BridgeHubRococo`
- added tests and benchmarks

**bridge-hub-rococo-runtime**
- added support for bridging to `BridgeHubWestend`
- added tests and benchmarks
- internal refactoring by splitting bridge configuration per network,
e.g., `bridge_to_whatevernetwork_config.rs`.

**asset-hub-rococo-runtime**
- added support for asset bridging to `AssetHubWestend` (allows to
receive only WNDs)
- added new xcm router for `Westend`
- added tests and benchmarks

**asset-hub-westend-runtime**
- added support for asset bridging to `AssetHubRococo` (allows to
receive only ROCs)
- added new xcm router for `Rococo`
- added tests and benchmarks

## Deployment

All changes will be deployed as a part of
https://github.com/paritytech/polkadot-sdk/issues/1988.

## TODO

- [x] benchmarks for all pallet instances
- [x] integration tests
- [x] local run scripts


Relates to:
https://github.com/paritytech/parity-bridges-common/issues/2602
Relates to: https://github.com/paritytech/polkadot-sdk/issues/1988

---------

Co-authored-by: command-bot <>
Co-authored-by: Adrian Catangiu <adrian@parity.io>
Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>
This commit is contained in:
Branislav Kontur
2023-11-02 00:39:49 +01:00
committed by GitHub
parent c66ae375e6
commit 1b1fab0da3
112 changed files with 10028 additions and 1638 deletions
@@ -42,7 +42,7 @@ cumulus_based = true
args = [
"-lparachain=debug,runtime::bridge-hub=trace,runtime::bridge=trace,runtime::bridge-dispatch=trace,bridge=trace,runtime::bridge-messages=trace,xcm=trace",
"--force-authoring",
"--", "--port 41333", "--rpc-port 48933", "--ws-port 48943"
"--", "--rpc-port 48933"
]
# run bob as parachain collator
@@ -55,7 +55,7 @@ cumulus_based = true
args = [
"-lparachain=trace,runtime::bridge-hub=trace,runtime::bridge=trace,runtime::bridge-dispatch=trace,bridge=trace,runtime::bridge-messages=trace,xcm=trace",
"--force-authoring",
"--", "--port 41334", "--rpc-port 48934", "--ws-port 48944"
"--", "--rpc-port 48934"
]
[[parachains]]
@@ -70,7 +70,7 @@ cumulus_based = true
command = "{{POLKADOT_PARACHAIN_BINARY_PATH_FOR_ASSET_HUB_ROCOCO}}"
args = [
"-lparachain=debug,xcm=trace,runtime::bridge-transfer=trace",
"--", "--port 51333", "--rpc-port 58933", "--ws-port 58943"
"--", "--rpc-port 58933"
]
[[parachains.collators]]
@@ -78,7 +78,7 @@ cumulus_based = true
command = "{{POLKADOT_PARACHAIN_BINARY_PATH_FOR_ASSET_HUB_ROCOCO}}"
args = [
"-lparachain=debug,xcm=trace,runtime::bridge-transfer=trace",
"--", "--port 51433", "--rpc-port 58833", "--ws-port 58843"
"--", "--rpc-port 58833"
]
#[[hrmp_channels]]
@@ -0,0 +1,94 @@
[settings]
node_spawn_timeout = 240
[relaychain]
default_command = "{{POLKADOT_BINARY_PATH}}"
default_args = [ "-lparachain=debug,xcm=trace" ]
chain = "westend-local"
[[relaychain.nodes]]
name = "alice-westend-validator"
validator = true
rpc_port = 9935
ws_port = 9945
balance = 2000000000000
[[relaychain.nodes]]
name = "bob-westend-validator"
validator = true
rpc_port = 9936
ws_port = 9946
balance = 2000000000000
[[relaychain.nodes]]
name = "charlie-westend-validator"
validator = true
rpc_port = 9937
ws_port = 9947
balance = 2000000000000
[[parachains]]
id = 1002
chain = "bridge-hub-westend-local"
cumulus_based = true
# run alice as parachain collator
[[parachains.collators]]
name = "bridge-hub-westend-collator1"
validator = true
command = "{{POLKADOT_PARACHAIN_BINARY_PATH}}"
rpc_port = 8935
ws_port = 8945
args = [
"-lparachain=debug,runtime::mmr=info,substrate=info,runtime=info,runtime::bridge-hub=trace,runtime::bridge=trace,runtime::bridge-dispatch=trace,bridge=trace,runtime::bridge-messages=trace,xcm=trace",
"--force-authoring",
"--", "--rpc-port 48935"
]
# run bob as parachain collator
[[parachains.collators]]
name = "bridge-hub-westend-collator2"
validator = true
command = "{{POLKADOT_PARACHAIN_BINARY_PATH}}"
rpc_port = 8936
ws_port = 8946
args = [
"-lparachain=trace,runtime::mmr=info,substrate=info,runtime=info,runtime::bridge-hub=trace,runtime::bridge=trace,runtime::bridge-dispatch=trace,bridge=trace,runtime::bridge-messages=trace,xcm=trace",
"--force-authoring",
"--", "--rpc-port 48936"
]
[[parachains]]
id = 1000
chain = "asset-hub-westend-local"
cumulus_based = true
[[parachains.collators]]
name = "asset-hub-westend-collator1"
rpc_port = 9011
ws_port = 9010
command = "{{POLKADOT_PARACHAIN_BINARY_PATH_FOR_ASSET_HUB_WESTEND}}"
args = [
"-lparachain=debug,xcm=trace,runtime::bridge-transfer=trace",
"--", "--rpc-port 38933"
]
[[parachains.collators]]
name = "asset-hub-westend-collator2"
command = "{{POLKADOT_PARACHAIN_BINARY_PATH_FOR_ASSET_HUB_WESTEND}}"
args = [
"-lparachain=debug,xcm=trace,runtime::bridge-transfer=trace",
"--", "--rpc-port 38833"
]
#[[hrmp_channels]]
#sender = 1000
#recipient = 1002
#max_capacity = 4
#max_message_size = 524288
#
#[[hrmp_channels]]
#sender = 1002
#recipient = 1000
#max_capacity = 4
#max_message_size = 524288
@@ -42,7 +42,7 @@ cumulus_based = true
args = [
"-lparachain=debug,runtime::mmr=info,substrate=info,runtime=info,runtime::bridge-hub=trace,runtime::bridge=trace,runtime::bridge-dispatch=trace,bridge=trace,runtime::bridge-messages=trace,xcm=trace",
"--force-authoring",
"--", "--port 41335", "--rpc-port 48935", "--ws-port 48945"
"--", "--port 41335", "--rpc-port 48935"
]
# run bob as parachain collator
@@ -55,7 +55,7 @@ cumulus_based = true
args = [
"-lparachain=trace,runtime::mmr=info,substrate=info,runtime=info,runtime::bridge-hub=trace,runtime::bridge=trace,runtime::bridge-dispatch=trace,bridge=trace,runtime::bridge-messages=trace,xcm=trace",
"--force-authoring",
"--", "--port 41336", "--rpc-port 48936", "--ws-port 48946"
"--", "--port 41336", "--rpc-port 48936"
]
[[parachains]]
@@ -70,7 +70,7 @@ cumulus_based = true
command = "{{POLKADOT_PARACHAIN_BINARY_PATH_FOR_ASSET_HUB_WOCOCO}}"
args = [
"-lparachain=debug,xcm=trace,runtime::bridge-transfer=trace",
"--", "--port 31333", "--rpc-port 38933", "--ws-port 38943"
"--", "--port 31333", "--rpc-port 38933"
]
[[parachains.collators]]
@@ -78,7 +78,7 @@ cumulus_based = true
command = "{{POLKADOT_PARACHAIN_BINARY_PATH_FOR_ASSET_HUB_WOCOCO}}"
args = [
"-lparachain=debug,xcm=trace,runtime::bridge-transfer=trace",
"--", "--port 31433", "--rpc-port 38833", "--ws-port 38843"
"--", "--port 31433", "--rpc-port 38833"
]
#[[hrmp_channels]]