From 2681ee95cf9a6d69374b4bfa3d5b111ae4c4f7bc Mon Sep 17 00:00:00 2001 From: Hernando Castano Date: Fri, 6 Nov 2020 11:29:17 -0500 Subject: [PATCH] Rework Compose Setup for Millau Deployment (#464) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Rename `rialto` deployment to `eth-sub-bridge` * Add base Compose configs for Rialto and Eth-PoA nodes * Add new compose file for eth-sub deployment * Rename bridge-nodes to rialto-nodes * Update bootnode entries for Rialto nodes * Remove new compose file since it was used for quick test * Rename bridge nodes in entrypoint scripts * Remove all nodes from Eth-Sub Compose file The nodes should be getting pulled in from the new compose files. * Remove TODO comment * Rename nodes to networks Reflects the fact that a set of nodes makes up a network. * Add Compose file for Millau network nodes * Enable logging for all Millau nodes * Delete Rialto reserved peers file * Rename `bridge-config` to `scripts` * Add Compose file for Rialto-Millau bridge * Move bridge deployments into `bridges` folder * Drop `bridges` prefix from bridge deployments * Rename folder that had scripts for working with binaries * Move proxy configuration to common top level folder * Make a top level `monitoring` folder * Start updating deployment README * More updates in the README * Remove usage of Git overrides * Remove scripts to run Eth<->Sub I don't think these are used anymore * Remove Github Docker build instructions from main README * Add note about monitoring * Update Millau state root * Add script for running and updating Compose deployments * Remove old update script * Explain usage of `run` script * Update Millau state_root again * Remove repeated Prom image from Rialto-Millau bridge * Quick fix to stop containers in `run` script * Pin GrafanaMatrix Dockerfile to old commit The latest master has some changes in how the application is run. We don't want to update just yet so we're pinning to an old commit. * Make Compose files use a project directory The main consequence of this change is that all paths have to be specified from the root of the `deployments` folder. However, this makes it so that we can reuse components in different deployments, like the GranfaMatrix Dockerfile which is shared by all bridges. * Use `project-directory` when stopping and updating network If we don't use the full Compose command which includes `project-directory` not all the containers get cleaned up correctly. * Update path in Bridge Dockerfile * Correctly ignore `target` folders in Docker builds * Wait for Rialto nodes before running relay * Make `run` script a little less sketchy * Clean up deployment README * Remove stray line * Have run script automatically change into correct directory * Use PoA-to-Rialto instead of Eth-to-Sub in names * Rename `eth-poa-sub` bridge deployment to `poa-rialto` * Use /entrypoints volume for entrypoint scripts * Be more consistent with relay service names * Remove `docker-compose` prefix from network Compose files * Add comment explaning Grafana Matrix commit * Fix wording in README Co-authored-by: Tomasz Drwięga * Cleanup unused line in README * Add link to Slava's test scripts * Remove uneccessary piping when `cd`-ing in `run.sh` Co-authored-by: Tomasz Drwięga --- bridges/README.md | 34 ------------------------ bridges/bin/rialto/runtime/src/millau.rs | 2 +- 2 files changed, 1 insertion(+), 35 deletions(-) diff --git a/bridges/README.md b/bridges/README.md index 744056faa1350..8c086d0b6df1b 100644 --- a/bridges/README.md +++ b/bridges/README.md @@ -233,40 +233,6 @@ docker run -it bridge-node-dev --dev --tmp Notice that the `docker run` command will accept all the normal Substrate flags. For local development you should at minimum run with the `--dev` flag or else no blocks will be produced. -### GitHub Docker Build -If you don't want to run using the local source files you can also use images which pull the latest -`master`, or some other commit or branch of your choosing (configured with the `BRIDGE_HASH` build -argument). - -These images live in the [Rialto deployments](./deployments/rialto) folder. - -```bash -docker build \ - https://raw.githubusercontent.com/paritytech/parity-bridges-common/master/deployments/rialto/Bridge.Dockerfile \ - -t poa-relay -docker run -it poa-relay -``` - -By default the relayer is configured to connect to OpenEthereum `--dev` chain node and Substrate -`rialto-bridge-node` running in `--dev` mode. - -To build the `rialto-bridge-node`: -```bash -docker build \ - https://raw.githubusercontent.com/paritytech/parity-bridges-common/master/deployments/rialto/Bridge.Dockerfile \ - -t rialto-bridge-node \ - --build-arg PROJECT=rialto-bridge-node -docker run -it rialto-bridge-node --dev -``` - -And to build `OpenEthereum` with bridge support: -```bash -docker build \ - https://raw.githubusercontent.com/paritytech/parity-bridges-common/master/deployments/rialto/OpenEthereum.Dockerfile - -t openethereum -docker run -it openethereum -``` - ### Full Network Docker Setup See [Deployments README](./deployments/README.md) to learn more about how to run a more sophisticated test network using `docker-compose` setup. diff --git a/bridges/bin/rialto/runtime/src/millau.rs b/bridges/bin/rialto/runtime/src/millau.rs index 8da062ec59b20..d49ed9856df24 100644 --- a/bridges/bin/rialto/runtime/src/millau.rs +++ b/bridges/bin/rialto/runtime/src/millau.rs @@ -48,7 +48,7 @@ pub fn initial_header() -> Header { Header { parent_hash: Default::default(), number: Default::default(), - state_root: hex!("dc7567715330c666eca349a4612e82ec3b3c4f306ef941dce192a37fb3131cfa").into(), + state_root: hex!("0f2ca6dde08378ef81958bf087a3c40391079d0dbf434ea3fa0f73d54200839b").into(), extrinsics_root: hex!("03170a2e7597b7b7e3d84c05391d139a62b157e78786d8c082f29dcf4c111314").into(), digest: Default::default(), }