Comment on page
Quick Start Guide
Set up a development environment and run the end to end test stack.
- Ubuntu 22.04 LTS (Ubuntu 20.04 LTS should also work)
- Utilities (
jq
,direnv
,sponge
,gcc
,g++
,build-essential
)
sudo apt install jq direnv moreutils gcc g++ build-essential
Install hooks for
direnv
. Change this if you are using a different shell.direnv hook bash >> .bashrc
source .bashrc
- Install https://github.com/nvm-sh/nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.2/install.sh | bash
- Install Node
cd core && nvm use
corepack enable
corepack prepare [email protected] --activate
sudo apt install -y git clang curl libssl-dev llvm libudev-dev make protobuf-compiler
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source ~/.cargo/env
rustup default stable
rustup update
rustup update nightly
rustup target add wasm32-unknown-unknown --toolchain nightly
cargo install typos-cli
curl -LO https://go.dev/dl/go1.19.3.linux-amd64.tar.gz
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf go1.19.3.linux-amd64.tar.gz
# Add to ~/.profile to persist
export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin
go install github.com/magefile/mage@latest
go install github.com/mgechev/revive@master
go install github.com/ethereum/go-ethereum/cmd/geth@latest
This guide uses the root of the
$HOME/
folder for all source code.- 1.Clone the https://github.com/paritytech/polkadot repo.git clone -n https://github.com/paritytech/polkadot.gitcd polkadotgit checkout v0.9.30cargo build --release
- 2.Clone the https://github.com/Snowfork/snowbridge repo.git clone https://github.com/Snowfork/snowbridge.git
- 3.
yarn
install dependencies.cd snowbridge(cd core && pnpm install) - 4.Edit
.envrc
anddirenv allow
In theweb/packages/test
subfolder of thesnowbridge
repo copy the envrc-example.cp .envrc-example .envrcModify thePOLKADOT_BIN
variable in.envrc
to point to thepolkadot
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 bydirenv
direnv allowIn thecontracts
subfolder of thesnowbridge
repo copy the envrc-example. Here we do not need to edit the.envrc
as defaults are set.cp .envrc-example .envrcdirenv allow
- 1.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.scripts/start-services.sh
This script will:
- 1.Launch a local ethereum node (Geth & Lodestar)
- 2.Deploy contracts
- 3.Build and start the Snowbridge parachain
- 4.Configure the bridge
- 5.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.- 1.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 thesnowbridge
repo run the bootstrap tests:pnpm test:integration test/bootstrap.js
- 1.EthereumThe 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
. - 2.RelaychainThe relay chain log files are in the
web/packages/test
subdirectory of thesnowbridge
repo.alice.log
,bob.log
,charlie.log
The relay chain can be accessed via the polkadot.js web using the following url: - 3.ParachainThe Snowbridge parachain log files are in the
web/packages/test
subdirectory of thesnowbridge
repo.11144.log
,11155.log
The Snowbridge parachain can be accessed via the polkadot.js web using the following url: - 4.Test ParachainThe third-party test parachain log files are in the
web/packages/test
subdirectory of thesnowbridge
repo.13144.log
,13155.log
The Snowbridge Test parachain can be accessed via the polkadot.js web using the following url: - 5.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
The
start-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.Last modified 4mo ago