From bf6f14fc2acc8cc586fcb2b9857e2ac13e44c696 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tadej=20Jane=C5=BE?= Date: Fri, 18 Sep 2020 15:14:58 +0200 Subject: [PATCH] docs: Document oasis-node genesis CLI commands --- .changelog/3298.doc.md | 3 +++ docs/oasis-node/cli.md | 58 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+) create mode 100644 .changelog/3298.doc.md diff --git a/.changelog/3298.doc.md b/.changelog/3298.doc.md new file mode 100644 index 00000000000..171daaccab8 --- /dev/null +++ b/.changelog/3298.doc.md @@ -0,0 +1,3 @@ +Document [`oasis-node genesis` CLI commands] + +[`oasis-node genesis` CLI commands]: docs/oasis-node/cli.md#genesis diff --git a/docs/oasis-node/cli.md b/docs/oasis-node/cli.md index 4aa85aa5432..8f0154c3345 100644 --- a/docs/oasis-node/cli.md +++ b/docs/oasis-node/cli.md @@ -155,6 +155,64 @@ node): } ``` +## `genesis` + +### `check` + +To check if a given [genesis file] is valid, run: + +```sh +oasis-node genesis check --genesis.file /path/to/genesis.json +``` + +{% hint style="info" %} +This also checks if the genesis file is in the [canonical form]. +{% endhint %} + +### `dump` + +To dump the state of the network at a specific block height, e.g. 717600, to a +[genesis file], run: + +```sh +oasis-node genesis dump \ + --address unix:/path/to/node/internal.sock \ + --genesis.file /path/to/genesis_dump.json \ + --height 717600 +``` + +{% hint style="warning" %} +You must only run the following command after the given block height has been +reached on the network. +{% endhint %} + +### `init` + +To initialize a new [genesis file] with the given chain id and [staking token +symbol], run: + +```sh +oasis-node genesis init --genesis.file /path/to/genesis.json \ + --chain.id "name-of-my-network" \ + --staking.token_symbol TEST +``` + +{% hint style="info" %} +You can set a lot of parameters for the various [consensus layer services]. + +To see the full list, run: + +```sh +oasis-node genesis init --help +``` + +{% endhint %} + +[genesis file]: ../consensus/genesis.md#genesis-file +[canonical form]: ../consensus/genesis.md#canonical-form +[consensus layer services]: ../consensus/index.md +[staking token symbol]: ../consensus/staking.md#tokens-and-base-units + ## `stake` ### `account`