Remove bridges subtree

This commit is contained in:
Serban Iorga
2024-04-09 16:02:09 +03:00
committed by Bastian Köcher
parent d38f6e6728
commit 9a3e2c8c5a
179 changed files with 0 additions and 34372 deletions
@@ -1,88 +0,0 @@
[settings]
node_spawn_timeout = 240
[relaychain]
default_command = "{{POLKADOT_BINARY}}"
default_args = [ "-lparachain=debug,xcm=trace" ]
chain = "rococo-local"
[[relaychain.nodes]]
name = "alice-rococo-validator"
validator = true
rpc_port = 9932
ws_port = 9942
balance = 2000000000000
[[relaychain.nodes]]
name = "bob-rococo-validator"
validator = true
rpc_port = 9933
ws_port = 9943
balance = 2000000000000
[[relaychain.nodes]]
name = "charlie-rococo-validator"
validator = true
rpc_port = 9934
ws_port = 9944
balance = 2000000000000
[[parachains]]
id = 1013
chain = "bridge-hub-rococo-local"
cumulus_based = true
# run alice as parachain collator
[[parachains.collators]]
name = "bridge-hub-rococo-collator1"
validator = true
command = "{{POLKADOT_PARACHAIN_BINARY}}"
rpc_port = 8933
ws_port = 8943
args = [
"-lparachain=debug,runtime::bridge-hub=trace,runtime::bridge=trace,runtime::bridge-dispatch=trace,bridge=trace,runtime::bridge-messages=trace,xcm=trace"
]
# run bob as parachain collator
[[parachains.collators]]
name = "bridge-hub-rococo-collator2"
validator = true
command = "{{POLKADOT_PARACHAIN_BINARY}}"
rpc_port = 8934
ws_port = 8944
args = [
"-lparachain=trace,runtime::bridge-hub=trace,runtime::bridge=trace,runtime::bridge-dispatch=trace,bridge=trace,runtime::bridge-messages=trace,xcm=trace"
]
[[parachains]]
id = 1000
chain = "asset-hub-rococo-local"
cumulus_based = true
[[parachains.collators]]
name = "asset-hub-rococo-collator1"
rpc_port = 9911
ws_port = 9910
command = "{{POLKADOT_PARACHAIN_BINARY}}"
args = [
"-lparachain=debug,xcm=trace,runtime::bridge-transfer=trace"
]
[[parachains.collators]]
name = "asset-hub-rococo-collator2"
command = "{{POLKADOT_PARACHAIN_BINARY}}"
args = [
"-lparachain=debug,xcm=trace,runtime::bridge-transfer=trace"
]
#[[hrmp_channels]]
#sender = 1000
#recipient = 1013
#max_capacity = 4
#max_message_size = 524288
#
#[[hrmp_channels]]
#sender = 1013
#recipient = 1000
#max_capacity = 4
#max_message_size = 524288
@@ -1,88 +0,0 @@
[settings]
node_spawn_timeout = 240
[relaychain]
default_command = "{{POLKADOT_BINARY}}"
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}}"
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"
]
# run bob as parachain collator
[[parachains.collators]]
name = "bridge-hub-westend-collator2"
validator = true
command = "{{POLKADOT_PARACHAIN_BINARY}}"
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"
]
[[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}}"
args = [
"-lparachain=debug,xcm=trace,runtime::bridge-transfer=trace"
]
[[parachains.collators]]
name = "asset-hub-westend-collator2"
command = "{{POLKADOT_PARACHAIN_BINARY}}"
args = [
"-lparachain=debug,xcm=trace,runtime::bridge-transfer=trace"
]
#[[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
@@ -1,401 +0,0 @@
#!/bin/bash
# import common functions
source "$FRAMEWORK_PATH/utils/bridges.sh"
# Expected sovereign accounts.
#
# Generated by:
#
# #[test]
# fn generate_sovereign_accounts() {
# use sp_core::crypto::Ss58Codec;
# use polkadot_parachain_primitives::primitives::Sibling;
#
# parameter_types! {
# pub UniversalLocationAHR: InteriorMultiLocation = X2(GlobalConsensus(Rococo), Parachain(1000));
# pub UniversalLocationAHW: InteriorMultiLocation = X2(GlobalConsensus(Westend), Parachain(1000));
# }
#
# // SS58=42
# println!("GLOBAL_CONSENSUS_ROCOCO_SOVEREIGN_ACCOUNT=\"{}\"",
# frame_support::sp_runtime::AccountId32::new(
# GlobalConsensusConvertsFor::<UniversalLocationAHW, [u8; 32]>::convert_location(
# &MultiLocation { parents: 2, interior: X1(GlobalConsensus(Rococo)) }).unwrap()
# ).to_ss58check_with_version(42_u16.into())
# );
# println!("ASSET_HUB_WESTEND_SOVEREIGN_ACCOUNT_AT_BRIDGE_HUB_WESTEND=\"{}\"",
# frame_support::sp_runtime::AccountId32::new(
# SiblingParachainConvertsVia::<Sibling, [u8; 32]>::convert_location(
# &MultiLocation { parents: 1, interior: X1(Parachain(1000)) }).unwrap()
# ).to_ss58check_with_version(42_u16.into())
# );
#
# // SS58=42
# println!("GLOBAL_CONSENSUS_WESTEND_SOVEREIGN_ACCOUNT=\"{}\"",
# frame_support::sp_runtime::AccountId32::new(
# GlobalConsensusConvertsFor::<UniversalLocationAHR, [u8; 32]>::convert_location(
# &MultiLocation { parents: 2, interior: X1(GlobalConsensus(Westend)) }).unwrap()
# ).to_ss58check_with_version(42_u16.into())
# );
# println!("ASSET_HUB_ROCOCO_SOVEREIGN_ACCOUNT_AT_BRIDGE_HUB_ROCOCO=\"{}\"",
# frame_support::sp_runtime::AccountId32::new(
# SiblingParachainConvertsVia::<Sibling, [u8; 32]>::convert_location(
# &MultiLocation { parents: 1, interior: X1(Parachain(1000)) }).unwrap()
# ).to_ss58check_with_version(42_u16.into())
# );
# }
GLOBAL_CONSENSUS_ROCOCO_SOVEREIGN_ACCOUNT="5GxRGwT8bU1JeBPTUXc7LEjZMxNrK8MyL2NJnkWFQJTQ4sii"
ASSET_HUB_WESTEND_SOVEREIGN_ACCOUNT_AT_BRIDGE_HUB_WESTEND="5Eg2fntNprdN3FgH4sfEaaZhYtddZQSQUqvYJ1f2mLtinVhV"
GLOBAL_CONSENSUS_WESTEND_SOVEREIGN_ACCOUNT="5He2Qdztyxxa4GoagY6q1jaiLMmKy1gXS7PdZkhfj8ZG9hk5"
ASSET_HUB_ROCOCO_SOVEREIGN_ACCOUNT_AT_BRIDGE_HUB_ROCOCO="5Eg2fntNprdN3FgH4sfEaaZhYtddZQSQUqvYJ1f2mLtinVhV"
# Expected sovereign accounts for rewards on BridgeHubs.
#
# Generated by:
# #[test]
# fn generate_sovereign_accounts_for_rewards() {
# use bp_messages::LaneId;
# use bp_relayers::{PayRewardFromAccount, RewardsAccountOwner, RewardsAccountParams};
# use sp_core::crypto::Ss58Codec;
#
# // SS58=42
# println!(
# "ON_BRIDGE_HUB_ROCOCO_SOVEREIGN_ACCOUNT_FOR_LANE_00000002_bhwd_ThisChain=\"{}\"",
# frame_support::sp_runtime::AccountId32::new(
# PayRewardFromAccount::<[u8; 32], [u8; 32]>::rewards_account(RewardsAccountParams::new(
# LaneId([0, 0, 0, 2]),
# *b"bhwd",
# RewardsAccountOwner::ThisChain
# ))
# )
# .to_ss58check_with_version(42_u16.into())
# );
# // SS58=42
# println!(
# "ON_BRIDGE_HUB_ROCOCO_SOVEREIGN_ACCOUNT_FOR_LANE_00000002_bhwd_BridgedChain=\"{}\"",
# frame_support::sp_runtime::AccountId32::new(
# PayRewardFromAccount::<[u8; 32], [u8; 32]>::rewards_account(RewardsAccountParams::new(
# LaneId([0, 0, 0, 2]),
# *b"bhwd",
# RewardsAccountOwner::BridgedChain
# ))
# )
# .to_ss58check_with_version(42_u16.into())
# );
#
# // SS58=42
# println!(
# "ON_BRIDGE_HUB_WESTEND_SOVEREIGN_ACCOUNT_FOR_LANE_00000002_bhro_ThisChain=\"{}\"",
# frame_support::sp_runtime::AccountId32::new(
# PayRewardFromAccount::<[u8; 32], [u8; 32]>::rewards_account(RewardsAccountParams::new(
# LaneId([0, 0, 0, 2]),
# *b"bhro",
# RewardsAccountOwner::ThisChain
# ))
# )
# .to_ss58check_with_version(42_u16.into())
# );
# // SS58=42
# println!(
# "ON_BRIDGE_HUB_WESTEND_SOVEREIGN_ACCOUNT_FOR_LANE_00000002_bhro_BridgedChain=\"{}\"",
# frame_support::sp_runtime::AccountId32::new(
# PayRewardFromAccount::<[u8; 32], [u8; 32]>::rewards_account(RewardsAccountParams::new(
# LaneId([0, 0, 0, 2]),
# *b"bhro",
# RewardsAccountOwner::BridgedChain
# ))
# )
# .to_ss58check_with_version(42_u16.into())
# );
# }
ON_BRIDGE_HUB_ROCOCO_SOVEREIGN_ACCOUNT_FOR_LANE_00000002_bhwd_ThisChain="5EHnXaT5BhiSGP5hbdsoVGtzi2sQVgpDNToTxLYeQvKoMPEm"
ON_BRIDGE_HUB_ROCOCO_SOVEREIGN_ACCOUNT_FOR_LANE_00000002_bhwd_BridgedChain="5EHnXaT5BhiSGP5hbdt5EJSapXYbxEv678jyWHEUskCXcjqo"
ON_BRIDGE_HUB_WESTEND_SOVEREIGN_ACCOUNT_FOR_LANE_00000002_bhro_ThisChain="5EHnXaT5BhiSGP5h9Rg8sgUJqoLym3iEaWUiboT8S9AT5xFh"
ON_BRIDGE_HUB_WESTEND_SOVEREIGN_ACCOUNT_FOR_LANE_00000002_bhro_BridgedChain="5EHnXaT5BhiSGP5h9RgQci1txJ2BDbp7KBRE9k8xty3BMUSi"
LANE_ID="00000002"
XCM_VERSION=3
function init_ro_wnd() {
local relayer_path=$(ensure_relayer)
RUST_LOG=runtime=trace,rpc=trace,bridge=trace \
$relayer_path init-bridge rococo-to-bridge-hub-westend \
--source-host localhost \
--source-port 9942 \
--source-version-mode Auto \
--target-host localhost \
--target-port 8945 \
--target-version-mode Auto \
--target-signer //Bob
}
function init_wnd_ro() {
local relayer_path=$(ensure_relayer)
RUST_LOG=runtime=trace,rpc=trace,bridge=trace \
$relayer_path init-bridge westend-to-bridge-hub-rococo \
--source-host localhost \
--source-port 9945 \
--source-version-mode Auto \
--target-host localhost \
--target-port 8943 \
--target-version-mode Auto \
--target-signer //Bob
}
function run_relay() {
local relayer_path=$(ensure_relayer)
RUST_LOG=runtime=trace,rpc=trace,bridge=trace \
$relayer_path relay-headers-and-messages bridge-hub-rococo-bridge-hub-westend \
--rococo-host localhost \
--rococo-port 9942 \
--rococo-version-mode Auto \
--bridge-hub-rococo-host localhost \
--bridge-hub-rococo-port 8943 \
--bridge-hub-rococo-version-mode Auto \
--bridge-hub-rococo-signer //Charlie \
--bridge-hub-rococo-transactions-mortality 4 \
--westend-host localhost \
--westend-port 9945 \
--westend-version-mode Auto \
--bridge-hub-westend-host localhost \
--bridge-hub-westend-port 8945 \
--bridge-hub-westend-version-mode Auto \
--bridge-hub-westend-signer //Charlie \
--bridge-hub-westend-transactions-mortality 4 \
--lane "${LANE_ID}"
}
case "$1" in
run-relay)
init_wnd_ro
init_ro_wnd
run_relay
;;
init-asset-hub-rococo-local)
ensure_polkadot_js_api
# create foreign assets for native Westend token (governance call on Rococo)
force_create_foreign_asset \
"ws://127.0.0.1:9942" \
"//Alice" \
1000 \
"ws://127.0.0.1:9910" \
"$(jq --null-input '{ "parents": 2, "interior": { "X1": { "GlobalConsensus": "Westend" } } }')" \
"$GLOBAL_CONSENSUS_WESTEND_SOVEREIGN_ACCOUNT" \
10000000000 \
true
# HRMP
open_hrmp_channels \
"ws://127.0.0.1:9942" \
"//Alice" \
1000 1013 4 524288
open_hrmp_channels \
"ws://127.0.0.1:9942" \
"//Alice" \
1013 1000 4 524288
# set XCM version of remote AssetHubWestend
force_xcm_version \
"ws://127.0.0.1:9942" \
"//Alice" \
1000 \
"ws://127.0.0.1:9910" \
"$(jq --null-input '{ "parents": 2, "interior": { "X2": [ { "GlobalConsensus": "Westend" }, { "Parachain": 1000 } ] } }')" \
$XCM_VERSION
;;
init-bridge-hub-rococo-local)
ensure_polkadot_js_api
# SA of sibling asset hub pays for the execution
transfer_balance \
"ws://127.0.0.1:8943" \
"//Alice" \
"$ASSET_HUB_ROCOCO_SOVEREIGN_ACCOUNT_AT_BRIDGE_HUB_ROCOCO" \
$((1000000000000 + 50000000000 * 20))
# drip SA of lane dedicated to asset hub for paying rewards for delivery
transfer_balance \
"ws://127.0.0.1:8943" \
"//Alice" \
"$ON_BRIDGE_HUB_ROCOCO_SOVEREIGN_ACCOUNT_FOR_LANE_00000002_bhwd_ThisChain" \
$((1000000000000 + 2000000000000))
# drip SA of lane dedicated to asset hub for paying rewards for delivery confirmation
transfer_balance \
"ws://127.0.0.1:8943" \
"//Alice" \
"$ON_BRIDGE_HUB_ROCOCO_SOVEREIGN_ACCOUNT_FOR_LANE_00000002_bhwd_BridgedChain" \
$((1000000000000 + 2000000000000))
# set XCM version of remote BridgeHubWestend
force_xcm_version \
"ws://127.0.0.1:9942" \
"//Alice" \
1013 \
"ws://127.0.0.1:8943" \
"$(jq --null-input '{ "parents": 2, "interior": { "X2": [ { "GlobalConsensus": "Westend" }, { "Parachain": 1002 } ] } }')" \
$XCM_VERSION
;;
init-asset-hub-westend-local)
ensure_polkadot_js_api
# create foreign assets for native Rococo token (governance call on Westend)
force_create_foreign_asset \
"ws://127.0.0.1:9945" \
"//Alice" \
1000 \
"ws://127.0.0.1:9010" \
"$(jq --null-input '{ "parents": 2, "interior": { "X1": { "GlobalConsensus": "Rococo" } } }')" \
"$GLOBAL_CONSENSUS_ROCOCO_SOVEREIGN_ACCOUNT" \
10000000000 \
true
# HRMP
open_hrmp_channels \
"ws://127.0.0.1:9945" \
"//Alice" \
1000 1002 4 524288
open_hrmp_channels \
"ws://127.0.0.1:9945" \
"//Alice" \
1002 1000 4 524288
# set XCM version of remote AssetHubRococo
force_xcm_version \
"ws://127.0.0.1:9945" \
"//Alice" \
1000 \
"ws://127.0.0.1:9010" \
"$(jq --null-input '{ "parents": 2, "interior": { "X2": [ { "GlobalConsensus": "Rococo" }, { "Parachain": 1000 } ] } }')" \
$XCM_VERSION
;;
init-bridge-hub-westend-local)
# SA of sibling asset hub pays for the execution
transfer_balance \
"ws://127.0.0.1:8945" \
"//Alice" \
"$ASSET_HUB_WESTEND_SOVEREIGN_ACCOUNT_AT_BRIDGE_HUB_WESTEND" \
$((1000000000000000 + 50000000000 * 20))
# drip SA of lane dedicated to asset hub for paying rewards for delivery
transfer_balance \
"ws://127.0.0.1:8945" \
"//Alice" \
"$ON_BRIDGE_HUB_WESTEND_SOVEREIGN_ACCOUNT_FOR_LANE_00000002_bhro_ThisChain" \
$((1000000000000000 + 2000000000000))
# drip SA of lane dedicated to asset hub for paying rewards for delivery confirmation
transfer_balance \
"ws://127.0.0.1:8945" \
"//Alice" \
"$ON_BRIDGE_HUB_WESTEND_SOVEREIGN_ACCOUNT_FOR_LANE_00000002_bhro_BridgedChain" \
$((1000000000000000 + 2000000000000))
# set XCM version of remote BridgeHubRococo
force_xcm_version \
"ws://127.0.0.1:9945" \
"//Alice" \
1002 \
"ws://127.0.0.1:8945" \
"$(jq --null-input '{ "parents": 2, "interior": { "X2": [ { "GlobalConsensus": "Rococo" }, { "Parachain": 1013 } ] } }')" \
$XCM_VERSION
;;
reserve-transfer-assets-from-asset-hub-rococo-local)
amount=$2
ensure_polkadot_js_api
# send ROCs to Alice account on AHW
limited_reserve_transfer_assets \
"ws://127.0.0.1:9910" \
"//Alice" \
"$(jq --null-input '{ "V3": { "parents": 2, "interior": { "X2": [ { "GlobalConsensus": "Westend" }, { "Parachain": 1000 } ] } } }')" \
"$(jq --null-input '{ "V3": { "parents": 0, "interior": { "X1": { "AccountId32": { "id": [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] } } } } }')" \
"$(jq --null-input '{ "V3": [ { "id": { "Concrete": { "parents": 1, "interior": "Here" } }, "fun": { "Fungible": '$amount' } } ] }')" \
0 \
"Unlimited"
;;
withdraw-reserve-assets-from-asset-hub-rococo-local)
amount=$2
ensure_polkadot_js_api
# send back only 100000000000 wrappedWNDs to Alice account on AHW
limited_reserve_transfer_assets \
"ws://127.0.0.1:9910" \
"//Alice" \
"$(jq --null-input '{ "V3": { "parents": 2, "interior": { "X2": [ { "GlobalConsensus": "Westend" }, { "Parachain": 1000 } ] } } }')" \
"$(jq --null-input '{ "V3": { "parents": 0, "interior": { "X1": { "AccountId32": { "id": [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] } } } } }')" \
"$(jq --null-input '{ "V3": [ { "id": { "Concrete": { "parents": 2, "interior": { "X1": { "GlobalConsensus": "Westend" } } } }, "fun": { "Fungible": '$amount' } } ] }')" \
0 \
"Unlimited"
;;
reserve-transfer-assets-from-asset-hub-westend-local)
amount=$2
ensure_polkadot_js_api
# send WNDs to Alice account on AHR
limited_reserve_transfer_assets \
"ws://127.0.0.1:9010" \
"//Alice" \
"$(jq --null-input '{ "V3": { "parents": 2, "interior": { "X2": [ { "GlobalConsensus": "Rococo" }, { "Parachain": 1000 } ] } } }')" \
"$(jq --null-input '{ "V3": { "parents": 0, "interior": { "X1": { "AccountId32": { "id": [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] } } } } }')" \
"$(jq --null-input '{ "V3": [ { "id": { "Concrete": { "parents": 1, "interior": "Here" } }, "fun": { "Fungible": '$amount' } } ] }')" \
0 \
"Unlimited"
;;
withdraw-reserve-assets-from-asset-hub-westend-local)
amount=$2
ensure_polkadot_js_api
# send back only 100000000000 wrappedROCs to Alice account on AHR
limited_reserve_transfer_assets \
"ws://127.0.0.1:9010" \
"//Alice" \
"$(jq --null-input '{ "V3": { "parents": 2, "interior": { "X2": [ { "GlobalConsensus": "Rococo" }, { "Parachain": 1000 } ] } } }')" \
"$(jq --null-input '{ "V3": { "parents": 0, "interior": { "X1": { "AccountId32": { "id": [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] } } } } }')" \
"$(jq --null-input '{ "V3": [ { "id": { "Concrete": { "parents": 2, "interior": { "X1": { "GlobalConsensus": "Rococo" } } } }, "fun": { "Fungible": '$amount' } } ] }')" \
0 \
"Unlimited"
;;
claim-rewards-bridge-hub-rococo-local)
ensure_polkadot_js_api
# bhwd -> [62, 68, 77, 64] -> 0x62687764
claim_rewards \
"ws://127.0.0.1:8943" \
"//Charlie" \
"0x${LANE_ID}" \
"0x62687764" \
"ThisChain"
claim_rewards \
"ws://127.0.0.1:8943" \
"//Charlie" \
"0x${LANE_ID}" \
"0x62687764" \
"BridgedChain"
;;
claim-rewards-bridge-hub-westend-local)
# bhro -> [62, 68, 72, 6f] -> 0x6268726f
claim_rewards \
"ws://127.0.0.1:8945" \
"//Charlie" \
"0x${LANE_ID}" \
"0x6268726f" \
"ThisChain"
claim_rewards \
"ws://127.0.0.1:8945" \
"//Charlie" \
"0x${LANE_ID}" \
"0x6268726f" \
"BridgedChain"
;;
stop)
pkill -f polkadot
pkill -f parachain
;;
import)
# to avoid trigger anything here
;;
*)
echo "A command is require. Supported commands for:
Local (zombienet) run:
- run-relay
- init-asset-hub-rococo-local
- init-bridge-hub-rococo-local
- init-asset-hub-westend-local
- init-bridge-hub-westend-local
- reserve-transfer-assets-from-asset-hub-rococo-local
- withdraw-reserve-assets-from-asset-hub-rococo-local
- reserve-transfer-assets-from-asset-hub-westend-local
- withdraw-reserve-assets-from-asset-hub-westend-local
- claim-rewards-bridge-hub-rococo-local
- claim-rewards-bridge-hub-westend-local";
exit 1
;;
esac
@@ -1,3 +0,0 @@
#!/bin/bash
$ENV_PATH/bridges_rococo_westend.sh "$@"
@@ -1,8 +0,0 @@
Description: Check if the HRMP channel between Rococo BH and Rococo AH was opened successfully
Network: ./bridge_hub_rococo_local_network.toml
Creds: config
# ensure that initialization has completed
asset-hub-rococo-collator1: js-script {{FRAMEWORK_PATH}}/js-helpers/wait-hrmp-channel-opened.js with "1013" within 300 seconds
@@ -1,7 +0,0 @@
Description: Check if the with-Westend GRANDPA pallet was initialized at Rococo BH
Network: ./bridge_hub_rococo_local_network.toml
Creds: config
# relay is already started - let's wait until with-Westend GRANDPA pallet is initialized at Rococo
bridge-hub-rococo-collator1: js-script {{FRAMEWORK_PATH}}/js-helpers/best-finalized-header-at-bridged-chain.js with "Westend,0" within 400 seconds
@@ -1,70 +0,0 @@
#!/bin/bash
set -e
trap "trap - SIGTERM && kill -9 -$$" SIGINT SIGTERM EXIT
source "$FRAMEWORK_PATH/utils/zombienet.sh"
# whether to init the chains (open HRMP channels, set XCM version, create reserve assets, etc)
init=0
start_relayer=0
while [ $# -ne 0 ]
do
arg="$1"
case "$arg" in
--init)
init=1
;;
--start-relayer)
start_relayer=1
;;
esac
shift
done
logs_dir=$TEST_DIR/logs
helper_script="${BASH_SOURCE%/*}/helper.sh"
rococo_def=${BASH_SOURCE%/*}/bridge_hub_rococo_local_network.toml
start_zombienet $TEST_DIR $rococo_def rococo_dir rococo_pid
echo
westend_def=${BASH_SOURCE%/*}/bridge_hub_westend_local_network.toml
start_zombienet $TEST_DIR $westend_def westend_dir westend_pid
echo
if [[ $init -eq 1 ]]; then
rococo_init_log=$logs_dir/rococo-init.log
echo -e "Setting up the rococo side of the bridge. Logs available at: $rococo_init_log\n"
westend_init_log=$logs_dir/westend-init.log
echo -e "Setting up the westend side of the bridge. Logs available at: $westend_init_log\n"
$helper_script init-asset-hub-rococo-local >> $rococo_init_log 2>&1 &
rococo_init_pid=$!
$helper_script init-asset-hub-westend-local >> $westend_init_log 2>&1 &
westend_init_pid=$!
wait -n $rococo_init_pid $westend_init_pid
$helper_script init-bridge-hub-rococo-local >> $rococo_init_log 2>&1 &
rococo_init_pid=$!
$helper_script init-bridge-hub-westend-local >> $westend_init_log 2>&1 &
westend_init_pid=$!
wait -n $rococo_init_pid $westend_init_pid
run_zndsl ${BASH_SOURCE%/*}/rococo-init.zndsl $rococo_dir
run_zndsl ${BASH_SOURCE%/*}/westend-init.zndsl $westend_dir
fi
if [[ $start_relayer -eq 1 ]]; then
${BASH_SOURCE%/*}/start_relayer.sh $rococo_dir $westend_dir relayer_pid
fi
echo $rococo_dir > $TEST_DIR/rococo.env
echo $westend_dir > $TEST_DIR/westend.env
echo
wait -n $rococo_pid $westend_pid $relayer_pid
kill -9 -$$
@@ -1,23 +0,0 @@
#!/bin/bash
set -e
source "$FRAMEWORK_PATH/utils/common.sh"
source "$FRAMEWORK_PATH/utils/zombienet.sh"
rococo_dir=$1
westend_dir=$2
__relayer_pid=$3
logs_dir=$TEST_DIR/logs
helper_script="${BASH_SOURCE%/*}/helper.sh"
relayer_log=$logs_dir/relayer.log
echo -e "Starting rococo-westend relayer. Logs available at: $relayer_log\n"
start_background_process "$helper_script run-relay" $relayer_log relayer_pid
run_zndsl ${BASH_SOURCE%/*}/rococo.zndsl $rococo_dir
run_zndsl ${BASH_SOURCE%/*}/westend.zndsl $westend_dir
eval $__relayer_pid="'$relayer_pid'"
@@ -1,7 +0,0 @@
Description: Check if the HRMP channel between Westend BH and Westend AH was opened successfully
Network: ./bridge_hub_westend_local_network.toml
Creds: config
# ensure that initialization has completed
asset-hub-westend-collator1: js-script {{FRAMEWORK_PATH}}/js-helpers/wait-hrmp-channel-opened.js with "1002" within 600 seconds
@@ -1,6 +0,0 @@
Description: Check if the with-Rococo GRANDPA pallet was initialized at Westend BH
Network: ./bridge_hub_westend_local_network.toml
Creds: config
# relay is already started - let's wait until with-Rococo GRANDPA pallet is initialized at Westend
bridge-hub-westend-collator1: js-script {{FRAMEWORK_PATH}}/js-helpers/best-finalized-header-at-bridged-chain.js with "Rococo,0" within 400 seconds