document bootstrap process
Compare changes
Files
2- Hugo Trentesaux authored
+ 27
− 51
@@ -7,55 +7,26 @@ Launching a new live network is more difficult than spawning a local blockchain.
@@ -7,55 +7,26 @@ Launching a new live network is more difficult than spawning a local blockchain.
When launching a new network, you're likely to use a new runtime for the genesis. Our runtime tags use `xxyy` version numbers where `x` corresponds to major change and `y` hotfix or minor change.
1. Make sure to move any issue or merge request assigned to the choosen milestone `runtime-xxyy` to the next one. This prevents from forgetting unfinished work.
1. Check that the [CI on master](https://git.duniter.org/nodes/rust/duniter-v2s/-/pipelines?scope=all&page=1&ref=master) is passing. This is necessary to build the docker images.
At this point, you might want to merge this commit in master and publish the branch (TODO automate).
We choose [`xtask`](https://github.com/matklad/cargo-xtask/) to run Rust scripts using `cargo`. To build these scripts, just run:
To interact with GitLab, the `release_runtime` script uses the environment variable `GITLAB_TOKEN` which must contain a token with write permission on the repository. Go to your [personal access token preferences](https://git.duniter.org/-/profile/personal_access_tokens) to generate one and `export` it (you might want to add it to your `.bashrc`). You can then run this command:
This command does the following things (use your system monitor to track de progress as it produces not log):
1. download the [`paritytech/srtool`](https://docs.substrate.io/reference/command-line-tools/srtool/) (Substrate Runtime TOOLbox) docker image (about 2 minutes with a good connection). It is a docker container enabling to build the Substrate WebAssembly runtime in a deterministic way (machine-independant).
1. build gdev runtime in release mode using `srtool` (about 5 minutes depending on your computing power). The target is put in the `runtime/gdev/target` folder (about 2GB).
@@ -67,7 +38,7 @@ currency type you have chosen.
@@ -67,7 +38,7 @@ currency type you have chosen.
@@ -114,41 +85,46 @@ This builds the specs using debug version of Duniter.
@@ -114,41 +85,46 @@ This builds the specs using debug version of Duniter.
You should rotate session keys for more secured keys (the one you used before are still in your bash history and your clipboard and could have been intercepted by an attacker). Update the raw chainspec json file with your new session keys.
cargo xtask inject-runtime-code --runtime runtime/gdev/target/srtool/release/wbuild/gdev-runtime/gdev_runtime.compact.compressed.wasm --raw-spec resources/gdev-raw.json