Files
pezkuwi-subxt/bridges/zombienet
Svyatoslav Nikolsky 2e6067d768 Add two new zombienet tests for bridges (manual run) (#3072)
extracted useful code from #2982 

This PR:
- adds test 2 for Rococo <> Westend bridge: checks that relayer doesn't
submit any extra headers while there are no any messages;
- adds test 3 for Rococo <> Westend bridge: checks that relayer doesn't
submit any extra headers when there are messages;
- fixes most of comments from #2439 (like: log names, ability to run
specify test number when calling `run-tests.sh`).

Right now of all our tests, only test 2 is working (until BHs will be
upgraded to use async backing), so you can test it with
`./bridges/zombienet/run-tests.sh --test 2` locally.
2024-01-29 11:56:48 +00:00
..

Bridges Tests for Local Rococo <> Westend Bridge

This folder contains zombienet based integration tests for both onchain and offchain bridges code. Due to some technical difficulties, we are using native zombienet provider, which means that you need to build some binaries locally.

To start those tests, you need to:

  • download latest zombienet release;

  • build Polkadot binary by running cargo build -p polkadot --release --features fast-runtime command in the polkadot-sdk repository clone;

  • build Polkadot Parachain binary by running cargo build -p polkadot-parachain-bin --release command in the polkadot-sdk repository clone;

  • ensure that you have node installed. Additionally, we'll need globally installed polkadot/api-cli package (use npm install -g @polkadot/api-cli@beta to install it);

  • build Substrate relay by running cargo build -p substrate-relay --release command in the parity-bridges-common repository clone.

  • copy fresh substrate-relay binary, built in previous point, to the ~/local_bridge_testing/bin/substrate-relay;

  • change the POLKADOT_SDK_FOLDER and ZOMBIENET_BINARY_PATH (and ensure that the nearby variables have correct values) in the ./run-tests.sh.

After that, you could run tests with the ./run-tests.sh command. Hopefully, it'll show the "All tests have completed successfully" message in the end. Otherwise, it'll print paths to zombienet process logs, which, in turn, may be used to track locations of all spinned relay and parachain nodes.