From c287001c08782ca13d1763a53f14247140eee188 Mon Sep 17 00:00:00 2001 From: Vincent Geddes Date: Sun, 16 Jan 2022 18:20:02 +0200 Subject: [PATCH] Update READMEs (#564) --- ethereum/README.md | 9 +-- parachain/README.md | 15 +---- parachain/config-xcmp.json | 115 ------------------------------------- parachain/config.json | 51 ---------------- relayer/README.md | 1 + test/README.md | 31 ++++------ 6 files changed, 18 insertions(+), 204 deletions(-) delete mode 100644 parachain/config-xcmp.json delete mode 100644 parachain/config.json diff --git a/ethereum/README.md b/ethereum/README.md index 86561597e365e..b215784399cca 100644 --- a/ethereum/README.md +++ b/ethereum/README.md @@ -4,12 +4,9 @@ This directory contains smart contracts utilized by the Polkadot-Ethereum Bridge ## Development -Make sure you use a recent node version, e. g. with [nvm](https://github.com/nvm-sh/nvm#installing-and-updating): - -```bash -nvm install 14.16.1 -nvm use 14.16.1 -``` +Requirements: +* Node 14 LTS. See installation [instructions](https://www.digitalocean.com/community/tutorials/how-to-install-node-js-on-ubuntu-20-04#option-3-%E2%80%94-installing-node-using-the-node-version-manager). +* Yarn Install dependencies with yarn: diff --git a/parachain/README.md b/parachain/README.md index 3eced75d75a92..0c878daa2f3ec 100644 --- a/parachain/README.md +++ b/parachain/README.md @@ -25,8 +25,8 @@ Refer to the instructions at the To add context to the above instructions, the parachain is known to compile with the following versions of Rust: -- stable: 1.51.0 -- nightly: 1.53.0-nightly +- stable: 1.58 +- nightly: 1.60.0-nightly ### Build @@ -57,17 +57,6 @@ cargo build --release cd - ``` -Launch Polkadot and the parachain: - -```bash -cd - -polkadot-launch config.json -``` - -It will take about 1-2 minutes for the parachain to start producing blocks. - -The parachain will output logs to `200.log`. - ## Configuration Note: This section is not necessary for local development, as there are scripts to auto-configure the parachain. diff --git a/parachain/config-xcmp.json b/parachain/config-xcmp.json deleted file mode 100644 index d9469a3044cf8..0000000000000 --- a/parachain/config-xcmp.json +++ /dev/null @@ -1,115 +0,0 @@ -{ - "relaychain": { - "bin": "/tmp/polkadot/target/release/polkadot", - "chain": "rococo-local", - "nodes": [ - { - "name": "alice", - "wsPort": 9944, - "port": 30444 - }, - { - "name": "bob", - "wsPort": 9955, - "port": 30555 - }, - { - "name": "charlie", - "wsPort": 9966, - "port": 30666 - } - ] - }, - "parachains": [ - { - "id": "1000", - "nodes": [ - { - "wsPort": 11144, - "port": 31200, - "name": "alice", - "flags": [ - "-lruntime=debug", - "--rpc-port=8081", - "--rpc-cors=all", - "--ws-external", - "--rpc-external", - "--rpc-methods=Unsafe", - "--offchain-worker=Always", - "--enable-offchain-indexing=true", - "--execution=wasm", - "--", - "--execution=wasm" - ] - }, - { - "wsPort": 11155, - "port": 31201, - "name": "bob", - "flags": [ - "-lruntime=debug", - "--rpc-port=8082", - "--rpc-cors=all", - "--ws-external", - "--rpc-external", - "--rpc-methods=Unsafe", - "--enable-offchain-indexing=true", - "--execution=wasm", - "--", - "--execution=wasm" - ] - } - ] - }, - { - "id": "1001", - "nodes": [ - { - "wsPort": 11166, - "port": 31202, - "name": "alice", - "flags": [ - "-lruntime=debug", - "--rpc-port=8083", - "--rpc-cors=all", - "--ws-external", - "--rpc-external", - "--rpc-methods=Unsafe", - "--enable-offchain-indexing=true", - "--execution=wasm", - "--", - "--execution=wasm" - ] - }, - { - "wsPort": 11177, - "port": 31203, - "name": "bob", - "flags": [ - "-lruntime=debug", - "--rpc-port=8084", - "--rpc-cors=all", - "--ws-external", - "--rpc-external", - "--rpc-methods=Unsafe", - "--enable-offchain-indexing=true", - "--execution=wasm", - "--", - "--execution=wasm" - ] - } - ] - } - ], - "simpleParachains": [], - "hrmpChannels": [ - { - "sender": 1000, - "recipient": 1001, - "maxCapacity": 8, - "maxMessageSize": 512 - } - ], - "types": { - } -} diff --git a/parachain/config.json b/parachain/config.json deleted file mode 100644 index 6f725624c2aed..0000000000000 --- a/parachain/config.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "relaychain": { - "bin": "/tmp/polkadot/target/release/polkadot", - "chain": "rococo-local", - "nodes": [ - { - "name": "alice", - "wsPort": 9944, - "port": 30444, - "flags": [ - "--enable-offchain-indexing=true", - "--offchain-worker=Always" - ] - }, - { - "name": "bob", - "wsPort": 9955, - "port": 30555, - "flags": [ - "--enable-offchain-indexing=true", - "--offchain-worker=Always" - ] - } - ] - }, - "parachains": [ - { - "bin": "target/release/snowbridge", - "id": "200", - "nodes": [ - { - "wsPort": 9966, - "port": 30666, - "name": "alice", - "flags": [ - "-lruntime=debug", - "--rpc-cors=all", - "--offchain-worker=Always", - "--enable-offchain-indexing=true", - "--execution=native", - "--", - "--execution=wasm" - ] - } - ] - } - ], - "simpleParachains": [], - "hrmpChannels": [], - "types": {} -} diff --git a/relayer/README.md b/relayer/README.md index 6c1e092e686b2..d4da54765fa83 100644 --- a/relayer/README.md +++ b/relayer/README.md @@ -13,6 +13,7 @@ Relayer service that streams transactions from blockchain networks, packages dat This project requires the following tools for day to day development: +- [Golang](https://go.dev/) - [Mage](https://magefile.org/): Used for build tasks - [Revive](https://github.com/mgechev/revive): Used for linting instead of golint diff --git a/test/README.md b/test/README.md index 03fb1add7d73a..08bd22b0981bc 100644 --- a/test/README.md +++ b/test/README.md @@ -18,11 +18,10 @@ The E2E tests run against local deployments of the parachain, relayer and ganach (cd ../ethereum && yarn install) ``` -* Development environment for the relay services. See relayer [requirements](../relayer/README.md#development). -* `timeout` - native package on Ubuntu, on macOS try ```brew install coreutils``` +* Development environment for the relay services. See setup [instructions](../relayer/README.md#development). * `jq` - https://stedolan.github.io/jq/download/ * geth - https://geth.ethereum.org/docs/install-and-build/installing-geth -* sponge - Is available in the moreutils package. On Mac see https://formulae.brew.sh/formula/moreutils. On Linux: +* sponge - Is available in the `moreutils` package. ```bash apt install moreutils @@ -31,11 +30,17 @@ The E2E tests run against local deployments of the parachain, relayer and ganach * polkadot-launch ```bash -yarn global add polkadot-launch@1.9.0 + yarn global add polkadot-launch@1.9.0 ``` ## Setup +### Install NPM dependencies + +```bash +yarn install +``` + ### Polkadot * Clone the polkadot repository somewhere on your machine @@ -51,7 +56,7 @@ cargo build --release ### Configure testnet -Create an `.env` file with variables that point to the binary for polkadot +Create an `.env` file, and set the `POLKADOT_BIN` variable to the location of the polkadot binary built in the previous step. Example: ``` @@ -65,7 +70,7 @@ Run the following script scripts/start-services.sh ``` -Wait until the "System has been initialized" message +Wait until the "Testnet has been initialized" message Go to polkadot-js and wait until the parachain has started producing blocks: https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A11144#/explorer @@ -84,19 +89,7 @@ The `start-services.sh` script writes the following logs: ## E2E tests -### Setup - -Download dependencies: - -```bash -yarn install -``` - -You should now be good to go! - -## Run Tests - -### Integration Tests +Run the tests using the following command: ```bash yarn test