Quick Start Guide
Set up a development environment and run the end to end test stack.
Last updated
Set up a development environment and run the end to end test stack.
Last updated
Ubuntu 22.04 LTS (Ubuntu 20.04 LTS should also work)
Utilities (jq
, direnv
, sponge
, gcc
, g++
, build-essential
)
Install hooks for direnv
. Change this if you are using a different shell.
Install https://github.com/nvm-sh/nvm
Install Node
Install pnpm ()
Rust ()
This guide uses the root of the $HOME/
folder for all source code.
Clone the https://github.com/paritytech/polkadot repo.
Clone the https://github.com/Snowfork/snowbridge repo.
yarn
install dependencies.
Edit .envrc
and direnv allow
In the web/packages/test
subfolder of the snowbridge
repo copy the envrc-example.
Modify the POLKADOT_BIN
variable in .envrc
to point to the polkadot
binary. If you have checked out all source code to the $HOME
folder you can use the relative path below: export POLKADOT_BIN=../../../../polkadot/target/release/polkadot
Allow the variables to be automatically loaded by direnv
In the contracts
subfolder of the snowbridge
repo copy the envrc-example. Here we do not need to edit the .envrc
as defaults are set.
Start up the local E2E test stack
In a separate terminal change directory to the web/packages/test
subfolder of the snowbridge
repo. Run start-services.sh
script to start the bridge.
This script will:
Launch a local ethereum node (Geth & Lodestar)
Deploy contracts
Build and start the Snowbridge parachain
Configure the bridge
Start the relayers.
When this is complete Testnet has been initialized
will be printed to the terminal. The bridge will continue to run until cancelled by Ctrl+C
to kill the start-services.sh
script.
Bootstrap the bridge.
The bridge requires a certain amount of funds (SnowDOT and SnowETH) in order for Incentivized channels to be used. The bootstrap process are the first two test cases and needs to be run before other tests will pass.
In the web/packages/test
subfolder of the snowbridge
repo run the bootstrap tests:
Ethereum
The ethereum data directory is /tmp/snowbridge/geth
.
The ethereum log file is /tmp/snowbridge/geth.log
.
The Lodestar log file is /tmp/snowbridge/lodestar.log
.
Relaychain
The relay chain log files are in the web/packages/test
subdirectory of the snowbridge
repo. alice.log
, bob.log
, charlie.log
The relay chain can be accessed via the polkadot.js web using the following url:
Parachain
The Snowbridge parachain log files are in the web/packages/test
subdirectory of the snowbridge
repo. 11144.log
, 11155.log
The Snowbridge parachain can be accessed via the polkadot.js web using the following url:
Test Parachain
The third-party test parachain log files are in the web/packages/test
subdirectory of the snowbridge
repo. 13144.log
, 13155.log
The Snowbridge Test parachain can be accessed via the polkadot.js web using the following url:
Relayers
The relayers log files can be found in the web/packages/test
subdirectory of the snowbridge
repo.
beacon-relay.log
parachain-relay.log
beefy-relay.log
Thestart-services.sh
script will automatically restart the relayer processes if they exit and print to the terminal. Seeing a relayer restart constantly is a sign that something might be wrong with your environment. Grepping the relayer logs will help pin point the issue.
Typos ()
Golang ()
Mage and Revive (, )
Geth ()