From accdc454ec0925bcad839c44bc9d5b731543dafb Mon Sep 17 00:00:00 2001 From: Hernando Castano Date: Mon, 10 Aug 2020 17:54:43 -0400 Subject: [PATCH] Add instructions and scripts for local development (#280) * Add dev deployment profile with Ethereum PoA config * Add scripts for running local components * Use `openethereum` folder * Add local development instructions in README * Add note about clone location * Point to right folder for scripts * Add some missing back-ticks * Remove Bertha and Carlos as authorities * Fix a line length issue --- bridges/README.md | 48 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/bridges/README.md b/bridges/README.md index 3906389c51..d46332dacb 100644 --- a/bridges/README.md +++ b/bridges/README.md @@ -162,6 +162,54 @@ To run the Bridge you need to be able to connect the bridge relay node to the RP on each side of the bridge (home & foreign chain). An easy way to build all the required nodes is through Docker. +### Local Development Build + +#### Building + +First you'll need to build the bridge node and relay. This can be done as follows: + +```bash +# In `parity-bridges-common` folder +cargo build -p bridge-node +cargo build -p ethereum-poa-relay +``` + +Next you'll need to clone the following [fork of OpenEthereum](https://github.com/HCastano/parity-ethereum). +If you're doing development which only involves the Ethereum to Substrate side of the bridge you may +use the `master` branch. Otherwise you'll need to checkout the `substrate-builtins-stubs` branch. + +```bash +# Should be at the same level as `parity-bridges-common` folder +git clone https://github.com/HCastano/parity-ethereum.git openethereum +git fetch +git checkout substrate-builtins-stubs +``` + +If you've checked out the `substrate-builtins-stubs` branch make sure you've cloned the OpenEthereum +repo at the same level as `parity-bridges-common` since it references the repo. + +Next you'll need to build the Ethereum node: + +```bash +# In `openethereum` folder +cargo build +``` + +#### Running + +To run a simple dev network you'll can use the scripts located in +[the `scripts` folder](./scripts). Since the relay connects to both the Substrate and Ethereum +chains it must be run last. + +```bash +# In `parity-bridges-common` folder +./scripts/run-openethereum-node.sh +./scripts/run-bridge-node.sh +./scripts/run-eth2sub-relay.sh +``` +At this point you should see the relayer submitting blocks from the Ethereum chain +to the Substrate chain. + ### Local Docker Build If you want to make a Docker container using your local source files you can run the following command at the top level of the repository: