Merge commit 'e5bed7ac380b6adb54b60a2a72a2a8f07f50d6c1' as 'bridges'

This commit is contained in:
Hernando Castano
2021-04-21 11:56:23 -04:00
339 changed files with 71658 additions and 0 deletions
@@ -0,0 +1,7 @@
#!/bin/bash
set -xeu
# This will allow us to run whichever binary the user wanted
# with arguments passed through `docker run`
# e.g `docker run -it rialto-bridge-node-dev --dev --tmp`
/home/user/$PROJECT $@
@@ -0,0 +1,24 @@
#!/bin/bash
#
# Run an instance of the Rococo -> Westend header sync.
#
# Right now this relies on local Westend and Rococo networks
# running (which include `pallet-bridge-grandpa` in their
# runtimes), but in the future it could use use public RPC nodes.
set -xeu
RUST_LOG=rpc=trace,bridge=trace ./target/debug/substrate-relay init-bridge RococoToWestend \
--source-host 127.0.0.1 \
--source-port 9955 \
--target-host 127.0.0.1 \
--target-port 9944 \
--target-signer //Eve
RUST_LOG=rpc=trace,bridge=trace ./target/debug/substrate-relay relay-headers RococoToWestend \
--source-host 127.0.0.1 \
--source-port 9955 \
--target-host 127.0.0.1 \
--target-port 9944 \
--target-signer //Bob \
--prometheus-host=0.0.0.0 \
@@ -0,0 +1,24 @@
#!/bin/bash
#
# Run an instance of the Westend -> Rococo header sync.
#
# Right now this relies on local Westend and Rococo networks
# running (which include `pallet-bridge-grandpa` in their
# runtimes), but in the future it could use use public RPC nodes.
set -xeu
RUST_LOG=rpc=trace,bridge=trace ./target/debug/substrate-relay init-bridge WestendToRococo \
--source-host 127.0.0.1 \
--source-port 9944 \
--target-host 127.0.0.1 \
--target-port 9955 \
--target-signer //Dave
RUST_LOG=rpc=trace,bridge=trace ./target/debug/substrate-relay relay-headers WestendToRococo \
--source-host 127.0.0.1 \
--source-port 9944 \
--target-host 127.0.0.1 \
--target-port 9955 \
--target-signer //Charlie \
--prometheus-host=0.0.0.0 \
@@ -0,0 +1,20 @@
#!/bin/bash
# A script for relaying Millau messages to the Rialto chain.
#
# Will not work unless both the Rialto and Millau are running (see `run-rialto-node.sh`
# and `run-millau-node.sh).
set -xeu
MILLAU_PORT="${MILLAU_PORT:-9945}"
RIALTO_PORT="${RIALTO_PORT:-9944}"
RUST_LOG=bridge=debug \
./target/debug/substrate-relay relay-messages MillauToRialto \
--lane 00000000 \
--source-host localhost \
--source-port $MILLAU_PORT \
--source-signer //Bob \
--target-host localhost \
--target-port $RIALTO_PORT \
--target-signer //Bob \
--prometheus-host=0.0.0.0
@@ -0,0 +1,20 @@
#!/bin/bash
# A script for relaying Rialto messages to the Millau chain.
#
# Will not work unless both the Rialto and Millau are running (see `run-rialto-node.sh`
# and `run-millau-node.sh).
set -xeu
MILLAU_PORT="${MILLAU_PORT:-9945}"
RIALTO_PORT="${RIALTO_PORT:-9944}"
RUST_LOG=bridge=debug \
./target/debug/substrate-relay relay-messages RialtoToMillau \
--lane 00000000 \
--source-host localhost \
--source-port $RIALTO_PORT \
--source-signer //Bob \
--target-host localhost \
--target-port $MILLAU_PORT \
--target-signer //Bob \
--prometheus-host=0.0.0.0
@@ -0,0 +1,27 @@
#!/bin/bash
# A script for relaying Millau headers to the Rialto chain.
#
# Will not work unless both the Rialto and Millau are running (see `run-rialto-node.sh`
# and `run-millau-node.sh).
MILLAU_PORT="${MILLAU_PORT:-9945}"
RIALTO_PORT="${RIALTO_PORT:-9944}"
RUST_LOG=bridge=debug \
./target/debug/substrate-relay init-bridge MillauToRialto \
--source-host localhost \
--source-port $MILLAU_PORT \
--target-host localhost \
--target-port $RIALTO_PORT \
--target-signer //Alice \
sleep 5
RUST_LOG=bridge=debug \
./target/debug/substrate-relay relay-headers MillauToRialto \
--source-host localhost \
--source-port $MILLAU_PORT \
--target-host localhost \
--target-port $RIALTO_PORT \
--target-signer //Alice \
--prometheus-host=0.0.0.0
@@ -0,0 +1,27 @@
#!/bin/bash
# A script for relaying Rialto headers to the Millau chain.
#
# Will not work unless both the Rialto and Millau are running (see `run-rialto-node.sh`
# and `run-millau-node.sh).
MILLAU_PORT="${MILLAU_PORT:-9945}"
RIALTO_PORT="${RIALTO_PORT:-9944}"
RUST_LOG=bridge=debug \
./target/debug/substrate-relay init-bridge RialtoToMillau \
--target-host localhost \
--target-port $MILLAU_PORT \
--source-host localhost \
--source-port $RIALTO_PORT \
--target-signer //Alice \
sleep 5
RUST_LOG=bridge=debug \
./target/debug/substrate-relay relay-headers RialtoToMillau \
--target-host localhost \
--target-port $MILLAU_PORT \
--source-host localhost \
--source-port $RIALTO_PORT \
--target-signer //Alice \
--prometheus-host=0.0.0.0
@@ -0,0 +1,11 @@
#!/bin/bash
# Run a development instance of the Millau Substrate bridge node.
# To override the default port just export MILLAU_PORT=9945
MILLAU_PORT="${MILLAU_PORT:-9945}"
RUST_LOG=runtime=trace \
./target/debug/millau-bridge-node --dev --tmp \
--rpc-cors=all --unsafe-rpc-external --unsafe-ws-external \
--port 33044 --rpc-port 9934 --ws-port $MILLAU_PORT \
@@ -0,0 +1,11 @@
#!/bin/bash
# Run a development instance of the Rialto Substrate bridge node.
# To override the default port just export RIALTO_PORT=9944
RIALTO_PORT="${RIALTO_PORT:-9944}"
RUST_LOG=runtime=trace \
./target/debug/rialto-bridge-node --dev --tmp \
--rpc-cors=all --unsafe-rpc-external --unsafe-ws-external \
--port 33033 --rpc-port 9933 --ws-port $RIALTO_PORT \
@@ -0,0 +1,14 @@
#!/bin/bash
# Run a development instance of the Rococo Substrate bridge node.
# To override the default port just export ROCOCO_PORT=9966
#
# Note: This script will not work out of the box with the bridges
# repo since it relies on a Polkadot binary.
ROCOCO_BOB_PORT="${ROCOCO_BOB_PORT:-9966}"
RUST_LOG=runtime=trace,runtime::bridge=trace \
./target/debug/polkadot --chain=rococo-local --bob --tmp \
--rpc-cors=all --unsafe-rpc-external --unsafe-ws-external \
--port 33055 --rpc-port 9935 --ws-port $ROCOCO_BOB_PORT \
@@ -0,0 +1,14 @@
#!/bin/bash
# Run a development instance of the Rococo Substrate bridge node.
# To override the default port just export ROCOCO_PORT=9955
#
# Note: This script will not work out of the box with the bridges
# repo since it relies on a Polkadot binary.
ROCOCO_PORT="${ROCOCO_PORT:-9955}"
RUST_LOG=runtime=trace,runtime::bridge=trace \
./target/debug/polkadot --chain=rococo-local --alice --tmp \
--rpc-cors=all --unsafe-rpc-external --unsafe-ws-external \
--port 33044 --rpc-port 9934 --ws-port $ROCOCO_PORT \
@@ -0,0 +1,14 @@
#!/bin/bash
# Run a development instance of the Westend Substrate bridge node.
# To override the default port just export WESTEND_PORT=9945
#
# Note: This script will not work out of the box with the bridges
# repo since it relies on a Polkadot binary.
WESTEND_PORT="${WESTEND_PORT:-9944}"
RUST_LOG=runtime=trace,runtime::bridge=trace \
./target/debug/polkadot --chain=westend-dev --alice --tmp \
--rpc-cors=all --unsafe-rpc-external --unsafe-ws-external \
--port 33033 --rpc-port 9933 --ws-port $WESTEND_PORT \