Skip to content

Commit 65094af

Browse files
committed
improves markdown
Signed-off-by: Andrey Kononykhin <andkononykhin@gmail.com>
1 parent 26b3ad3 commit 65094af

File tree

1 file changed

+79
-64
lines changed

1 file changed

+79
-64
lines changed

docs/running-node.md

+79-64
Original file line numberDiff line numberDiff line change
@@ -5,142 +5,157 @@ This document describes in details how to configure different types of DCLedger
55
## Components
66

77
* Common release artifacts:
8-
* Binary artifacts (part of the release):
9-
* dcld: The binary used for running a node.
10-
* dclcli: The binary that allows users to interact with the network of nodes.
11-
* The service configuration file `dcld.service`
12-
(either part of the release or [deployment](https://github.com/zigbee-alliance/distributed-compliance-ledger/deployment) folder).
13-
* where to get:
14-
* The latest release can be found at [DCL Releases](https://github.com/zigbee-alliance/distributed-compliance-ledger/releases).
15-
* Additional generated data (for validators and observers):
16-
* Genesis transactions file: `genesis.json`
17-
* The list of alive peers: `persistent_peers.txt` with the following format: `<node id>@<node ip>,<node2 id>@<node2 ip>,...`.
18-
* where to get:
19-
* If you want to join an existing persistent network (such as Test Net), then look at the [Persistent Chains](../deployment/persistent_chains)
20-
folder for a list of available networks. Each subfolder there represents a `<chain-id>` and contains the genesis and persistent_peers files.
8+
* Binary artifacts (part of the release):
9+
* dcld: The binary used for running a node.
10+
* dclcli: The binary that allows users to interact with the network of nodes.
11+
* The service configuration file `dcld.service`
12+
(either part of the release or [deployment](../deployment) folder).
13+
* where to get:
14+
* The latest release can be found at [DCL Releases](https://github.com/zigbee-alliance/distributed-compliance-ledger/releases).
15+
* Additional generated data (for validators and observers):
16+
* Genesis transactions file: `genesis.json`
17+
* The list of alive peers: `persistent_peers.txt` with the following format: `<node id>@<ip:port>,<node2 id>@<ip:port>,...`.
18+
* where to get:
19+
* If you want to join an existing persistent network (such as Test Net), then look at the [Persistent Chains](../deployment/persistent_chains)
20+
folder for a list of available networks. Each subfolder there represents a `<chain-id>` and contains the genesis and persistent_peers files.
2121

2222
## Hardware requirements
2323

2424
Minimal:
25-
- 1GB RAM
26-
- 25GB of disk space
27-
- 1.4 GHz CPU
25+
26+
* 1GB RAM
27+
* 25GB of disk space
28+
* 1.4 GHz CPU
2829

2930
Recommended (for highload applications):
30-
- 2GB RAM
31-
- 100GB SSD
32-
- x64 2.0 GHz 2v CPU
31+
32+
* 2GB RAM
33+
* 100GB SSD
34+
* x64 2.0 GHz 2v CPU
3335

3436
## Operating System
3537

3638
Current delivery is compiled and tested under `Ubuntu 18.04.3 LTS` so we recommend using this distribution for now. In future, it will be possible to compile the application for a wide range of operating systems thanks to Go language.
3739

3840
Notes:
39-
* the deployment commands below will try to setup and run `dcld` systemd service on Ubuntu
40-
* that will require `sudo` for a user
41-
* in case non-Ubuntu system these steps will be scipped so you would need to take care about
41+
42+
* the deployment commands below will try to setup and run `dcld` systemd service on Ubuntu
43+
* that will require `sudo` for a user
44+
* in case non-Ubuntu system these steps will be scipped so you would need to take care about
4245

4346
## Deployment
4447

4548
Pre-requisites:
46-
1. `dcld` and `dclcli` binaries are located in `/usr/bin`
47-
2. (for systemd systems) `dcld.service` is available in the current directory
48-
3. (for validator and observer) `genesis.json` and `persistent_peers.txt` are available in the current directory
49+
50+
1. `dcld` and `dclcli` binaries are located in `/usr/bin`
51+
2. (for systemd systems) `dcld.service` is available in the current directory
52+
3. (for validator and observer) `genesis.json` and `persistent_peers.txt` are available in the current directory
4953

5054
### Genesis Validator Node
5155

5256
This part describes how to configure a genesis node - a starting point of any new network.
5357

5458
The following steps automates a set of instructions that you can find in [Running Genesis Node](running-genesis-node.md) document.
5559

56-
1. Choose the chain ID. Every network (for example, test-net, main-net, etc.)
57-
must have a unique chain ID.
60+
#### Choose the chain ID
61+
62+
Every network (for example, test-net, main-net, etc.) must have a unique chain ID.
63+
64+
#### Setup a node
5865

59-
2. run
66+
Run
6067

6168
```bash
6269
$ run_dcl_node -t genesis -c <chain-id> node0
6370
```
6471

6572
This command:
6673

67-
- generates a new key entry for a node admin account
68-
- generates `genesis.json` file with the following entries:
69-
- a genenesis account for the key entry above with `Trustee` and `NodeAdmin` roles
70-
- a genesis txn that makes the local node a validator
71-
- configures and starts the node
74+
* generates a new key entry for a node admin account
75+
* generates `genesis.json` file with the following entries:
76+
* a genenesis account for the key entry above with `Trustee` and `NodeAdmin` roles
77+
* a genesis txn that makes the local node a validator
78+
* configures and starts the node
7279

7380
Outputs:
7481

75-
- `*.dclkey.json` file in the current directory with node admint key data (address, public key, mnemonic)
76-
- standard output:
77-
- genesis file `$HOME/.dcld/config/genesis.json`
82+
* `*.dclkey.json` file in the current directory with node admint key data (address, public key, mnemonic)
83+
* standard output:
84+
* genesis file `$HOME/.dcld/config/genesis.json`
85+
86+
**Note**. Once more validator nodes are added it's important to update:
87+
88+
* `persistent_peers.txt` file by including the entries for every added initial node
89+
* update the `persistent_peers` field in `$HOME/.dcld/config/config.toml`
7890

7991
## Validator Node
8092

8193
This part describes how to configure a validator node and add it to the existing network.
8294

8395
The following steps automates a set of instructions that you can find in [Running Validator Node](running-validator-node.md) document
8496

85-
1. run
97+
#### Setup a node
98+
99+
Run
86100

87101
```bash
88102
$ run_dcl_node -c <chain-id> <node-name>
89103
```
90104

91105
This command:
92106

93-
- generates a new key entry for a node admin account
94-
- by default `<node_name>admin` key name is used
95-
- can be configured using `-k/--key-name` option
96-
- properly locates `genesis.json`
97-
- configures and starts the node
107+
* generates a new key entry for a node admin account
108+
* by default `<node_name>admin` key name is used
109+
* can be configured using `-k/--key-name` option
110+
* properly locates `genesis.json`
111+
* configures and starts the node
98112

99113
Outputs:
100114

101-
- `*.dclkey.json` file in the current directory with node admint key data (address, public key, mnemonic)
102-
- standard output:
103-
- node admin key data: `address` and `pubkey`
104-
- validator data: `address` and `pubkey`
115+
* `*.dclkey.json` file in the current directory with node admint key data (address, public key, mnemonic)
116+
* standard output:
117+
* node admin key data: `address` and `pubkey`
118+
* validator data: `address` and `pubkey`
105119

106-
2. Provide generated node admin key `address` and `pubkey` to any `Trustee`(s). So they may create
107-
an account with `NodeAdmin` role. And **wait** until:
120+
#### Ask for a ledger account
108121

109-
* Account is created
110-
* The node completed a catch-up:
111-
* `dclcli status --node <node ip>` returns `false` for `catching_up` field
122+
Provide generated node admin key `address` and `pubkey` to any `Trustee`(s). So they may create
123+
an account with `NodeAdmin` role. And **wait** until:
112124

113-
3. Make the node a validator:
125+
* Account is created
126+
* The node completed a catch-up:
127+
* `dclcli status --node <ip:port>` returns `false` for `catching_up` field
128+
129+
#### Make the node a validator
114130

115131
```bash
116132
$ dclcli tx validator add-node \
117133
--validator-address=<validator address> --validator-pubkey=<validator pubkey> \
118134
--name=<node name> --from=<key name>
119135
```
120136

121-
If the transaction has been successfully written you would find `"success": true` in the output JSON.
122-
137+
If the transaction has been successfully written you would find `"success": true` in the output JSON.
123138

124139
### Observer Node
125140

126141
This part describes how to configure an observer node and add it to the existing network.
127142

128143
The following command automates a set of instructions that you can find in [Running Observer Node](running-observer-node.md) document
129144

130-
So to launch an observer node you only need to run:
145+
Run
131146

132147
```bash
133148
$ run_dcl_node -t observer -c <chain-id> <node-name>
134149
```
135150

136151
## Deployment Verification
137152

138-
* Check the account:
139-
* `dclcli query auth account --address=<address>`
140-
* Check the node is running and participates in consensus:
141-
* `dclcli status --node <node ip>`
142-
* The value of `node ip` matches to `[rpc] laddr` field in `$HOME/.dcld/config/config.toml`
143-
* Make sure that `result.sync_info.latest_block_height` is increasing over the time (once in about 5 sec).
144-
* Get the list of nodes participating in the consensus for the last block:
145-
* `dclcli tendermint-validator-set`.
146-
* You can pass the additional value to get the result for a specific height: `dclcli tendermint-validator-set 100`.
153+
* Check the account:
154+
* `dclcli query auth account --address=<address>`
155+
* Check the node is running and participates in consensus:
156+
* `dclcli status --node <ip:port>`
157+
* The value of `<ip:port>` matches to `[rpc] laddr` field in `$HOME/.dcld/config/config.toml`
158+
* Make sure that `result.sync_info.latest_block_height` is increasing over the time (once in about 5 sec).
159+
* Get the list of nodes participating in the consensus for the last block:
160+
* `dclcli tendermint-validator-set`.
161+
* You can pass the additional value to get the result for a specific height: `dclcli tendermint-validator-set 100`.

0 commit comments

Comments
 (0)