Skip to content

This repository contains infrastructure for local development and testing for bridges

Notifications You must be signed in to change notification settings

paritytech/bridge-infra

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bridge Task-Force Infrastructure

Prepare/Build/Deploy for Kusama <> Polkadot

This instruction simplifies the setup from bridge-hub repository.

Prepare empty directory for testing

mkdir -p ~/local_bridge_testing/bin
mkdir -p ~/local_bridge_testing/logs

Install Zombienet

Go to Zombienet Release page, copy the apropriate binary (zombienet-linux/zombienet-macos) from the latest release to ~/local_bridge_testing/bin, and rename it to zombienet.

Build polkadot binary

git clone https://github.com/paritytech/polkadot.git
cd polkadot
git checkout 5d8164fdda
cargo build --release
cp target/release/polkadot ~/local_bridge_testing/bin/polkadot

Build Statemine/Statemint binary

git clone https://github.com/paritytech/cumulus.git
cd cumulus
git checkout bridges-task-force/transact-experiments
cargo build --release --locked -p polkadot-parachain-bin
cp target/release/polkadot-parachain ~/local_bridge_testing/bin/polkadot-parachain-mint

Build BridgeHub Binary

git clone https://github.com/paritytech/cumulus.git
cd cumulus
git checkout bridges-task-force/ethereum-playground
cargo build --release --locked -p polkadot-parachain-bin
cp target/release/polkadot-parachain ~/local_bridge_testing/bin/polkadot-parachain

Build substrate-relay binary

git clone https://github.com/paritytech/parity-bridges-common.git
cd parity-bridges-common
git checkout 036e6696
cargo build --release -p substrate-relay
cp target/release/substrate-relay ~/local_bridge_testing/bin/substrate-relay

Create a symbolic link to cumulus local directory inside bridge-infra directory

NOTE: cumulus repository must be on bridges-task-force/ethereum-playground branch.

ln -s <path_to_cumulus_local_dir> cumulus

Run

In a separated terminal run Kusama side:

./scripts/kusama.sh

In a separated terminal run Polkadot side:

./scripts/polkadot.sh

In a separated terminal run relayer for Kusama <> Polkadot:

./scripts/relay.sh

Ethereum setup

Create a symbolic link to ethereum_xcm_builder local directory inside bridge-infra directory

ln -s <path_to_ethereum_xcm_builder> ethereum_xcm_builder

Python

Follow the instruction to install Python, venv & activate venv.

Install requirements

Remember to load venv for the project:

source venv/bin/activate

Install Python dependencies for the Ethereum -> Polkadot relayer:

pip3 install --upgrade pip
pip3 install -r requirements.txt

Run Ethereum -> Polkadot relayer

Remember to load venv for the project:

source venv/bin/activate

Run Python script for relayer:

python3 main.py

Check if everything works as expected following the instruction.

Play with it

Rococo side

Wococo side

About

This repository contains infrastructure for local development and testing for bridges

Resources

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published