From 7589b648947c5ee1736c42f045e5c16b6b153274 Mon Sep 17 00:00:00 2001 From: Serban Iorga Date: Thu, 15 Feb 2024 09:55:32 +0100 Subject: [PATCH 1/7] Remove migrated tests --- ...set-transfer-works-rococo-to-westend.zndsl | 39 ------------------- ...set-transfer-works-westend-to-rococo.zndsl | 39 ------------------- ...-synced-while-idle-rococo-to-westend.zndsl | 26 ------------- ...-synced-while-idle-westend-to-rococo.zndsl | 26 ------------- 4 files changed, 130 deletions(-) delete mode 100644 bridges/zombienet/tests/0001-asset-transfer-works-rococo-to-westend.zndsl delete mode 100644 bridges/zombienet/tests/0001-asset-transfer-works-westend-to-rococo.zndsl delete mode 100644 bridges/zombienet/tests/0002-mandatory-headers-synced-while-idle-rococo-to-westend.zndsl delete mode 100644 bridges/zombienet/tests/0002-mandatory-headers-synced-while-idle-westend-to-rococo.zndsl diff --git a/bridges/zombienet/tests/0001-asset-transfer-works-rococo-to-westend.zndsl b/bridges/zombienet/tests/0001-asset-transfer-works-rococo-to-westend.zndsl deleted file mode 100644 index 82d1eee2f45c..000000000000 --- a/bridges/zombienet/tests/0001-asset-transfer-works-rococo-to-westend.zndsl +++ /dev/null @@ -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 diff --git a/bridges/zombienet/tests/0001-asset-transfer-works-westend-to-rococo.zndsl b/bridges/zombienet/tests/0001-asset-transfer-works-westend-to-rococo.zndsl deleted file mode 100644 index acfe0df03d26..000000000000 --- a/bridges/zombienet/tests/0001-asset-transfer-works-westend-to-rococo.zndsl +++ /dev/null @@ -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 diff --git a/bridges/zombienet/tests/0002-mandatory-headers-synced-while-idle-rococo-to-westend.zndsl b/bridges/zombienet/tests/0002-mandatory-headers-synced-while-idle-rococo-to-westend.zndsl deleted file mode 100644 index eb6a75c373c7..000000000000 --- a/bridges/zombienet/tests/0002-mandatory-headers-synced-while-idle-rococo-to-westend.zndsl +++ /dev/null @@ -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 diff --git a/bridges/zombienet/tests/0002-mandatory-headers-synced-while-idle-westend-to-rococo.zndsl b/bridges/zombienet/tests/0002-mandatory-headers-synced-while-idle-westend-to-rococo.zndsl deleted file mode 100644 index 728d54d586a9..000000000000 --- a/bridges/zombienet/tests/0002-mandatory-headers-synced-while-idle-westend-to-rococo.zndsl +++ /dev/null @@ -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 From c86b0a66bef0a27fe4039a3e4453a29ac4a2487c Mon Sep 17 00:00:00 2001 From: Serban Iorga Date: Wed, 14 Feb 2024 13:28:19 +0100 Subject: [PATCH 2/7] Move bridge hubs zombienet-related files --- .../rococo-westend}/bridge_hub_rococo_local_network.toml | 0 .../rococo-westend}/bridge_hub_westend_local_network.toml | 0 .../environments/rococo-westend}/bridges_rococo_westend.sh | 2 +- bridges/zombienet/environments/rococo-westend/helper.sh | 2 +- .../zombienet/environments/rococo-westend/rococo-init.zndsl | 2 +- bridges/zombienet/environments/rococo-westend/rococo.zndsl | 2 +- bridges/zombienet/environments/rococo-westend/spawn.sh | 4 ++-- .../zombienet/environments/rococo-westend/westend-init.zndsl | 2 +- bridges/zombienet/environments/rococo-westend/westend.zndsl | 2 +- bridges/zombienet/scripts/invoke-script.sh | 2 +- bridges/zombienet/scripts/start-relayer.sh | 2 +- .../tests/0001-asset-transfer/roc-reaches-westend.zndsl | 2 +- .../tests/0001-asset-transfer/wnd-reaches-rococo.zndsl | 2 +- .../tests/0001-asset-transfer/wroc-reaches-rococo.zndsl | 2 +- .../tests/0001-asset-transfer/wwnd-reaches-westend.zndsl | 2 +- .../rococo-to-westend.zndsl | 2 +- .../westend-to-rococo.zndsl | 2 +- ...quired-headers-synced-while-active-rococo-to-westend.zndsl | 2 +- ...quired-headers-synced-while-active-westend-to-rococo.zndsl | 2 +- .../bridges_common.sh => bridges/zombienet/utils/bridges.sh | 2 +- .../zombienet/utils}/generate_hex_encoded_call/index.js | 0 .../utils}/generate_hex_encoded_call/package-lock.json | 0 .../zombienet/utils}/generate_hex_encoded_call/package.json | 0 23 files changed, 19 insertions(+), 19 deletions(-) rename {cumulus/zombienet/bridge-hubs => bridges/zombienet/environments/rococo-westend}/bridge_hub_rococo_local_network.toml (100%) rename {cumulus/zombienet/bridge-hubs => bridges/zombienet/environments/rococo-westend}/bridge_hub_westend_local_network.toml (100%) rename {cumulus/scripts => bridges/zombienet/environments/rococo-westend}/bridges_rococo_westend.sh (99%) rename cumulus/scripts/bridges_common.sh => bridges/zombienet/utils/bridges.sh (99%) rename {cumulus/scripts => bridges/zombienet/utils}/generate_hex_encoded_call/index.js (100%) rename {cumulus/scripts => bridges/zombienet/utils}/generate_hex_encoded_call/package-lock.json (100%) rename {cumulus/scripts => bridges/zombienet/utils}/generate_hex_encoded_call/package.json (100%) diff --git a/cumulus/zombienet/bridge-hubs/bridge_hub_rococo_local_network.toml b/bridges/zombienet/environments/rococo-westend/bridge_hub_rococo_local_network.toml similarity index 100% rename from cumulus/zombienet/bridge-hubs/bridge_hub_rococo_local_network.toml rename to bridges/zombienet/environments/rococo-westend/bridge_hub_rococo_local_network.toml diff --git a/cumulus/zombienet/bridge-hubs/bridge_hub_westend_local_network.toml b/bridges/zombienet/environments/rococo-westend/bridge_hub_westend_local_network.toml similarity index 100% rename from cumulus/zombienet/bridge-hubs/bridge_hub_westend_local_network.toml rename to bridges/zombienet/environments/rococo-westend/bridge_hub_westend_local_network.toml diff --git a/cumulus/scripts/bridges_rococo_westend.sh b/bridges/zombienet/environments/rococo-westend/bridges_rococo_westend.sh similarity index 99% rename from cumulus/scripts/bridges_rococo_westend.sh rename to bridges/zombienet/environments/rococo-westend/bridges_rococo_westend.sh index 7bde5ede77fd..84764cdaca38 100755 --- a/cumulus/scripts/bridges_rococo_westend.sh +++ b/bridges/zombienet/environments/rococo-westend/bridges_rococo_westend.sh @@ -1,7 +1,7 @@ #!/bin/bash # import common functions -source "$(dirname "$0")"/bridges_common.sh +source "${BASH_SOURCE%/*}/../../utils/bridges.sh" # Expected sovereign accounts. # diff --git a/bridges/zombienet/environments/rococo-westend/helper.sh b/bridges/zombienet/environments/rococo-westend/helper.sh index 049693e0e293..ea556171e8be 100755 --- a/bridges/zombienet/environments/rococo-westend/helper.sh +++ b/bridges/zombienet/environments/rococo-westend/helper.sh @@ -1,3 +1,3 @@ #!/bin/bash -$POLKADOT_SDK_PATH/cumulus/scripts/bridges_rococo_westend.sh "$@" +$POLKADOT_SDK_PATH/bridges/zombienet/environments/rococo-westend/bridges_rococo_westend.sh "$@" diff --git a/bridges/zombienet/environments/rococo-westend/rococo-init.zndsl b/bridges/zombienet/environments/rococo-westend/rococo-init.zndsl index ae3e3e7cb67f..06a43fec7ecd 100644 --- a/bridges/zombienet/environments/rococo-westend/rococo-init.zndsl +++ b/bridges/zombienet/environments/rococo-westend/rococo-init.zndsl @@ -1,5 +1,5 @@ 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 +Network: ./bridge_hub_rococo_local_network.toml Creds: config # ensure that initialization has completed diff --git a/bridges/zombienet/environments/rococo-westend/rococo.zndsl b/bridges/zombienet/environments/rococo-westend/rococo.zndsl index 7ecb05ceefa3..e9a71ae70fe5 100644 --- a/bridges/zombienet/environments/rococo-westend/rococo.zndsl +++ b/bridges/zombienet/environments/rococo-westend/rococo.zndsl @@ -1,5 +1,5 @@ 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 +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 diff --git a/bridges/zombienet/environments/rococo-westend/spawn.sh b/bridges/zombienet/environments/rococo-westend/spawn.sh index 550eee04bd6e..5a0d65ce65db 100755 --- a/bridges/zombienet/environments/rococo-westend/spawn.sh +++ b/bridges/zombienet/environments/rococo-westend/spawn.sh @@ -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 diff --git a/bridges/zombienet/environments/rococo-westend/westend-init.zndsl b/bridges/zombienet/environments/rococo-westend/westend-init.zndsl index 3b3e4bd91e22..47af0872e505 100644 --- a/bridges/zombienet/environments/rococo-westend/westend-init.zndsl +++ b/bridges/zombienet/environments/rococo-westend/westend-init.zndsl @@ -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: ./bridge_hub_westend_local_network.toml Creds: config # ensure that initialization has completed diff --git a/bridges/zombienet/environments/rococo-westend/westend.zndsl b/bridges/zombienet/environments/rococo-westend/westend.zndsl index b3864d12a0e3..ed15bb75e8e8 100644 --- a/bridges/zombienet/environments/rococo-westend/westend.zndsl +++ b/bridges/zombienet/environments/rococo-westend/westend.zndsl @@ -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: ./bridge_hub_westend_local_network.toml Creds: config # relay is already started - let's wait until with-Rococo GRANPDA pallet is initialized at Westend diff --git a/bridges/zombienet/scripts/invoke-script.sh b/bridges/zombienet/scripts/invoke-script.sh index 1f814cd08562..85b03cce676f 100755 --- a/bridges/zombienet/scripts/invoke-script.sh +++ b/bridges/zombienet/scripts/invoke-script.sh @@ -2,6 +2,6 @@ INVOKE_LOG=`mktemp -p $TEST_FOLDER invoke.XXXXX` -pushd $POLKADOT_SDK_PATH/cumulus/scripts +pushd $POLKADOT_SDK_PATH/bridges/zombienet/environments/rococo-westend ./bridges_rococo_westend.sh $1 >$INVOKE_LOG 2>&1 popd diff --git a/bridges/zombienet/scripts/start-relayer.sh b/bridges/zombienet/scripts/start-relayer.sh index 630fd7316fe4..87683b9548e8 100755 --- a/bridges/zombienet/scripts/start-relayer.sh +++ b/bridges/zombienet/scripts/start-relayer.sh @@ -2,6 +2,6 @@ RELAY_LOG=`mktemp -p $TEST_FOLDER relay.XXXXX` -pushd $POLKADOT_SDK_PATH/cumulus/scripts +pushd $POLKADOT_SDK_PATH/bridges/zombienet/environments/rococo-westend ./bridges_rococo_westend.sh run-relay >$RELAY_LOG 2>&1& popd diff --git a/bridges/zombienet/tests/0001-asset-transfer/roc-reaches-westend.zndsl b/bridges/zombienet/tests/0001-asset-transfer/roc-reaches-westend.zndsl index c7fb73a88c0d..6011da764ee2 100644 --- a/bridges/zombienet/tests/0001-asset-transfer/roc-reaches-westend.zndsl +++ b/bridges/zombienet/tests/0001-asset-transfer/roc-reaches-westend.zndsl @@ -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 ROC to //Alice from Rococo AH to Westend AH diff --git a/bridges/zombienet/tests/0001-asset-transfer/wnd-reaches-rococo.zndsl b/bridges/zombienet/tests/0001-asset-transfer/wnd-reaches-rococo.zndsl index 91ce8e5cbff9..7598d10040fc 100644 --- a/bridges/zombienet/tests/0001-asset-transfer/wnd-reaches-rococo.zndsl +++ b/bridges/zombienet/tests/0001-asset-transfer/wnd-reaches-rococo.zndsl @@ -1,5 +1,5 @@ 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 +Network: ../../environments/rococo-westend/bridge_hub_rococo_local_network.toml Creds: config # send WND to //Alice from Westend AH to Rococo AH diff --git a/bridges/zombienet/tests/0001-asset-transfer/wroc-reaches-rococo.zndsl b/bridges/zombienet/tests/0001-asset-transfer/wroc-reaches-rococo.zndsl index 7fbdecadeaef..f2d9bd5a29db 100644 --- a/bridges/zombienet/tests/0001-asset-transfer/wroc-reaches-rococo.zndsl +++ b/bridges/zombienet/tests/0001-asset-transfer/wroc-reaches-rococo.zndsl @@ -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 diff --git a/bridges/zombienet/tests/0001-asset-transfer/wwnd-reaches-westend.zndsl b/bridges/zombienet/tests/0001-asset-transfer/wwnd-reaches-westend.zndsl index 662e88752688..95d9563ba2bf 100644 --- a/bridges/zombienet/tests/0001-asset-transfer/wwnd-reaches-westend.zndsl +++ b/bridges/zombienet/tests/0001-asset-transfer/wwnd-reaches-westend.zndsl @@ -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 diff --git a/bridges/zombienet/tests/0002-mandatory-headers-synced-while-idle/rococo-to-westend.zndsl b/bridges/zombienet/tests/0002-mandatory-headers-synced-while-idle/rococo-to-westend.zndsl index d4283b361296..a56735d369ed 100644 --- a/bridges/zombienet/tests/0002-mandatory-headers-synced-while-idle/rococo-to-westend.zndsl +++ b/bridges/zombienet/tests/0002-mandatory-headers-synced-while-idle/rococo-to-westend.zndsl @@ -1,5 +1,5 @@ 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 diff --git a/bridges/zombienet/tests/0002-mandatory-headers-synced-while-idle/westend-to-rococo.zndsl b/bridges/zombienet/tests/0002-mandatory-headers-synced-while-idle/westend-to-rococo.zndsl index 1ea4c92a3458..d3f824212a77 100644 --- a/bridges/zombienet/tests/0002-mandatory-headers-synced-while-idle/westend-to-rococo.zndsl +++ b/bridges/zombienet/tests/0002-mandatory-headers-synced-while-idle/westend-to-rococo.zndsl @@ -1,5 +1,5 @@ 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 diff --git a/bridges/zombienet/tests/0003-required-headers-synced-while-active-rococo-to-westend.zndsl b/bridges/zombienet/tests/0003-required-headers-synced-while-active-rococo-to-westend.zndsl index a4960344f0a0..08f9d896a33a 100644 --- a/bridges/zombienet/tests/0003-required-headers-synced-while-active-rococo-to-westend.zndsl +++ b/bridges/zombienet/tests/0003-required-headers-synced-while-active-rococo-to-westend.zndsl @@ -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 diff --git a/bridges/zombienet/tests/0003-required-headers-synced-while-active-westend-to-rococo.zndsl b/bridges/zombienet/tests/0003-required-headers-synced-while-active-westend-to-rococo.zndsl index 33c3ceebcf84..34dd06ae5891 100644 --- a/bridges/zombienet/tests/0003-required-headers-synced-while-active-westend-to-rococo.zndsl +++ b/bridges/zombienet/tests/0003-required-headers-synced-while-active-westend-to-rococo.zndsl @@ -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 diff --git a/cumulus/scripts/bridges_common.sh b/bridges/zombienet/utils/bridges.sh similarity index 99% rename from cumulus/scripts/bridges_common.sh rename to bridges/zombienet/utils/bridges.sh index 2064dbbb5b85..cfde5dfd26b7 100755 --- a/cumulus/scripts/bridges_common.sh +++ b/bridges/zombienet/utils/bridges.sh @@ -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 diff --git a/cumulus/scripts/generate_hex_encoded_call/index.js b/bridges/zombienet/utils/generate_hex_encoded_call/index.js similarity index 100% rename from cumulus/scripts/generate_hex_encoded_call/index.js rename to bridges/zombienet/utils/generate_hex_encoded_call/index.js diff --git a/cumulus/scripts/generate_hex_encoded_call/package-lock.json b/bridges/zombienet/utils/generate_hex_encoded_call/package-lock.json similarity index 100% rename from cumulus/scripts/generate_hex_encoded_call/package-lock.json rename to bridges/zombienet/utils/generate_hex_encoded_call/package-lock.json diff --git a/cumulus/scripts/generate_hex_encoded_call/package.json b/bridges/zombienet/utils/generate_hex_encoded_call/package.json similarity index 100% rename from cumulus/scripts/generate_hex_encoded_call/package.json rename to bridges/zombienet/utils/generate_hex_encoded_call/package.json From d34e1ea57596a6ae8625503658219e7ea49e0b24 Mon Sep 17 00:00:00 2001 From: Serban Iorga Date: Thu, 15 Feb 2024 10:52:55 +0100 Subject: [PATCH 3/7] fixes --- .../parachains/runtimes/bridge-hubs/README.md | 26 +++++++++---------- ...ridges_zombienet_tests_injected.Dockerfile | 2 +- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/cumulus/parachains/runtimes/bridge-hubs/README.md b/cumulus/parachains/runtimes/bridge-hubs/README.md index 4e9403bf25ee..fcb2f8d55308 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/README.md +++ b/cumulus/parachains/runtimes/bridge-hubs/README.md @@ -91,7 +91,7 @@ cd # 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/zombienet/environments/rococo-westend/bridge_hub_rococo_local_network.toml ``` ``` @@ -100,7 +100,7 @@ cd # 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/zombienet/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 -./cumulus/scripts/bridges_rococo_westend.sh run-relay +./bridges/zombienet/environments/rococo-westend/bridges_rococo_westend.sh run-relay ``` **Check relay-chain headers relaying:** @@ -135,10 +135,10 @@ This initialization does several things: ``` cd -./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/zombienet/environments/rococo-westend/bridges_rococo_westend.sh init-asset-hub-rococo-local +./bridges/zombienet/environments/rococo-westend/bridges_rococo_westend.sh init-bridge-hub-rococo-local +./bridges/zombienet/environments/rococo-westend/bridges_rococo_westend.sh init-asset-hub-westend-local +./bridges/zombienet/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 # ROCs from Rococo's Asset Hub to Westend's. -./cumulus/scripts/bridges_rococo_westend.sh reserve-transfer-assets-from-asset-hub-rococo-local +./bridges/zombienet/environments/rococo-westend/bridges_rococo_westend.sh reserve-transfer-assets-from-asset-hub-rococo-local ``` ``` cd # WNDs from Westend's Asset Hub to Rococo's. -./cumulus/scripts/bridges_rococo_westend.sh reserve-transfer-assets-from-asset-hub-westend-local +./bridges/zombienet/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 # wrappedWNDs from Rococo's Asset Hub to Westend's. -./cumulus/scripts/bridges_rococo_westend.sh withdraw-reserve-assets-from-asset-hub-rococo-local +./bridges/zombienet/environments/rococo-westend/bridges_rococo_westend.sh withdraw-reserve-assets-from-asset-hub-rococo-local ``` ``` cd # wrappedROCs from Westend's Asset Hub to Rococo's. -./cumulus/scripts/bridges_rococo_westend.sh withdraw-reserve-assets-from-asset-hub-westend-local +./bridges/zombienet/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 cd # Claim rewards on BridgeHubWestend: -./cumulus/scripts/bridges_rococo_westend.sh claim-rewards-bridge-hub-rococo-local +./bridges/zombienet/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/zombienet/environments/rococo-westend/bridges_rococo_westend.sh claim-rewards-bridge-hub-westend-local ``` - open explorers: (see zombienets) diff --git a/docker/dockerfiles/bridges_zombienet_tests_injected.Dockerfile b/docker/dockerfiles/bridges_zombienet_tests_injected.Dockerfile index ec8881c5a338..96cae61b171f 100644 --- a/docker/dockerfiles/bridges_zombienet_tests_injected.Dockerfile +++ b/docker/dockerfiles/bridges_zombienet_tests_injected.Dockerfile @@ -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/zombienet/utils/generate_hex_encoded_call; \ npm install # check if executable works in this container From 2804ed637576964e2b3d41df7bd2b0790b4de888 Mon Sep 17 00:00:00 2001 From: Serban Iorga Date: Thu, 15 Feb 2024 11:04:31 +0100 Subject: [PATCH 4/7] artifacts fixes --- .gitlab/pipeline/build.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.gitlab/pipeline/build.yml b/.gitlab/pipeline/build.yml index 42aabc2635d4..bdbd071deb35 100644 --- a/.gitlab/pipeline/build.yml +++ b/.gitlab/pipeline/build.yml @@ -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 From 8e3d09477b67cbc05ef7092944c145d595216fb5 Mon Sep 17 00:00:00 2001 From: Serban Iorga Date: Thu, 15 Feb 2024 11:25:32 +0100 Subject: [PATCH 5/7] Rename bridges/zombienet -> bridges/testing --- .config/taplo.toml | 1 + .gitlab/pipeline/build.yml | 2 +- .gitlab/pipeline/zombienet/bridges.yml | 8 +++--- bridges/{zombienet => testing}/README.md | 0 .../bridge_hub_rococo_local_network.toml | 0 .../bridge_hub_westend_local_network.toml | 0 .../rococo-westend/bridges_rococo_westend.sh | 0 .../environments/rococo-westend/helper.sh | 3 +++ .../rococo-westend/rococo-init.zndsl | 0 .../environments/rococo-westend/rococo.zndsl | 0 .../environments/rococo-westend/spawn.sh | 0 .../rococo-westend/start_relayer.sh | 0 .../rococo-westend/westend-init.zndsl | 0 .../environments/rococo-westend/westend.zndsl | 0 .../best-finalized-header-at-bridged-chain.js | 0 .../helpers/chains/rococo-at-westend.js | 0 .../helpers/chains/westend-at-rococo.js | 0 .../native-assets-balance-increased.js | 0 ...only-mandatory-headers-synced-when-idle.js | 0 .../only-required-headers-synced-when-idle.js | 0 .../helpers/relayer-rewards.js | 0 .../{zombienet => testing}/helpers/utils.js | 0 .../helpers/wait-hrmp-channel-opened.js | 0 .../helpers/wrapped-assets-balance.js | 0 .../{zombienet => testing}/run-new-test.sh | 0 bridges/{zombienet => testing}/run-tests.sh | 2 +- .../scripts/invoke-script.sh | 2 +- .../scripts/start-relayer.sh | 2 +- .../scripts/sync-exit.sh | 0 .../roc-reaches-westend.zndsl | 0 .../tests/0001-asset-transfer/run.sh | 0 .../wnd-reaches-rococo.zndsl | 0 .../wroc-reaches-rococo.zndsl | 0 .../wwnd-reaches-westend.zndsl | 0 .../rococo-to-westend.zndsl | 0 .../run.sh | 0 .../westend-to-rococo.zndsl | 0 ...ynced-while-active-rococo-to-westend.zndsl | 0 ...ynced-while-active-westend-to-rococo.zndsl | 0 .../{zombienet => testing}/utils/bridges.sh | 0 .../{zombienet => testing}/utils/common.sh | 0 .../utils/generate_hex_encoded_call/index.js | 0 .../package-lock.json | 0 .../generate_hex_encoded_call/package.json | 0 .../{zombienet => testing}/utils/zombienet.sh | 0 .../environments/rococo-westend/helper.sh | 3 --- .../parachains/runtimes/bridge-hubs/README.md | 26 +++++++++---------- ...ridges_zombienet_tests_injected.Dockerfile | 4 +-- 48 files changed, 27 insertions(+), 26 deletions(-) rename bridges/{zombienet => testing}/README.md (100%) rename bridges/{zombienet => testing}/environments/rococo-westend/bridge_hub_rococo_local_network.toml (100%) rename bridges/{zombienet => testing}/environments/rococo-westend/bridge_hub_westend_local_network.toml (100%) rename bridges/{zombienet => testing}/environments/rococo-westend/bridges_rococo_westend.sh (100%) create mode 100755 bridges/testing/environments/rococo-westend/helper.sh rename bridges/{zombienet => testing}/environments/rococo-westend/rococo-init.zndsl (100%) rename bridges/{zombienet => testing}/environments/rococo-westend/rococo.zndsl (100%) rename bridges/{zombienet => testing}/environments/rococo-westend/spawn.sh (100%) rename bridges/{zombienet => testing}/environments/rococo-westend/start_relayer.sh (100%) rename bridges/{zombienet => testing}/environments/rococo-westend/westend-init.zndsl (100%) rename bridges/{zombienet => testing}/environments/rococo-westend/westend.zndsl (100%) rename bridges/{zombienet => testing}/helpers/best-finalized-header-at-bridged-chain.js (100%) rename bridges/{zombienet => testing}/helpers/chains/rococo-at-westend.js (100%) rename bridges/{zombienet => testing}/helpers/chains/westend-at-rococo.js (100%) rename bridges/{zombienet => testing}/helpers/native-assets-balance-increased.js (100%) rename bridges/{zombienet => testing}/helpers/only-mandatory-headers-synced-when-idle.js (100%) rename bridges/{zombienet => testing}/helpers/only-required-headers-synced-when-idle.js (100%) rename bridges/{zombienet => testing}/helpers/relayer-rewards.js (100%) rename bridges/{zombienet => testing}/helpers/utils.js (100%) rename bridges/{zombienet => testing}/helpers/wait-hrmp-channel-opened.js (100%) rename bridges/{zombienet => testing}/helpers/wrapped-assets-balance.js (100%) rename bridges/{zombienet => testing}/run-new-test.sh (100%) rename bridges/{zombienet => testing}/run-tests.sh (98%) rename bridges/{zombienet => testing}/scripts/invoke-script.sh (62%) rename bridges/{zombienet => testing}/scripts/start-relayer.sh (63%) rename bridges/{zombienet => testing}/scripts/sync-exit.sh (100%) rename bridges/{zombienet => testing}/tests/0001-asset-transfer/roc-reaches-westend.zndsl (100%) rename bridges/{zombienet => testing}/tests/0001-asset-transfer/run.sh (100%) rename bridges/{zombienet => testing}/tests/0001-asset-transfer/wnd-reaches-rococo.zndsl (100%) rename bridges/{zombienet => testing}/tests/0001-asset-transfer/wroc-reaches-rococo.zndsl (100%) rename bridges/{zombienet => testing}/tests/0001-asset-transfer/wwnd-reaches-westend.zndsl (100%) rename bridges/{zombienet => testing}/tests/0002-mandatory-headers-synced-while-idle/rococo-to-westend.zndsl (100%) rename bridges/{zombienet => testing}/tests/0002-mandatory-headers-synced-while-idle/run.sh (100%) rename bridges/{zombienet => testing}/tests/0002-mandatory-headers-synced-while-idle/westend-to-rococo.zndsl (100%) rename bridges/{zombienet => testing}/tests/0003-required-headers-synced-while-active-rococo-to-westend.zndsl (100%) rename bridges/{zombienet => testing}/tests/0003-required-headers-synced-while-active-westend-to-rococo.zndsl (100%) rename bridges/{zombienet => testing}/utils/bridges.sh (100%) rename bridges/{zombienet => testing}/utils/common.sh (100%) rename bridges/{zombienet => testing}/utils/generate_hex_encoded_call/index.js (100%) rename bridges/{zombienet => testing}/utils/generate_hex_encoded_call/package-lock.json (100%) rename bridges/{zombienet => testing}/utils/generate_hex_encoded_call/package.json (100%) rename bridges/{zombienet => testing}/utils/zombienet.sh (100%) delete mode 100755 bridges/zombienet/environments/rococo-westend/helper.sh diff --git a/.config/taplo.toml b/.config/taplo.toml index f5d0b7021ba8..6edb838c6e78 100644 --- a/.config/taplo.toml +++ b/.config/taplo.toml @@ -6,6 +6,7 @@ exclude = [ "polkadot/node/malus/integrationtests/**", "polkadot/zombienet_tests/**", "substrate/zombienet/**", + "bridges/testing/**" ] # global rules diff --git a/.gitlab/pipeline/build.yml b/.gitlab/pipeline/build.yml index bdbd071deb35..53c47e5ff5ae 100644 --- a/.gitlab/pipeline/build.yml +++ b/.gitlab/pipeline/build.yml @@ -409,4 +409,4 @@ prepare-bridges-zombienet-artifacts: before_script: - mkdir -p ./artifacts/bridges-polkadot-sdk/bridges script: - - cp -r bridges/zombienet ./artifacts/bridges-polkadot-sdk/bridges/zombienet + - cp -r bridges/testing ./artifacts/bridges-polkadot-sdk/bridges/testing diff --git a/.gitlab/pipeline/zombienet/bridges.yml b/.gitlab/pipeline/zombienet/bridges.yml index 16cabad6ccab..f7c32d21c551 100644 --- a/.gitlab/pipeline/zombienet/bridges.yml +++ b/.gitlab/pipeline/zombienet/bridges.yml @@ -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" diff --git a/bridges/zombienet/README.md b/bridges/testing/README.md similarity index 100% rename from bridges/zombienet/README.md rename to bridges/testing/README.md diff --git a/bridges/zombienet/environments/rococo-westend/bridge_hub_rococo_local_network.toml b/bridges/testing/environments/rococo-westend/bridge_hub_rococo_local_network.toml similarity index 100% rename from bridges/zombienet/environments/rococo-westend/bridge_hub_rococo_local_network.toml rename to bridges/testing/environments/rococo-westend/bridge_hub_rococo_local_network.toml diff --git a/bridges/zombienet/environments/rococo-westend/bridge_hub_westend_local_network.toml b/bridges/testing/environments/rococo-westend/bridge_hub_westend_local_network.toml similarity index 100% rename from bridges/zombienet/environments/rococo-westend/bridge_hub_westend_local_network.toml rename to bridges/testing/environments/rococo-westend/bridge_hub_westend_local_network.toml diff --git a/bridges/zombienet/environments/rococo-westend/bridges_rococo_westend.sh b/bridges/testing/environments/rococo-westend/bridges_rococo_westend.sh similarity index 100% rename from bridges/zombienet/environments/rococo-westend/bridges_rococo_westend.sh rename to bridges/testing/environments/rococo-westend/bridges_rococo_westend.sh diff --git a/bridges/testing/environments/rococo-westend/helper.sh b/bridges/testing/environments/rococo-westend/helper.sh new file mode 100755 index 000000000000..211a5b53b3d9 --- /dev/null +++ b/bridges/testing/environments/rococo-westend/helper.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +$POLKADOT_SDK_PATH/bridges/testing/environments/rococo-westend/bridges_rococo_westend.sh "$@" diff --git a/bridges/zombienet/environments/rococo-westend/rococo-init.zndsl b/bridges/testing/environments/rococo-westend/rococo-init.zndsl similarity index 100% rename from bridges/zombienet/environments/rococo-westend/rococo-init.zndsl rename to bridges/testing/environments/rococo-westend/rococo-init.zndsl diff --git a/bridges/zombienet/environments/rococo-westend/rococo.zndsl b/bridges/testing/environments/rococo-westend/rococo.zndsl similarity index 100% rename from bridges/zombienet/environments/rococo-westend/rococo.zndsl rename to bridges/testing/environments/rococo-westend/rococo.zndsl diff --git a/bridges/zombienet/environments/rococo-westend/spawn.sh b/bridges/testing/environments/rococo-westend/spawn.sh similarity index 100% rename from bridges/zombienet/environments/rococo-westend/spawn.sh rename to bridges/testing/environments/rococo-westend/spawn.sh diff --git a/bridges/zombienet/environments/rococo-westend/start_relayer.sh b/bridges/testing/environments/rococo-westend/start_relayer.sh similarity index 100% rename from bridges/zombienet/environments/rococo-westend/start_relayer.sh rename to bridges/testing/environments/rococo-westend/start_relayer.sh diff --git a/bridges/zombienet/environments/rococo-westend/westend-init.zndsl b/bridges/testing/environments/rococo-westend/westend-init.zndsl similarity index 100% rename from bridges/zombienet/environments/rococo-westend/westend-init.zndsl rename to bridges/testing/environments/rococo-westend/westend-init.zndsl diff --git a/bridges/zombienet/environments/rococo-westend/westend.zndsl b/bridges/testing/environments/rococo-westend/westend.zndsl similarity index 100% rename from bridges/zombienet/environments/rococo-westend/westend.zndsl rename to bridges/testing/environments/rococo-westend/westend.zndsl diff --git a/bridges/zombienet/helpers/best-finalized-header-at-bridged-chain.js b/bridges/testing/helpers/best-finalized-header-at-bridged-chain.js similarity index 100% rename from bridges/zombienet/helpers/best-finalized-header-at-bridged-chain.js rename to bridges/testing/helpers/best-finalized-header-at-bridged-chain.js diff --git a/bridges/zombienet/helpers/chains/rococo-at-westend.js b/bridges/testing/helpers/chains/rococo-at-westend.js similarity index 100% rename from bridges/zombienet/helpers/chains/rococo-at-westend.js rename to bridges/testing/helpers/chains/rococo-at-westend.js diff --git a/bridges/zombienet/helpers/chains/westend-at-rococo.js b/bridges/testing/helpers/chains/westend-at-rococo.js similarity index 100% rename from bridges/zombienet/helpers/chains/westend-at-rococo.js rename to bridges/testing/helpers/chains/westend-at-rococo.js diff --git a/bridges/zombienet/helpers/native-assets-balance-increased.js b/bridges/testing/helpers/native-assets-balance-increased.js similarity index 100% rename from bridges/zombienet/helpers/native-assets-balance-increased.js rename to bridges/testing/helpers/native-assets-balance-increased.js diff --git a/bridges/zombienet/helpers/only-mandatory-headers-synced-when-idle.js b/bridges/testing/helpers/only-mandatory-headers-synced-when-idle.js similarity index 100% rename from bridges/zombienet/helpers/only-mandatory-headers-synced-when-idle.js rename to bridges/testing/helpers/only-mandatory-headers-synced-when-idle.js diff --git a/bridges/zombienet/helpers/only-required-headers-synced-when-idle.js b/bridges/testing/helpers/only-required-headers-synced-when-idle.js similarity index 100% rename from bridges/zombienet/helpers/only-required-headers-synced-when-idle.js rename to bridges/testing/helpers/only-required-headers-synced-when-idle.js diff --git a/bridges/zombienet/helpers/relayer-rewards.js b/bridges/testing/helpers/relayer-rewards.js similarity index 100% rename from bridges/zombienet/helpers/relayer-rewards.js rename to bridges/testing/helpers/relayer-rewards.js diff --git a/bridges/zombienet/helpers/utils.js b/bridges/testing/helpers/utils.js similarity index 100% rename from bridges/zombienet/helpers/utils.js rename to bridges/testing/helpers/utils.js diff --git a/bridges/zombienet/helpers/wait-hrmp-channel-opened.js b/bridges/testing/helpers/wait-hrmp-channel-opened.js similarity index 100% rename from bridges/zombienet/helpers/wait-hrmp-channel-opened.js rename to bridges/testing/helpers/wait-hrmp-channel-opened.js diff --git a/bridges/zombienet/helpers/wrapped-assets-balance.js b/bridges/testing/helpers/wrapped-assets-balance.js similarity index 100% rename from bridges/zombienet/helpers/wrapped-assets-balance.js rename to bridges/testing/helpers/wrapped-assets-balance.js diff --git a/bridges/zombienet/run-new-test.sh b/bridges/testing/run-new-test.sh similarity index 100% rename from bridges/zombienet/run-new-test.sh rename to bridges/testing/run-new-test.sh diff --git a/bridges/zombienet/run-tests.sh b/bridges/testing/run-tests.sh similarity index 98% rename from bridges/zombienet/run-tests.sh rename to bridges/testing/run-tests.sh index 42818a5cdf36..6149d9912653 100755 --- a/bridges/zombienet/run-tests.sh +++ b/bridges/testing/run-tests.sh @@ -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 diff --git a/bridges/zombienet/scripts/invoke-script.sh b/bridges/testing/scripts/invoke-script.sh similarity index 62% rename from bridges/zombienet/scripts/invoke-script.sh rename to bridges/testing/scripts/invoke-script.sh index 85b03cce676f..cd0557b071bb 100755 --- a/bridges/zombienet/scripts/invoke-script.sh +++ b/bridges/testing/scripts/invoke-script.sh @@ -2,6 +2,6 @@ INVOKE_LOG=`mktemp -p $TEST_FOLDER invoke.XXXXX` -pushd $POLKADOT_SDK_PATH/bridges/zombienet/environments/rococo-westend +pushd $POLKADOT_SDK_PATH/bridges/testing/environments/rococo-westend ./bridges_rococo_westend.sh $1 >$INVOKE_LOG 2>&1 popd diff --git a/bridges/zombienet/scripts/start-relayer.sh b/bridges/testing/scripts/start-relayer.sh similarity index 63% rename from bridges/zombienet/scripts/start-relayer.sh rename to bridges/testing/scripts/start-relayer.sh index 87683b9548e8..38ea62fad524 100755 --- a/bridges/zombienet/scripts/start-relayer.sh +++ b/bridges/testing/scripts/start-relayer.sh @@ -2,6 +2,6 @@ RELAY_LOG=`mktemp -p $TEST_FOLDER relay.XXXXX` -pushd $POLKADOT_SDK_PATH/bridges/zombienet/environments/rococo-westend +pushd $POLKADOT_SDK_PATH/bridges/testing/environments/rococo-westend ./bridges_rococo_westend.sh run-relay >$RELAY_LOG 2>&1& popd diff --git a/bridges/zombienet/scripts/sync-exit.sh b/bridges/testing/scripts/sync-exit.sh similarity index 100% rename from bridges/zombienet/scripts/sync-exit.sh rename to bridges/testing/scripts/sync-exit.sh diff --git a/bridges/zombienet/tests/0001-asset-transfer/roc-reaches-westend.zndsl b/bridges/testing/tests/0001-asset-transfer/roc-reaches-westend.zndsl similarity index 100% rename from bridges/zombienet/tests/0001-asset-transfer/roc-reaches-westend.zndsl rename to bridges/testing/tests/0001-asset-transfer/roc-reaches-westend.zndsl diff --git a/bridges/zombienet/tests/0001-asset-transfer/run.sh b/bridges/testing/tests/0001-asset-transfer/run.sh similarity index 100% rename from bridges/zombienet/tests/0001-asset-transfer/run.sh rename to bridges/testing/tests/0001-asset-transfer/run.sh diff --git a/bridges/zombienet/tests/0001-asset-transfer/wnd-reaches-rococo.zndsl b/bridges/testing/tests/0001-asset-transfer/wnd-reaches-rococo.zndsl similarity index 100% rename from bridges/zombienet/tests/0001-asset-transfer/wnd-reaches-rococo.zndsl rename to bridges/testing/tests/0001-asset-transfer/wnd-reaches-rococo.zndsl diff --git a/bridges/zombienet/tests/0001-asset-transfer/wroc-reaches-rococo.zndsl b/bridges/testing/tests/0001-asset-transfer/wroc-reaches-rococo.zndsl similarity index 100% rename from bridges/zombienet/tests/0001-asset-transfer/wroc-reaches-rococo.zndsl rename to bridges/testing/tests/0001-asset-transfer/wroc-reaches-rococo.zndsl diff --git a/bridges/zombienet/tests/0001-asset-transfer/wwnd-reaches-westend.zndsl b/bridges/testing/tests/0001-asset-transfer/wwnd-reaches-westend.zndsl similarity index 100% rename from bridges/zombienet/tests/0001-asset-transfer/wwnd-reaches-westend.zndsl rename to bridges/testing/tests/0001-asset-transfer/wwnd-reaches-westend.zndsl diff --git a/bridges/zombienet/tests/0002-mandatory-headers-synced-while-idle/rococo-to-westend.zndsl b/bridges/testing/tests/0002-mandatory-headers-synced-while-idle/rococo-to-westend.zndsl similarity index 100% rename from bridges/zombienet/tests/0002-mandatory-headers-synced-while-idle/rococo-to-westend.zndsl rename to bridges/testing/tests/0002-mandatory-headers-synced-while-idle/rococo-to-westend.zndsl diff --git a/bridges/zombienet/tests/0002-mandatory-headers-synced-while-idle/run.sh b/bridges/testing/tests/0002-mandatory-headers-synced-while-idle/run.sh similarity index 100% rename from bridges/zombienet/tests/0002-mandatory-headers-synced-while-idle/run.sh rename to bridges/testing/tests/0002-mandatory-headers-synced-while-idle/run.sh diff --git a/bridges/zombienet/tests/0002-mandatory-headers-synced-while-idle/westend-to-rococo.zndsl b/bridges/testing/tests/0002-mandatory-headers-synced-while-idle/westend-to-rococo.zndsl similarity index 100% rename from bridges/zombienet/tests/0002-mandatory-headers-synced-while-idle/westend-to-rococo.zndsl rename to bridges/testing/tests/0002-mandatory-headers-synced-while-idle/westend-to-rococo.zndsl diff --git a/bridges/zombienet/tests/0003-required-headers-synced-while-active-rococo-to-westend.zndsl b/bridges/testing/tests/0003-required-headers-synced-while-active-rococo-to-westend.zndsl similarity index 100% rename from bridges/zombienet/tests/0003-required-headers-synced-while-active-rococo-to-westend.zndsl rename to bridges/testing/tests/0003-required-headers-synced-while-active-rococo-to-westend.zndsl diff --git a/bridges/zombienet/tests/0003-required-headers-synced-while-active-westend-to-rococo.zndsl b/bridges/testing/tests/0003-required-headers-synced-while-active-westend-to-rococo.zndsl similarity index 100% rename from bridges/zombienet/tests/0003-required-headers-synced-while-active-westend-to-rococo.zndsl rename to bridges/testing/tests/0003-required-headers-synced-while-active-westend-to-rococo.zndsl diff --git a/bridges/zombienet/utils/bridges.sh b/bridges/testing/utils/bridges.sh similarity index 100% rename from bridges/zombienet/utils/bridges.sh rename to bridges/testing/utils/bridges.sh diff --git a/bridges/zombienet/utils/common.sh b/bridges/testing/utils/common.sh similarity index 100% rename from bridges/zombienet/utils/common.sh rename to bridges/testing/utils/common.sh diff --git a/bridges/zombienet/utils/generate_hex_encoded_call/index.js b/bridges/testing/utils/generate_hex_encoded_call/index.js similarity index 100% rename from bridges/zombienet/utils/generate_hex_encoded_call/index.js rename to bridges/testing/utils/generate_hex_encoded_call/index.js diff --git a/bridges/zombienet/utils/generate_hex_encoded_call/package-lock.json b/bridges/testing/utils/generate_hex_encoded_call/package-lock.json similarity index 100% rename from bridges/zombienet/utils/generate_hex_encoded_call/package-lock.json rename to bridges/testing/utils/generate_hex_encoded_call/package-lock.json diff --git a/bridges/zombienet/utils/generate_hex_encoded_call/package.json b/bridges/testing/utils/generate_hex_encoded_call/package.json similarity index 100% rename from bridges/zombienet/utils/generate_hex_encoded_call/package.json rename to bridges/testing/utils/generate_hex_encoded_call/package.json diff --git a/bridges/zombienet/utils/zombienet.sh b/bridges/testing/utils/zombienet.sh similarity index 100% rename from bridges/zombienet/utils/zombienet.sh rename to bridges/testing/utils/zombienet.sh diff --git a/bridges/zombienet/environments/rococo-westend/helper.sh b/bridges/zombienet/environments/rococo-westend/helper.sh deleted file mode 100755 index ea556171e8be..000000000000 --- a/bridges/zombienet/environments/rococo-westend/helper.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -$POLKADOT_SDK_PATH/bridges/zombienet/environments/rococo-westend/bridges_rococo_westend.sh "$@" diff --git a/cumulus/parachains/runtimes/bridge-hubs/README.md b/cumulus/parachains/runtimes/bridge-hubs/README.md index fcb2f8d55308..c858532295dd 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/README.md +++ b/cumulus/parachains/runtimes/bridge-hubs/README.md @@ -91,7 +91,7 @@ cd # 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 ./bridges/zombienet/environments/rococo-westend/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 # 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 ./bridges/zombienet/environments/rococo-westend/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 -./bridges/zombienet/environments/rococo-westend/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 -./bridges/zombienet/environments/rococo-westend/bridges_rococo_westend.sh init-asset-hub-rococo-local -./bridges/zombienet/environments/rococo-westend/bridges_rococo_westend.sh init-bridge-hub-rococo-local -./bridges/zombienet/environments/rococo-westend/bridges_rococo_westend.sh init-asset-hub-westend-local -./bridges/zombienet/environments/rococo-westend/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 # ROCs from Rococo's Asset Hub to Westend's. -./bridges/zombienet/environments/rococo-westend/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 # WNDs from Westend's Asset Hub to Rococo's. -./bridges/zombienet/environments/rococo-westend/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 # wrappedWNDs from Rococo's Asset Hub to Westend's. -./bridges/zombienet/environments/rococo-westend/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 # wrappedROCs from Westend's Asset Hub to Rococo's. -./bridges/zombienet/environments/rococo-westend/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 cd # Claim rewards on BridgeHubWestend: -./bridges/zombienet/environments/rococo-westend/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: -./bridges/zombienet/environments/rococo-westend/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) diff --git a/docker/dockerfiles/bridges_zombienet_tests_injected.Dockerfile b/docker/dockerfiles/bridges_zombienet_tests_injected.Dockerfile index 96cae61b171f..fde9cc6e7cf3 100644 --- a/docker/dockerfiles/bridges_zombienet_tests_injected.Dockerfile +++ b/docker/dockerfiles/bridges_zombienet_tests_injected.Dockerfile @@ -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/bridges/zombienet/utils/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 From c4e6c776ab21aea5a16d888aa56d3d88672bffa0 Mon Sep 17 00:00:00 2001 From: Serban Iorga Date: Thu, 15 Feb 2024 11:31:20 +0100 Subject: [PATCH 6/7] fix toml --- .config/taplo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/taplo.toml b/.config/taplo.toml index 6edb838c6e78..a45204923cff 100644 --- a/.config/taplo.toml +++ b/.config/taplo.toml @@ -2,11 +2,11 @@ # ignore zombienet as they do some deliberate custom toml stuff exclude = [ + "bridges/testing/**", "cumulus/zombienet/**", "polkadot/node/malus/integrationtests/**", "polkadot/zombienet_tests/**", "substrate/zombienet/**", - "bridges/testing/**" ] # global rules From 68a6138e9d60834f669ca52eaa0a052b9bf72751 Mon Sep 17 00:00:00 2001 From: Serban Iorga Date: Thu, 15 Feb 2024 12:25:55 +0100 Subject: [PATCH 7/7] Rename helpers -> js-helpers --- bridges/testing/environments/rococo-westend/rococo-init.zndsl | 2 +- bridges/testing/environments/rococo-westend/rococo.zndsl | 2 +- .../testing/environments/rococo-westend/westend-init.zndsl | 2 +- bridges/testing/environments/rococo-westend/westend.zndsl | 2 +- .../best-finalized-header-at-bridged-chain.js | 0 .../{helpers => js-helpers}/chains/rococo-at-westend.js | 0 .../{helpers => js-helpers}/chains/westend-at-rococo.js | 0 .../native-assets-balance-increased.js | 0 .../only-mandatory-headers-synced-when-idle.js | 0 .../only-required-headers-synced-when-idle.js | 0 bridges/testing/{helpers => js-helpers}/relayer-rewards.js | 0 bridges/testing/{helpers => js-helpers}/utils.js | 0 .../{helpers => js-helpers}/wait-hrmp-channel-opened.js | 0 .../testing/{helpers => js-helpers}/wrapped-assets-balance.js | 0 .../tests/0001-asset-transfer/roc-reaches-westend.zndsl | 4 ++-- .../tests/0001-asset-transfer/wnd-reaches-rococo.zndsl | 4 ++-- .../tests/0001-asset-transfer/wroc-reaches-rococo.zndsl | 2 +- .../tests/0001-asset-transfer/wwnd-reaches-westend.zndsl | 2 +- .../rococo-to-westend.zndsl | 2 +- .../westend-to-rococo.zndsl | 2 +- ...quired-headers-synced-while-active-rococo-to-westend.zndsl | 4 ++-- ...quired-headers-synced-while-active-westend-to-rococo.zndsl | 4 ++-- 22 files changed, 16 insertions(+), 16 deletions(-) rename bridges/testing/{helpers => js-helpers}/best-finalized-header-at-bridged-chain.js (100%) rename bridges/testing/{helpers => js-helpers}/chains/rococo-at-westend.js (100%) rename bridges/testing/{helpers => js-helpers}/chains/westend-at-rococo.js (100%) rename bridges/testing/{helpers => js-helpers}/native-assets-balance-increased.js (100%) rename bridges/testing/{helpers => js-helpers}/only-mandatory-headers-synced-when-idle.js (100%) rename bridges/testing/{helpers => js-helpers}/only-required-headers-synced-when-idle.js (100%) rename bridges/testing/{helpers => js-helpers}/relayer-rewards.js (100%) rename bridges/testing/{helpers => js-helpers}/utils.js (100%) rename bridges/testing/{helpers => js-helpers}/wait-hrmp-channel-opened.js (100%) rename bridges/testing/{helpers => js-helpers}/wrapped-assets-balance.js (100%) diff --git a/bridges/testing/environments/rococo-westend/rococo-init.zndsl b/bridges/testing/environments/rococo-westend/rococo-init.zndsl index 06a43fec7ecd..145f2df73a6e 100644 --- a/bridges/testing/environments/rococo-westend/rococo-init.zndsl +++ b/bridges/testing/environments/rococo-westend/rococo-init.zndsl @@ -3,6 +3,6 @@ Network: ./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 +asset-hub-rococo-collator1: js-script ../../js-helpers/wait-hrmp-channel-opened.js with "1013" within 300 seconds diff --git a/bridges/testing/environments/rococo-westend/rococo.zndsl b/bridges/testing/environments/rococo-westend/rococo.zndsl index e9a71ae70fe5..bd8681af2196 100644 --- a/bridges/testing/environments/rococo-westend/rococo.zndsl +++ b/bridges/testing/environments/rococo-westend/rococo.zndsl @@ -3,5 +3,5 @@ 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 ../../helpers/best-finalized-header-at-bridged-chain.js with "Westend,0" within 400 seconds +bridge-hub-rococo-collator1: js-script ../../js-helpers/best-finalized-header-at-bridged-chain.js with "Westend,0" within 400 seconds diff --git a/bridges/testing/environments/rococo-westend/westend-init.zndsl b/bridges/testing/environments/rococo-westend/westend-init.zndsl index 47af0872e505..2f8e665d592d 100644 --- a/bridges/testing/environments/rococo-westend/westend-init.zndsl +++ b/bridges/testing/environments/rococo-westend/westend-init.zndsl @@ -3,5 +3,5 @@ Network: ./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 +asset-hub-westend-collator1: js-script ../../js-helpers/wait-hrmp-channel-opened.js with "1002" within 600 seconds diff --git a/bridges/testing/environments/rococo-westend/westend.zndsl b/bridges/testing/environments/rococo-westend/westend.zndsl index ed15bb75e8e8..c75ae579d27a 100644 --- a/bridges/testing/environments/rococo-westend/westend.zndsl +++ b/bridges/testing/environments/rococo-westend/westend.zndsl @@ -3,4 +3,4 @@ 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 ../../helpers/best-finalized-header-at-bridged-chain.js with "Rococo,0" within 400 seconds +bridge-hub-westend-collator1: js-script ../../js-helpers/best-finalized-header-at-bridged-chain.js with "Rococo,0" within 400 seconds diff --git a/bridges/testing/helpers/best-finalized-header-at-bridged-chain.js b/bridges/testing/js-helpers/best-finalized-header-at-bridged-chain.js similarity index 100% rename from bridges/testing/helpers/best-finalized-header-at-bridged-chain.js rename to bridges/testing/js-helpers/best-finalized-header-at-bridged-chain.js diff --git a/bridges/testing/helpers/chains/rococo-at-westend.js b/bridges/testing/js-helpers/chains/rococo-at-westend.js similarity index 100% rename from bridges/testing/helpers/chains/rococo-at-westend.js rename to bridges/testing/js-helpers/chains/rococo-at-westend.js diff --git a/bridges/testing/helpers/chains/westend-at-rococo.js b/bridges/testing/js-helpers/chains/westend-at-rococo.js similarity index 100% rename from bridges/testing/helpers/chains/westend-at-rococo.js rename to bridges/testing/js-helpers/chains/westend-at-rococo.js diff --git a/bridges/testing/helpers/native-assets-balance-increased.js b/bridges/testing/js-helpers/native-assets-balance-increased.js similarity index 100% rename from bridges/testing/helpers/native-assets-balance-increased.js rename to bridges/testing/js-helpers/native-assets-balance-increased.js diff --git a/bridges/testing/helpers/only-mandatory-headers-synced-when-idle.js b/bridges/testing/js-helpers/only-mandatory-headers-synced-when-idle.js similarity index 100% rename from bridges/testing/helpers/only-mandatory-headers-synced-when-idle.js rename to bridges/testing/js-helpers/only-mandatory-headers-synced-when-idle.js diff --git a/bridges/testing/helpers/only-required-headers-synced-when-idle.js b/bridges/testing/js-helpers/only-required-headers-synced-when-idle.js similarity index 100% rename from bridges/testing/helpers/only-required-headers-synced-when-idle.js rename to bridges/testing/js-helpers/only-required-headers-synced-when-idle.js diff --git a/bridges/testing/helpers/relayer-rewards.js b/bridges/testing/js-helpers/relayer-rewards.js similarity index 100% rename from bridges/testing/helpers/relayer-rewards.js rename to bridges/testing/js-helpers/relayer-rewards.js diff --git a/bridges/testing/helpers/utils.js b/bridges/testing/js-helpers/utils.js similarity index 100% rename from bridges/testing/helpers/utils.js rename to bridges/testing/js-helpers/utils.js diff --git a/bridges/testing/helpers/wait-hrmp-channel-opened.js b/bridges/testing/js-helpers/wait-hrmp-channel-opened.js similarity index 100% rename from bridges/testing/helpers/wait-hrmp-channel-opened.js rename to bridges/testing/js-helpers/wait-hrmp-channel-opened.js diff --git a/bridges/testing/helpers/wrapped-assets-balance.js b/bridges/testing/js-helpers/wrapped-assets-balance.js similarity index 100% rename from bridges/testing/helpers/wrapped-assets-balance.js rename to bridges/testing/js-helpers/wrapped-assets-balance.js diff --git a/bridges/testing/tests/0001-asset-transfer/roc-reaches-westend.zndsl b/bridges/testing/tests/0001-asset-transfer/roc-reaches-westend.zndsl index 6011da764ee2..203c95b73eb2 100644 --- a/bridges/testing/tests/0001-asset-transfer/roc-reaches-westend.zndsl +++ b/bridges/testing/tests/0001-asset-transfer/roc-reaches-westend.zndsl @@ -6,7 +6,7 @@ Creds: config 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 +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 ../../helpers/relayer-rewards.js with "5FLSigC9HGRKVhB9FiEo4Y3koPsNmBmLJbpXg2mp1hXcS59Y,0x00000002,0x6268726F,ThisChain,0" within 30 seconds +bridge-hub-westend-collator1: js-script ../../js-helpers/relayer-rewards.js with "5FLSigC9HGRKVhB9FiEo4Y3koPsNmBmLJbpXg2mp1hXcS59Y,0x00000002,0x6268726F,ThisChain,0" within 30 seconds diff --git a/bridges/testing/tests/0001-asset-transfer/wnd-reaches-rococo.zndsl b/bridges/testing/tests/0001-asset-transfer/wnd-reaches-rococo.zndsl index 7598d10040fc..bbd95db9cfda 100644 --- a/bridges/testing/tests/0001-asset-transfer/wnd-reaches-rococo.zndsl +++ b/bridges/testing/tests/0001-asset-transfer/wnd-reaches-rococo.zndsl @@ -6,7 +6,7 @@ Creds: config 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 +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 ../../helpers/relayer-rewards.js with "5FLSigC9HGRKVhB9FiEo4Y3koPsNmBmLJbpXg2mp1hXcS59Y,0x00000002,0x62687764,ThisChain,0" within 30 seconds +bridge-hub-rococo-collator1: js-script ../../js-helpers/relayer-rewards.js with "5FLSigC9HGRKVhB9FiEo4Y3koPsNmBmLJbpXg2mp1hXcS59Y,0x00000002,0x62687764,ThisChain,0" within 30 seconds diff --git a/bridges/testing/tests/0001-asset-transfer/wroc-reaches-rococo.zndsl b/bridges/testing/tests/0001-asset-transfer/wroc-reaches-rococo.zndsl index f2d9bd5a29db..4c0a4675234e 100644 --- a/bridges/testing/tests/0001-asset-transfer/wroc-reaches-rococo.zndsl +++ b/bridges/testing/tests/0001-asset-transfer/wroc-reaches-rococo.zndsl @@ -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 diff --git a/bridges/testing/tests/0001-asset-transfer/wwnd-reaches-westend.zndsl b/bridges/testing/tests/0001-asset-transfer/wwnd-reaches-westend.zndsl index 95d9563ba2bf..3acded97d5cc 100644 --- a/bridges/testing/tests/0001-asset-transfer/wwnd-reaches-westend.zndsl +++ b/bridges/testing/tests/0001-asset-transfer/wwnd-reaches-westend.zndsl @@ -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 diff --git a/bridges/testing/tests/0002-mandatory-headers-synced-while-idle/rococo-to-westend.zndsl b/bridges/testing/tests/0002-mandatory-headers-synced-while-idle/rococo-to-westend.zndsl index a56735d369ed..82a1a103b14a 100644 --- a/bridges/testing/tests/0002-mandatory-headers-synced-while-idle/rococo-to-westend.zndsl +++ b/bridges/testing/tests/0002-mandatory-headers-synced-while-idle/rococo-to-westend.zndsl @@ -4,5 +4,5 @@ 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 diff --git a/bridges/testing/tests/0002-mandatory-headers-synced-while-idle/westend-to-rococo.zndsl b/bridges/testing/tests/0002-mandatory-headers-synced-while-idle/westend-to-rococo.zndsl index d3f824212a77..865813246252 100644 --- a/bridges/testing/tests/0002-mandatory-headers-synced-while-idle/westend-to-rococo.zndsl +++ b/bridges/testing/tests/0002-mandatory-headers-synced-while-idle/westend-to-rococo.zndsl @@ -4,4 +4,4 @@ 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 diff --git a/bridges/testing/tests/0003-required-headers-synced-while-active-rococo-to-westend.zndsl b/bridges/testing/tests/0003-required-headers-synced-while-active-rococo-to-westend.zndsl index 08f9d896a33a..07b91481dc7c 100644 --- a/bridges/testing/tests/0003-required-headers-synced-while-active-rococo-to-westend.zndsl +++ b/bridges/testing/tests/0003-required-headers-synced-while-active-rococo-to-westend.zndsl @@ -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 diff --git a/bridges/testing/tests/0003-required-headers-synced-while-active-westend-to-rococo.zndsl b/bridges/testing/tests/0003-required-headers-synced-while-active-westend-to-rococo.zndsl index 34dd06ae5891..a6b11fc24052 100644 --- a/bridges/testing/tests/0003-required-headers-synced-while-active-westend-to-rococo.zndsl +++ b/bridges/testing/tests/0003-required-headers-synced-while-active-westend-to-rococo.zndsl @@ -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