mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-30 01:27:56 +00:00
Bridge zombienet tests - move all test scripts to the same folder (#3333)
Related to https://github.com/paritytech/polkadot-sdk/issues/3242
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
# ignore zombienet as they do some deliberate custom toml stuff
|
||||
exclude = [
|
||||
"bridges/testing/**",
|
||||
"cumulus/zombienet/**",
|
||||
"polkadot/node/malus/integrationtests/**",
|
||||
"polkadot/zombienet_tests/**",
|
||||
|
||||
@@ -408,8 +408,5 @@ prepare-bridges-zombienet-artifacts:
|
||||
- .collect-artifacts
|
||||
before_script:
|
||||
- mkdir -p ./artifacts/bridges-polkadot-sdk/bridges
|
||||
- mkdir -p ./artifacts/bridges-polkadot-sdk/cumulus/zombienet
|
||||
script:
|
||||
- cp -r bridges/zombienet ./artifacts/bridges-polkadot-sdk/bridges/zombienet
|
||||
- cp -r cumulus/scripts ./artifacts/bridges-polkadot-sdk/cumulus/scripts
|
||||
- cp -r cumulus/zombienet/bridge-hubs ./artifacts/bridges-polkadot-sdk/cumulus/zombienet/bridge-hubs
|
||||
- cp -r bridges/testing ./artifacts/bridges-polkadot-sdk/bridges/testing
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
variables:
|
||||
BRIDGES_ZOMBIENET_TESTS_IMAGE_TAG: ${DOCKER_IMAGES_VERSION}
|
||||
BRIDGES_ZOMBIENET_TESTS_IMAGE: "docker.io/paritypr/bridges-zombienet-tests"
|
||||
GH_DIR: "https://github.com/paritytech/polkadot-sdk/tree/${CI_COMMIT_SHA}/bridges/zombienet"
|
||||
LOCAL_DIR: "/builds/parity/mirrors/polkadot-sdk/bridges/zombienet"
|
||||
GH_DIR: "https://github.com/paritytech/polkadot-sdk/tree/${CI_COMMIT_SHA}/bridges/testing"
|
||||
LOCAL_DIR: "/builds/parity/mirrors/polkadot-sdk/bridges/testing"
|
||||
FF_DISABLE_UMASK_FOR_DOCKER_EXECUTOR: 1
|
||||
RUN_IN_CONTAINER: "1"
|
||||
artifacts:
|
||||
@@ -51,12 +51,12 @@ zombienet-bridges-0001-asset-transfer-works:
|
||||
extends:
|
||||
- .zombienet-bridges-common
|
||||
script:
|
||||
- /home/nonroot/bridges-polkadot-sdk/bridges/zombienet/run-new-test.sh 0001-asset-transfer --docker
|
||||
- /home/nonroot/bridges-polkadot-sdk/bridges/testing/run-new-test.sh 0001-asset-transfer --docker
|
||||
- echo "Done"
|
||||
|
||||
zombienet-bridges-0002-mandatory-headers-synced-while-idle:
|
||||
extends:
|
||||
- .zombienet-bridges-common
|
||||
script:
|
||||
- /home/nonroot/bridges-polkadot-sdk/bridges/zombienet/run-new-test.sh 0002-mandatory-headers-synced-while-idle --docker
|
||||
- /home/nonroot/bridges-polkadot-sdk/bridges/testing/run-new-test.sh 0002-mandatory-headers-synced-while-idle --docker
|
||||
- echo "Done"
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
# import common functions
|
||||
source "$(dirname "$0")"/bridges_common.sh
|
||||
source "${BASH_SOURCE%/*}/../../utils/bridges.sh"
|
||||
|
||||
# Expected sovereign accounts.
|
||||
#
|
||||
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
$POLKADOT_SDK_PATH/bridges/testing/environments/rococo-westend/bridges_rococo_westend.sh "$@"
|
||||
@@ -0,0 +1,8 @@
|
||||
Description: User is able to transfer WND from Westend Asset Hub to Rococo Asset Hub and back
|
||||
Network: ./bridge_hub_rococo_local_network.toml
|
||||
Creds: config
|
||||
|
||||
# ensure that initialization has completed
|
||||
asset-hub-rococo-collator1: js-script ../../js-helpers/wait-hrmp-channel-opened.js with "1013" within 300 seconds
|
||||
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
Description: User is able to transfer WND from Westend Asset Hub to Rococo Asset Hub and back
|
||||
Network: ./bridge_hub_rococo_local_network.toml
|
||||
Creds: config
|
||||
|
||||
# relay is already started - let's wait until with-Westend GRANPDA pallet is initialized at Rococo
|
||||
bridge-hub-rococo-collator1: js-script ../../js-helpers/best-finalized-header-at-bridged-chain.js with "Westend,0" within 400 seconds
|
||||
|
||||
+2
-2
@@ -26,11 +26,11 @@ done
|
||||
logs_dir=$TEST_DIR/logs
|
||||
helper_script="${BASH_SOURCE%/*}/helper.sh"
|
||||
|
||||
rococo_def=$POLKADOT_SDK_PATH/cumulus/zombienet/bridge-hubs/bridge_hub_rococo_local_network.toml
|
||||
rococo_def=${BASH_SOURCE%/*}/bridge_hub_rococo_local_network.toml
|
||||
start_zombienet $TEST_DIR $rococo_def rococo_dir rococo_pid
|
||||
echo
|
||||
|
||||
westend_def=$POLKADOT_SDK_PATH/cumulus/zombienet/bridge-hubs/bridge_hub_westend_local_network.toml
|
||||
westend_def=${BASH_SOURCE%/*}/bridge_hub_westend_local_network.toml
|
||||
start_zombienet $TEST_DIR $westend_def westend_dir westend_pid
|
||||
echo
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
Description: User is able to transfer ROC from Rococo Asset Hub to Westend Asset Hub and back
|
||||
Network: ./bridge_hub_westend_local_network.toml
|
||||
Creds: config
|
||||
|
||||
# ensure that initialization has completed
|
||||
asset-hub-westend-collator1: js-script ../../js-helpers/wait-hrmp-channel-opened.js with "1002" within 600 seconds
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
Description: User is able to transfer ROC from Rococo Asset Hub to Westend Asset Hub and back
|
||||
Network: ./bridge_hub_westend_local_network.toml
|
||||
Creds: config
|
||||
|
||||
# relay is already started - let's wait until with-Rococo GRANPDA pallet is initialized at Westend
|
||||
bridge-hub-westend-collator1: js-script ../../js-helpers/best-finalized-header-at-bridged-chain.js with "Rococo,0" within 400 seconds
|
||||
@@ -28,7 +28,7 @@ done
|
||||
# assuming that we'll be using native provide && all processes will be executing locally
|
||||
# (we need absolute paths here, because they're used when scripts are called by zombienet from tmp folders)
|
||||
export POLKADOT_SDK_PATH=`realpath $(dirname "$0")/../..`
|
||||
export BRIDGE_TESTS_FOLDER=$POLKADOT_SDK_PATH/bridges/zombienet/tests
|
||||
export BRIDGE_TESTS_FOLDER=$POLKADOT_SDK_PATH/bridges/testing/tests
|
||||
|
||||
# set pathc to binaries
|
||||
if [ "$ZOMBIENET_DOCKER_PATHS" -eq 1 ]; then
|
||||
+1
-1
@@ -2,6 +2,6 @@
|
||||
|
||||
INVOKE_LOG=`mktemp -p $TEST_FOLDER invoke.XXXXX`
|
||||
|
||||
pushd $POLKADOT_SDK_PATH/cumulus/scripts
|
||||
pushd $POLKADOT_SDK_PATH/bridges/testing/environments/rococo-westend
|
||||
./bridges_rococo_westend.sh $1 >$INVOKE_LOG 2>&1
|
||||
popd
|
||||
+1
-1
@@ -2,6 +2,6 @@
|
||||
|
||||
RELAY_LOG=`mktemp -p $TEST_FOLDER relay.XXXXX`
|
||||
|
||||
pushd $POLKADOT_SDK_PATH/cumulus/scripts
|
||||
pushd $POLKADOT_SDK_PATH/bridges/testing/environments/rococo-westend
|
||||
./bridges_rococo_westend.sh run-relay >$RELAY_LOG 2>&1&
|
||||
popd
|
||||
@@ -0,0 +1,12 @@
|
||||
Description: User is able to transfer ROC from Rococo Asset Hub to Westend Asset Hub and back
|
||||
Network: ../../environments/rococo-westend/bridge_hub_westend_local_network.toml
|
||||
Creds: config
|
||||
|
||||
# send ROC to //Alice from Rococo AH to Westend AH
|
||||
asset-hub-westend-collator1: run ../../environments/rococo-westend/helper.sh with "reserve-transfer-assets-from-asset-hub-rococo-local" within 120 seconds
|
||||
|
||||
# check that //Alice received the ROC on Westend AH
|
||||
asset-hub-westend-collator1: js-script ../../js-helpers/wrapped-assets-balance.js with "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY,0,Rococo" within 300 seconds
|
||||
|
||||
# check that the relayer //Charlie is rewarded by Westend AH
|
||||
bridge-hub-westend-collator1: js-script ../../js-helpers/relayer-rewards.js with "5FLSigC9HGRKVhB9FiEo4Y3koPsNmBmLJbpXg2mp1hXcS59Y,0x00000002,0x6268726F,ThisChain,0" within 30 seconds
|
||||
@@ -0,0 +1,12 @@
|
||||
Description: User is able to transfer WND from Westend Asset Hub to Rococo Asset Hub and back
|
||||
Network: ../../environments/rococo-westend/bridge_hub_rococo_local_network.toml
|
||||
Creds: config
|
||||
|
||||
# send WND to //Alice from Westend AH to Rococo AH
|
||||
asset-hub-rococo-collator1: run ../../environments/rococo-westend/helper.sh with "reserve-transfer-assets-from-asset-hub-westend-local" within 120 seconds
|
||||
|
||||
# check that //Alice received the WND on Rococo AH
|
||||
asset-hub-rococo-collator1: js-script ../../js-helpers/wrapped-assets-balance.js with "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY,0,Westend" within 300 seconds
|
||||
|
||||
# check that the relayer //Charlie is rewarded by Rococo AH
|
||||
bridge-hub-rococo-collator1: js-script ../../js-helpers/relayer-rewards.js with "5FLSigC9HGRKVhB9FiEo4Y3koPsNmBmLJbpXg2mp1hXcS59Y,0x00000002,0x62687764,ThisChain,0" within 30 seconds
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
Description: User is able to transfer ROC from Rococo Asset Hub to Westend Asset Hub and back
|
||||
Network: ../../../../cumulus/zombienet/bridge-hubs/bridge_hub_westend_local_network.toml
|
||||
Network: ../../environments/rococo-westend/bridge_hub_westend_local_network.toml
|
||||
Creds: config
|
||||
|
||||
# send wROC back to Alice from Westend AH to Rococo AH
|
||||
@@ -7,4 +7,4 @@ asset-hub-rococo-collator1: run ../../environments/rococo-westend/helper.sh with
|
||||
|
||||
# check that //Alice received the wROC on Rococo AH
|
||||
# (we wait until //Alice account increases here - there are no other transactions that may increase it)
|
||||
asset-hub-rococo-collator1: js-script ../../helpers/native-assets-balance-increased.js with "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY" within 300 seconds
|
||||
asset-hub-rococo-collator1: js-script ../../js-helpers/native-assets-balance-increased.js with "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY" within 300 seconds
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
Description: User is able to transfer ROC from Rococo Asset Hub to Westend Asset Hub and back
|
||||
Network: ../../../../cumulus/zombienet/bridge-hubs/bridge_hub_westend_local_network.toml
|
||||
Network: ../../environments/rococo-westend/bridge_hub_westend_local_network.toml
|
||||
Creds: config
|
||||
|
||||
# send wWND back to Alice from Rococo AH to Westend AH
|
||||
@@ -7,4 +7,4 @@ asset-hub-westend-collator1: run ../../environments/rococo-westend/helper.sh wit
|
||||
|
||||
# check that //Alice received the wWND on Westend AH
|
||||
# (we wait until //Alice account increases here - there are no other transactions that may increase it)
|
||||
asset-hub-westend-collator1: js-script ../../helpers/native-assets-balance-increased.js with "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY" within 300 seconds
|
||||
asset-hub-westend-collator1: js-script ../../js-helpers/native-assets-balance-increased.js with "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY" within 300 seconds
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
Description: While relayer is idle, we only sync mandatory Rococo (and a single Rococo BH) headers to Westend BH.
|
||||
Network: ../../../../cumulus/zombienet/bridge-hubs/bridge_hub_westend_local_network.toml
|
||||
Network: ../../environments/rococo-westend/bridge_hub_westend_local_network.toml
|
||||
Creds: config
|
||||
|
||||
# ensure that relayer is only syncing mandatory headers while idle. This includes both headers that were
|
||||
# generated while relay was offline and those in the next 100 seconds while script is active.
|
||||
bridge-hub-westend-collator1: js-script ../../helpers/only-mandatory-headers-synced-when-idle.js with "300,rococo-at-westend" within 600 seconds
|
||||
bridge-hub-westend-collator1: js-script ../../js-helpers/only-mandatory-headers-synced-when-idle.js with "300,rococo-at-westend" within 600 seconds
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
Description: While relayer is idle, we only sync mandatory Westend (and a single Westend BH) headers to Rococo BH.
|
||||
Network: ../../../../cumulus/zombienet/bridge-hubs/bridge_hub_rococo_local_network.toml
|
||||
Network: ../../environments/rococo-westend/bridge_hub_rococo_local_network.toml
|
||||
Creds: config
|
||||
|
||||
# ensure that relayer is only syncing mandatory headers while idle. This includes both headers that were
|
||||
# generated while relay was offline and those in the next 100 seconds while script is active.
|
||||
bridge-hub-rococo-collator1: js-script ../../helpers/only-mandatory-headers-synced-when-idle.js with "300,westend-at-rococo" within 600 seconds
|
||||
bridge-hub-rococo-collator1: js-script ../../js-helpers/only-mandatory-headers-synced-when-idle.js with "300,westend-at-rococo" within 600 seconds
|
||||
+3
-3
@@ -1,5 +1,5 @@
|
||||
Description: While relayer is active, we only sync mandatory and required Rococo (and Rococo BH) headers to Westend BH.
|
||||
Network: ../../../cumulus/zombienet/bridge-hubs/bridge_hub_westend_local_network.toml
|
||||
Network: ../environments/rococo-westend/bridge_hub_westend_local_network.toml
|
||||
Creds: config
|
||||
|
||||
# step 1: initialize Westend AH
|
||||
@@ -9,7 +9,7 @@ asset-hub-westend-collator1: run ../scripts/invoke-script.sh with "init-asset-hu
|
||||
bridge-hub-westend-collator1: run ../scripts/invoke-script.sh with "init-bridge-hub-westend-local" within 60 seconds
|
||||
|
||||
# step 3: ensure that initialization has completed
|
||||
asset-hub-westend-collator1: js-script ../helpers/wait-hrmp-channel-opened.js with "1002" within 600 seconds
|
||||
asset-hub-westend-collator1: js-script ../js-helpers/wait-hrmp-channel-opened.js with "1002" within 600 seconds
|
||||
|
||||
# step 4: send message from Westend to Rococo
|
||||
asset-hub-westend-collator1: run ../scripts/invoke-script.sh with "reserve-transfer-assets-from-asset-hub-westend-local" within 60 seconds
|
||||
@@ -20,7 +20,7 @@ asset-hub-westend-collator1: run ../scripts/invoke-script.sh with "reserve-trans
|
||||
# (it is started by sibling 0003-required-headers-synced-while-active-westend-to-rococo.zndsl)
|
||||
|
||||
# step 6: ensure that relayer won't sync any extra headers while delivering messages and confirmations
|
||||
bridge-hub-westend-collator1: js-script ../helpers/only-required-headers-synced-when-active.js with "500,rococo-at-westend" within 600 seconds
|
||||
bridge-hub-westend-collator1: js-script ../js-helpers/only-required-headers-synced-when-active.js with "500,rococo-at-westend" within 600 seconds
|
||||
|
||||
# wait until other network test has completed OR exit with an error too
|
||||
asset-hub-westend-collator1: run ../scripts/sync-exit.sh within 600 seconds
|
||||
+3
-3
@@ -1,5 +1,5 @@
|
||||
Description: While relayer is active, we only sync mandatory and required Westend (and Westend BH) headers to Rococo BH.
|
||||
Network: ../../../cumulus/zombienet/bridge-hubs/bridge_hub_rococo_local_network.toml
|
||||
Network: ../environments/rococo-westend/bridge_hub_rococo_local_network.toml
|
||||
Creds: config
|
||||
|
||||
# step 1: initialize Rococo AH
|
||||
@@ -9,7 +9,7 @@ asset-hub-rococo-collator1: run ../scripts/invoke-script.sh with "init-asset-hub
|
||||
bridge-hub-rococo-collator1: run ../scripts/invoke-script.sh with "init-bridge-hub-rococo-local" within 60 seconds
|
||||
|
||||
# step 3: ensure that initialization has completed
|
||||
asset-hub-rococo-collator1: js-script ../helpers/wait-hrmp-channel-opened.js with "1013" within 600 seconds
|
||||
asset-hub-rococo-collator1: js-script ../js-helpers/wait-hrmp-channel-opened.js with "1013" within 600 seconds
|
||||
|
||||
# step 4: send message from Rococo to Westend
|
||||
asset-hub-rococo-collator1: run ../scripts/invoke-script.sh with "reserve-transfer-assets-from-asset-hub-rococo-local" within 60 seconds
|
||||
@@ -20,7 +20,7 @@ asset-hub-rococo-collator1: run ../scripts/invoke-script.sh with "reserve-transf
|
||||
bridge-hub-rococo-collator1: run ../scripts/start-relayer.sh within 60 seconds
|
||||
|
||||
# step 6: ensure that relayer won't sync any extra headers while delivering messages and confirmations
|
||||
bridge-hub-rococo-collator1: js-script ../helpers/only-required-headers-synced-when-active.js with "500,westend-at-rococo" within 600 seconds
|
||||
bridge-hub-rococo-collator1: js-script ../js-helpers/only-required-headers-synced-when-active.js with "500,westend-at-rococo" within 600 seconds
|
||||
|
||||
# wait until other network test has completed OR exit with an error too
|
||||
asset-hub-rococo-collator1: run ../scripts/sync-exit.sh within 600 seconds
|
||||
@@ -65,7 +65,7 @@ function generate_hex_encoded_call_data() {
|
||||
shift
|
||||
echo "Input params: $@"
|
||||
|
||||
node $(dirname "$0")/generate_hex_encoded_call "$type" "$endpoint" "$output" "$@"
|
||||
node ${BASH_SOURCE%/*}/../utils/generate_hex_encoded_call "$type" "$endpoint" "$output" "$@"
|
||||
local retVal=$?
|
||||
|
||||
if [ $type != "check" ]; then
|
||||
@@ -1,3 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
$POLKADOT_SDK_PATH/cumulus/scripts/bridges_rococo_westend.sh "$@"
|
||||
@@ -1,8 +0,0 @@
|
||||
Description: User is able to transfer WND from Westend Asset Hub to Rococo Asset Hub and back
|
||||
Network: ../../../../cumulus/zombienet/bridge-hubs/bridge_hub_rococo_local_network.toml
|
||||
Creds: config
|
||||
|
||||
# ensure that initialization has completed
|
||||
asset-hub-rococo-collator1: js-script ../../helpers/wait-hrmp-channel-opened.js with "1013" within 300 seconds
|
||||
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
Description: User is able to transfer WND from Westend Asset Hub to Rococo Asset Hub and back
|
||||
Network: ../../../../cumulus/zombienet/bridge-hubs/bridge_hub_rococo_local_network.toml
|
||||
Creds: config
|
||||
|
||||
# relay is already started - let's wait until with-Westend GRANPDA pallet is initialized at Rococo
|
||||
bridge-hub-rococo-collator1: js-script ../../helpers/best-finalized-header-at-bridged-chain.js with "Westend,0" within 400 seconds
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
Description: User is able to transfer ROC from Rococo Asset Hub to Westend Asset Hub and back
|
||||
Network: ../../../../cumulus/zombienet/bridge-hubs/bridge_hub_westend_local_network.toml
|
||||
Creds: config
|
||||
|
||||
# ensure that initialization has completed
|
||||
asset-hub-westend-collator1: js-script ../../helpers/wait-hrmp-channel-opened.js with "1002" within 600 seconds
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
Description: User is able to transfer ROC from Rococo Asset Hub to Westend Asset Hub and back
|
||||
Network: ../../../../cumulus/zombienet/bridge-hubs/bridge_hub_westend_local_network.toml
|
||||
Creds: config
|
||||
|
||||
# relay is already started - let's wait until with-Rococo GRANPDA pallet is initialized at Westend
|
||||
bridge-hub-westend-collator1: js-script ../../helpers/best-finalized-header-at-bridged-chain.js with "Rococo,0" within 400 seconds
|
||||
@@ -1,39 +0,0 @@
|
||||
Description: User is able to transfer ROC from Rococo Asset Hub to Westend Asset Hub and back
|
||||
Network: ../../../cumulus/zombienet/bridge-hubs/bridge_hub_westend_local_network.toml
|
||||
Creds: config
|
||||
|
||||
# step 0: start relayer
|
||||
# (started by sibling 0001-asset-transfer-works-westend-to-rococo.zndsl test)
|
||||
|
||||
# step 1: initialize Westend AH
|
||||
asset-hub-westend-collator1: run ../scripts/invoke-script.sh with "init-asset-hub-westend-local" within 60 seconds
|
||||
|
||||
# step 2: initialize Westend bridge hub
|
||||
bridge-hub-westend-collator1: run ../scripts/invoke-script.sh with "init-bridge-hub-westend-local" within 60 seconds
|
||||
|
||||
# step 3: ensure that initialization has completed
|
||||
asset-hub-westend-collator1: js-script ../helpers/wait-hrmp-channel-opened.js with "1002" within 600 seconds
|
||||
|
||||
# step 4: relay is already started - let's wait until with-Rococo GRANPDA pallet is initialized at Westend
|
||||
bridge-hub-westend-collator1: js-script ../helpers/best-finalized-header-at-bridged-chain.js with "Rococo,0" within 400 seconds
|
||||
|
||||
# step 5: send WND to //Alice on Rococo AH
|
||||
# (that's a required part of a sibling 0001-asset-transfer-works-westend-to-rococo.zndsl test)
|
||||
asset-hub-westend-collator1: run ../scripts/invoke-script.sh with "reserve-transfer-assets-from-asset-hub-westend-local" within 60 seconds
|
||||
|
||||
# step 6: elsewhere Rococo has sent ROC to //Alice - let's wait for it
|
||||
asset-hub-westend-collator1: js-script ../helpers/wrapped-assets-balance.js with "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY,0,Rococo" within 600 seconds
|
||||
|
||||
# step 7: check that the relayer //Charlie is rewarded by both our AH and target AH
|
||||
bridge-hub-westend-collator1: js-script ../helpers/relayer-rewards.js with "5FLSigC9HGRKVhB9FiEo4Y3koPsNmBmLJbpXg2mp1hXcS59Y,0x00000002,0x6268726f,BridgedChain,0" within 300 seconds
|
||||
bridge-hub-westend-collator1: js-script ../helpers/relayer-rewards.js with "5FLSigC9HGRKVhB9FiEo4Y3koPsNmBmLJbpXg2mp1hXcS59Y,0x00000002,0x6268726F,ThisChain,0" within 300 seconds
|
||||
|
||||
# step 8: send wROC back to Alice at Rococo AH
|
||||
asset-hub-westend-collator1: run ../scripts/invoke-script.sh with "withdraw-reserve-assets-from-asset-hub-westend-local" within 60 seconds
|
||||
|
||||
# step 9: elsewhere Rococo has sent wWND to //Alice - let's wait for it
|
||||
# (we wait until //Alice account increases here - there are no other transactionc that may increase it)
|
||||
asset-hub-westend-collator1: js-script ../helpers/native-assets-balance-increased.js with "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY" within 600 seconds
|
||||
|
||||
# wait until other network test has completed OR exit with an error too
|
||||
asset-hub-westend-collator1: run ../scripts/sync-exit.sh within 600 seconds
|
||||
@@ -1,39 +0,0 @@
|
||||
Description: User is able to transfer WND from Westend Asset Hub to Rococo Asset Hub and back
|
||||
Network: ../../../cumulus/zombienet/bridge-hubs/bridge_hub_rococo_local_network.toml
|
||||
Creds: config
|
||||
|
||||
# step 0: start relayer
|
||||
bridge-hub-rococo-collator1: run ../scripts/start-relayer.sh within 60 seconds
|
||||
|
||||
# step 1: initialize Rococo AH
|
||||
asset-hub-rococo-collator1: run ../scripts/invoke-script.sh with "init-asset-hub-rococo-local" within 60 seconds
|
||||
|
||||
# step 2: initialize Rococo bridge hub
|
||||
bridge-hub-rococo-collator1: run ../scripts/invoke-script.sh with "init-bridge-hub-rococo-local" within 60 seconds
|
||||
|
||||
# step 3: ensure that initialization has completed
|
||||
asset-hub-rococo-collator1: js-script ../helpers/wait-hrmp-channel-opened.js with "1013" within 600 seconds
|
||||
|
||||
# step 4: relay is already started - let's wait until with-Westend GRANPDA pallet is initialized at Rococo
|
||||
bridge-hub-rococo-collator1: js-script ../helpers/best-finalized-header-at-bridged-chain.js with "Westend,0" within 400 seconds
|
||||
|
||||
# step 5: send ROC to //Alice on Westend AH
|
||||
# (that's a required part of a sibling 0001-asset-transfer-works-rococo-to-westend.zndsl test)
|
||||
asset-hub-rococo-collator1: run ../scripts/invoke-script.sh with "reserve-transfer-assets-from-asset-hub-rococo-local" within 60 seconds
|
||||
|
||||
# step 6: elsewhere Westend has sent WND to //Alice - let's wait for it
|
||||
asset-hub-rococo-collator1: js-script ../helpers/wrapped-assets-balance.js with "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY,0,Westend" within 600 seconds
|
||||
|
||||
# step 7: check that the relayer //Charlie is rewarded by both our AH and target AH
|
||||
bridge-hub-rococo-collator1: js-script ../helpers/relayer-rewards.js with "5FLSigC9HGRKVhB9FiEo4Y3koPsNmBmLJbpXg2mp1hXcS59Y,0x00000002,0x62687764,BridgedChain,0" within 300 seconds
|
||||
bridge-hub-rococo-collator1: js-script ../helpers/relayer-rewards.js with "5FLSigC9HGRKVhB9FiEo4Y3koPsNmBmLJbpXg2mp1hXcS59Y,0x00000002,0x62687764,ThisChain,0" within 300 seconds
|
||||
|
||||
# step 8: send wWND back to Alice at Westend AH
|
||||
asset-hub-rococo-collator1: run ../scripts/invoke-script.sh with "withdraw-reserve-assets-from-asset-hub-rococo-local" within 60 seconds
|
||||
|
||||
# step 9: elsewhere Westend has sent wROC to //Alice - let's wait for it
|
||||
# (we wait until //Alice account increases here - there are no other transactionc that may increase it)
|
||||
asset-hub-rococo-collator1: js-script ../helpers/native-assets-balance-increased.js with "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY" within 600 seconds
|
||||
|
||||
# wait until other network test has completed OR exit with an error too
|
||||
asset-hub-rococo-collator1: run ../scripts/sync-exit.sh within 600 seconds
|
||||
@@ -1,12 +0,0 @@
|
||||
Description: User is able to transfer ROC from Rococo Asset Hub to Westend Asset Hub and back
|
||||
Network: ../../../../cumulus/zombienet/bridge-hubs/bridge_hub_westend_local_network.toml
|
||||
Creds: config
|
||||
|
||||
# send ROC to //Alice from Rococo AH to Westend AH
|
||||
asset-hub-westend-collator1: run ../../environments/rococo-westend/helper.sh with "reserve-transfer-assets-from-asset-hub-rococo-local" within 120 seconds
|
||||
|
||||
# check that //Alice received the ROC on Westend AH
|
||||
asset-hub-westend-collator1: js-script ../../helpers/wrapped-assets-balance.js with "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY,0,Rococo" within 300 seconds
|
||||
|
||||
# check that the relayer //Charlie is rewarded by Westend AH
|
||||
bridge-hub-westend-collator1: js-script ../../helpers/relayer-rewards.js with "5FLSigC9HGRKVhB9FiEo4Y3koPsNmBmLJbpXg2mp1hXcS59Y,0x00000002,0x6268726F,ThisChain,0" within 30 seconds
|
||||
@@ -1,12 +0,0 @@
|
||||
Description: User is able to transfer WND from Westend Asset Hub to Rococo Asset Hub and back
|
||||
Network: ../../../../cumulus/zombienet/bridge-hubs/bridge_hub_rococo_local_network.toml
|
||||
Creds: config
|
||||
|
||||
# send WND to //Alice from Westend AH to Rococo AH
|
||||
asset-hub-rococo-collator1: run ../../environments/rococo-westend/helper.sh with "reserve-transfer-assets-from-asset-hub-westend-local" within 120 seconds
|
||||
|
||||
# check that //Alice received the WND on Rococo AH
|
||||
asset-hub-rococo-collator1: js-script ../../helpers/wrapped-assets-balance.js with "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY,0,Westend" within 300 seconds
|
||||
|
||||
# check that the relayer //Charlie is rewarded by Rococo AH
|
||||
bridge-hub-rococo-collator1: js-script ../../helpers/relayer-rewards.js with "5FLSigC9HGRKVhB9FiEo4Y3koPsNmBmLJbpXg2mp1hXcS59Y,0x00000002,0x62687764,ThisChain,0" within 30 seconds
|
||||
-26
@@ -1,26 +0,0 @@
|
||||
Description: While relayer is idle, we only sync mandatory Rococo (and a single Rococo BH) headers to Westend BH.
|
||||
Network: ../../../cumulus/zombienet/bridge-hubs/bridge_hub_westend_local_network.toml
|
||||
Creds: config
|
||||
|
||||
# step 1: initialize Westend bridge hub
|
||||
bridge-hub-westend-collator1: run ../scripts/invoke-script.sh with "init-bridge-hub-westend-local" within 60 seconds
|
||||
|
||||
# step 2: sleep some time before starting relayer. We want to sleep for at least 1 session, which is expected to
|
||||
# be 60 seconds for test environment.
|
||||
sleep 120 seconds
|
||||
|
||||
# step 3: start relayer
|
||||
# (it is started by the sibling 0002-mandatory-headers-synced-while-idle-westend-to-rococo.zndsl test file)
|
||||
|
||||
# it also takes some time for relayer to initialize bridge, so let's sleep for 5 minutes to be sure that parachain
|
||||
# header has been synced
|
||||
|
||||
# step 4: ensure that relayer is only syncing mandatory headers while idle. This includes both headers that were
|
||||
# born while relay was offline and those in the next 100 seconds while script is active.
|
||||
bridge-hub-westend-collator1: js-script ../helpers/only-mandatory-headers-synced-when-idle.js with "300,rococo-at-westend" within 600 seconds
|
||||
|
||||
# wait until other network test has completed OR exit with an error too
|
||||
asset-hub-westend-collator1: run ../scripts/sync-exit.sh within 600 seconds
|
||||
|
||||
# wait until other network test has completed OR exit with an error too
|
||||
asset-hub-westend-collator1: run ../scripts/sync-exit.sh within 600 seconds
|
||||
-26
@@ -1,26 +0,0 @@
|
||||
Description: While relayer is idle, we only sync mandatory Westend (and a single Westend BH) headers to Rococo BH.
|
||||
Network: ../../../cumulus/zombienet/bridge-hubs/bridge_hub_rococo_local_network.toml
|
||||
Creds: config
|
||||
|
||||
# step 1: initialize Rococo bridge hub
|
||||
bridge-hub-rococo-collator1: run ../scripts/invoke-script.sh with "init-bridge-hub-rococo-local" within 60 seconds
|
||||
|
||||
# step 2: sleep some time before starting relayer. We want to sleep for at least 1 session, which is expected to
|
||||
# be 60 seconds for test environment.
|
||||
sleep 120 seconds
|
||||
|
||||
# step 3: start relayer
|
||||
bridge-hub-rococo-collator1: run ../scripts/start-relayer.sh within 60 seconds
|
||||
|
||||
# it also takes some time for relayer to initialize bridge, so let's sleep for 5 minutes to be sure that parachain
|
||||
# header has been synced
|
||||
|
||||
# step 4: ensure that relayer is only syncing mandatory headers while idle. This includes both headers that were
|
||||
# born while relay was offline and those in the next 100 seconds while script is active.
|
||||
bridge-hub-rococo-collator1: js-script ../helpers/only-mandatory-headers-synced-when-idle.js with "300,westend-at-rococo" within 600 seconds
|
||||
|
||||
# wait until other network test has completed OR exit with an error too
|
||||
asset-hub-rococo-collator1: run ../scripts/sync-exit.sh within 600 seconds
|
||||
|
||||
# wait until other network test has completed OR exit with an error too
|
||||
asset-hub-rococo-collator1: run ../scripts/sync-exit.sh within 600 seconds
|
||||
@@ -91,7 +91,7 @@ cd <polkadot-sdk-git-repo-dir>
|
||||
# Rococo + BridgeHubRococo + AssetHub for Rococo (mirroring Kusama)
|
||||
POLKADOT_BINARY=~/local_bridge_testing/bin/polkadot \
|
||||
POLKADOT_PARACHAIN_BINARY=~/local_bridge_testing/bin/polkadot-parachain \
|
||||
~/local_bridge_testing/bin/zombienet-linux --provider native spawn ./cumulus/zombienet/bridge-hubs/bridge_hub_rococo_local_network.toml
|
||||
~/local_bridge_testing/bin/zombienet-linux --provider native spawn ./bridges/testing/environments/rococo-westend/bridge_hub_rococo_local_network.toml
|
||||
```
|
||||
|
||||
```
|
||||
@@ -100,7 +100,7 @@ cd <polkadot-sdk-git-repo-dir>
|
||||
# Westend + BridgeHubWestend + AssetHub for Westend (mirroring Polkadot)
|
||||
POLKADOT_BINARY=~/local_bridge_testing/bin/polkadot \
|
||||
POLKADOT_PARACHAIN_BINARY=~/local_bridge_testing/bin/polkadot-parachain \
|
||||
~/local_bridge_testing/bin/zombienet-linux --provider native spawn ./cumulus/zombienet/bridge-hubs/bridge_hub_westend_local_network.toml
|
||||
~/local_bridge_testing/bin/zombienet-linux --provider native spawn ./bridges/testing/environments/rococo-westend/bridge_hub_westend_local_network.toml
|
||||
```
|
||||
|
||||
### Init bridge and run relayer between BridgeHubRococo and BridgeHubWestend
|
||||
@@ -112,7 +112,7 @@ POLKADOT_PARACHAIN_BINARY=~/local_bridge_testing/bin/polkadot-parachain \
|
||||
```
|
||||
cd <polkadot-sdk-git-repo-dir>
|
||||
|
||||
./cumulus/scripts/bridges_rococo_westend.sh run-relay
|
||||
./bridges/testing/environments/rococo-westend/bridges_rococo_westend.sh run-relay
|
||||
```
|
||||
|
||||
**Check relay-chain headers relaying:**
|
||||
@@ -135,10 +135,10 @@ This initialization does several things:
|
||||
```
|
||||
cd <polkadot-sdk-git-repo-dir>
|
||||
|
||||
./cumulus/scripts/bridges_rococo_westend.sh init-asset-hub-rococo-local
|
||||
./cumulus/scripts/bridges_rococo_westend.sh init-bridge-hub-rococo-local
|
||||
./cumulus/scripts/bridges_rococo_westend.sh init-asset-hub-westend-local
|
||||
./cumulus/scripts/bridges_rococo_westend.sh init-bridge-hub-westend-local
|
||||
./bridges/testing/environments/rococo-westend/bridges_rococo_westend.sh init-asset-hub-rococo-local
|
||||
./bridges/testing/environments/rococo-westend/bridges_rococo_westend.sh init-bridge-hub-rococo-local
|
||||
./bridges/testing/environments/rococo-westend/bridges_rococo_westend.sh init-asset-hub-westend-local
|
||||
./bridges/testing/environments/rococo-westend/bridges_rococo_westend.sh init-bridge-hub-westend-local
|
||||
```
|
||||
|
||||
### Send messages - transfer asset over bridge (ROCs/WNDs)
|
||||
@@ -148,13 +148,13 @@ Do reserve-backed transfers:
|
||||
cd <polkadot-sdk-git-repo-dir>
|
||||
|
||||
# ROCs from Rococo's Asset Hub to Westend's.
|
||||
./cumulus/scripts/bridges_rococo_westend.sh reserve-transfer-assets-from-asset-hub-rococo-local
|
||||
./bridges/testing/environments/rococo-westend/bridges_rococo_westend.sh reserve-transfer-assets-from-asset-hub-rococo-local
|
||||
```
|
||||
```
|
||||
cd <polkadot-sdk-git-repo-dir>
|
||||
|
||||
# WNDs from Westend's Asset Hub to Rococo's.
|
||||
./cumulus/scripts/bridges_rococo_westend.sh reserve-transfer-assets-from-asset-hub-westend-local
|
||||
./bridges/testing/environments/rococo-westend/bridges_rococo_westend.sh reserve-transfer-assets-from-asset-hub-westend-local
|
||||
```
|
||||
|
||||
- open explorers: (see zombienets)
|
||||
@@ -169,13 +169,13 @@ Do reserve withdraw transfers: (when previous is finished)
|
||||
cd <polkadot-sdk-git-repo-dir>
|
||||
|
||||
# wrappedWNDs from Rococo's Asset Hub to Westend's.
|
||||
./cumulus/scripts/bridges_rococo_westend.sh withdraw-reserve-assets-from-asset-hub-rococo-local
|
||||
./bridges/testing/environments/rococo-westend/bridges_rococo_westend.sh withdraw-reserve-assets-from-asset-hub-rococo-local
|
||||
```
|
||||
```
|
||||
cd <polkadot-sdk-git-repo-dir>
|
||||
|
||||
# wrappedROCs from Westend's Asset Hub to Rococo's.
|
||||
./cumulus/scripts/bridges_rococo_westend.sh withdraw-reserve-assets-from-asset-hub-westend-local
|
||||
./bridges/testing/environments/rococo-westend/bridges_rococo_westend.sh withdraw-reserve-assets-from-asset-hub-westend-local
|
||||
```
|
||||
|
||||
### Claim relayer's rewards on BridgeHubRococo and BridgeHubWestend
|
||||
@@ -188,10 +188,10 @@ cd <polkadot-sdk-git-repo-dir>
|
||||
cd <polkadot-sdk-git-repo-dir>
|
||||
|
||||
# Claim rewards on BridgeHubWestend:
|
||||
./cumulus/scripts/bridges_rococo_westend.sh claim-rewards-bridge-hub-rococo-local
|
||||
./bridges/testing/environments/rococo-westend/bridges_rococo_westend.sh claim-rewards-bridge-hub-rococo-local
|
||||
|
||||
# Claim rewards on BridgeHubWestend:
|
||||
./cumulus/scripts/bridges_rococo_westend.sh claim-rewards-bridge-hub-westend-local
|
||||
./bridges/testing/environments/rococo-westend/bridges_rococo_westend.sh claim-rewards-bridge-hub-westend-local
|
||||
```
|
||||
|
||||
- open explorers: (see zombienets)
|
||||
|
||||
@@ -22,7 +22,7 @@ LABEL io.parity.image.authors="devops-team@parity.io" \
|
||||
io.parity.image.source="https://github.com/paritytech/polkadot-sdk/blob/${VCS_REF}/docker/dockerfiles/bridges_zombienet_tests_injected.Dockerfile" \
|
||||
io.parity.image.revision="${VCS_REF}" \
|
||||
io.parity.image.created="${BUILD_DATE}" \
|
||||
io.parity.image.documentation="https://github.com/paritytech/polkadot-sdk/bridges/zombienet"
|
||||
io.parity.image.documentation="https://github.com/paritytech/polkadot-sdk/bridges/testing"
|
||||
|
||||
# show backtraces
|
||||
ENV RUST_BACKTRACE 1
|
||||
@@ -45,7 +45,7 @@ RUN mkdir -p /home/nonroot/bridges-polkadot-sdk
|
||||
COPY ./artifacts/bridges-polkadot-sdk /home/nonroot/bridges-polkadot-sdk
|
||||
# also prepare `generate_hex_encoded_call` for running
|
||||
RUN set -eux; \
|
||||
cd /home/nonroot/bridges-polkadot-sdk/cumulus/scripts/generate_hex_encoded_call; \
|
||||
cd /home/nonroot/bridges-polkadot-sdk/bridges/testing/utils/generate_hex_encoded_call; \
|
||||
npm install
|
||||
|
||||
# check if executable works in this container
|
||||
|
||||
Reference in New Issue
Block a user