Skip to content

Commit

Permalink
Fix zombienet-bridges-0001-asset-transfer-works (paritytech#6175)
Browse files Browse the repository at this point in the history
Closes paritytech#6161

Westend BridgeHub freezes for a while at block 3 and if we try to init
the bridge and fund the accounts during that time, it fails. So we wait
untill all the parachains produced at least 10 blocks, in order to make
sure that they work reliably.
  • Loading branch information
serban300 authored and mordamax committed Oct 25, 2024
1 parent ee69228 commit 3adb0af
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 7 deletions.
4 changes: 1 addition & 3 deletions .gitlab/pipeline/zombienet/bridges.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
- if: $CI_COMMIT_REF_NAME =~ /^gh-readonly-queue.*$/
variables:
DOCKER_IMAGES_VERSION: ${CI_COMMIT_SHORT_SHA}
- !reference [.build-refs, rules]
- !reference [ .build-refs, rules ]
before_script:
- echo "Zombienet Tests Config"
- echo "${ZOMBIENET_IMAGE}"
Expand Down Expand Up @@ -47,8 +47,6 @@
- cp -r /tmp/bridges-tests-run-*/bridge_hub_rococo_local_network/*.log ./zombienet-logs/
# copy logs of westend nodes
- cp -r /tmp/bridges-tests-run-*/bridge_hub_westend_local_network/*.log ./zombienet-logs/
tags:
- zombienet-polkadot-integration-test

zombienet-bridges-0001-asset-transfer-works:
extends:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Description: Check if the Rococo parachains started producing blocks reliably
Network: ./bridge_hub_westend_local_network.toml
Creds: config

# ensure that initialization has completed
asset-hub-rococo-collator1: reports block height is at least 10 within 180 seconds
bridge-hub-rococo-collator1: reports block height is at least 10 within 180 seconds

5 changes: 3 additions & 2 deletions bridges/testing/environments/rococo-westend/spawn.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,11 @@ start_zombienet $TEST_DIR $westend_def westend_dir westend_pid
echo

if [[ $init -eq 1 ]]; then
run_zndsl ${BASH_SOURCE%/*}/rococo-start.zndsl $rococo_dir
run_zndsl ${BASH_SOURCE%/*}/westend-start.zndsl $westend_dir

rococo_init_log=$logs_dir/rococo-init.log
echo -e "Setting up the rococo side of the bridge. Logs available at: $rococo_init_log\n"

westend_init_log=$logs_dir/westend-init.log
echo -e "Setting up the westend side of the bridge. Logs available at: $westend_init_log\n"

Expand All @@ -47,7 +49,6 @@ if [[ $init -eq 1 ]]; then
westend_init_pid=$!
wait -n $rococo_init_pid $westend_init_pid


$helper_script init-bridge-hub-rococo-local >> $rococo_init_log 2>&1 &
rococo_init_pid=$!
$helper_script init-bridge-hub-westend-local >> $westend_init_log 2>&1 &
Expand Down
4 changes: 2 additions & 2 deletions bridges/testing/environments/rococo-westend/start_relayer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ messages_relayer_log=$logs_dir/relayer_messages.log
echo -e "Starting rococo-westend messages relayer. Logs available at: $messages_relayer_log\n"
start_background_process "$helper_script run-messages-relay" $messages_relayer_log messages_relayer_pid

run_zndsl ${BASH_SOURCE%/*}/rococo.zndsl $rococo_dir
run_zndsl ${BASH_SOURCE%/*}/westend.zndsl $westend_dir
run_zndsl ${BASH_SOURCE%/*}/rococo-bridge.zndsl $rococo_dir
run_zndsl ${BASH_SOURCE%/*}/westend-bridge.zndsl $westend_dir

eval $__finality_relayer_pid="'$finality_relayer_pid'"
eval $__parachains_relayer_pid="'$parachains_relayer_pid'"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Description: Check if the Westend parachains started producing blocks reliably
Network: ./bridge_hub_westend_local_network.toml
Creds: config

# ensure that initialization has completed
asset-hub-westend-collator1: reports block height is at least 10 within 180 seconds
bridge-hub-westend-collator1: reports block height is at least 10 within 180 seconds

0 comments on commit 3adb0af

Please sign in to comment.