Skip to content

Commit 26b3ad3

Browse files
committed
review fixes
Signed-off-by: Andrey Kononykhin <andkononykhin@gmail.com>
1 parent 7986886 commit 26b3ad3

File tree

3 files changed

+19
-19
lines changed

3 files changed

+19
-19
lines changed

deployment/scripts/run_dcl_node

+5-8
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,10 @@ Options:
7171
-c, --chain-id chain id, default: '$DEF_CHAIN_ID'
7272
-h, --help print this help and exit
7373
-k, --key-name account key-name, default: '<node-name>admin'
74-
-p, --peer peer hostspec as 'HOST:PORT', default: first entry of 'persistent_peers.txt'
7574
-u, --user node service user, default: '$DEF_NODE_USER'
7675
-t, --type node type, one of 'genesis', 'validator', 'observer', default: '$DEF_NODE_TYPE'
7776
"
77+
#-p, --peer peer hostspec as 'HOST:PORT', default: first entry of 'persistent_peers.txt'
7878
# -v, --verbose be more verbose
7979
}
8080

@@ -264,6 +264,7 @@ function config_node {
264264
exit 1
265265
fi
266266

267+
# TODO move ot a separate script
267268
# Open '26656' (p2p) and '26657' (RPC) ports.
268269
sudo ufw allow 26656/tcp
269270
sudo ufw allow 26657/tcp
@@ -313,6 +314,7 @@ function verify_node {
313314
check1="$(dclcli status --node "$_node_ip" | grep latest_block_height)"
314315

315316
echo "sync_info.latest_block_height Try 2"
317+
# TODO it should depend on empty block creation setting value
316318
sleep 6
317319
check2="$(dclcli status --node "$_node_ip" | grep latest_block_height)"
318320

@@ -381,13 +383,8 @@ fi
381383

382384
echo "Configuring CLI"
383385

384-
if [[ "$NODE_TYPE" == "observer" ]]; then
385-
# FIXME is it right
386-
config_cli "$CHAIN_ID"
387-
else
388-
config_cli "$CHAIN_ID" "$PEER_ADDR:$CLI_PORT"
389-
fi
390-
386+
# Note. we consider that cli would connect to local node (default setting)
387+
config_cli "$CHAIN_ID"
391388

392389
if [[ "$NODE_TYPE" != "observer" ]]; then
393390
echo "Generating genesis account keys..."

deployment/scripts/verify_node

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ echo "sync_info.latest_block_height Try 1"
2828
check1="$(dclcli status --node "$NODE_IP" | grep latest_block_height)"
2929

3030
echo "sync_info.latest_block_height Try 2"
31+
# TODO it should depend on empty block creation setting value
3132
sleep 6
3233
check2="$(dclcli status --node "$NODE_IP" | grep latest_block_height)"
3334

docs/running-node.md

+13-11
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ This document describes in details how to configure different types of DCLedger
77
* Common release artifacts:
88
* Binary artifacts (part of the release):
99
* dcld: The binary used for running a node.
10-
* dclcli: The binary that allow users to interact with the network of nodes.
10+
* dclcli: The binary that allows users to interact with the network of nodes.
1111
* The service configuration file `dcld.service`
1212
(either part of the release or [deployment](https://github.com/zigbee-alliance/distributed-compliance-ledger/deployment) folder).
1313
* where to get:
@@ -38,7 +38,7 @@ Current delivery is compiled and tested under `Ubuntu 18.04.3 LTS` so we recomme
3838
Notes:
3939
* the deployment commands below will try to setup and run `dcld` systemd service on Ubuntu
4040
* that will require `sudo` for a user
41-
* in case non-Ubuntu system these steps will be scipped so you would need to take case about
41+
* in case non-Ubuntu system these steps will be scipped so you would need to take care about
4242

4343
## Deployment
4444

@@ -63,16 +63,18 @@ $ run_dcl_node -t genesis -c <chain-id> node0
6363
```
6464

6565
This command:
66-
- configures dclcli to communicate with the genesis node (the local one)
66+
6767
- generates a new key entry for a node admin account
6868
- generates `genesis.json` file with the following entries:
6969
- a genenesis account for the key entry above with `Trustee` and `NodeAdmin` roles
7070
- a genesis txn that makes the local node a validator
7171
- configures and starts the node
7272

7373
Outputs:
74-
- key data (address, public key, mnemonic) as `*.dclkey.json` file in the current directory
75-
- genesis file `$HOME/.dcld/config/genesis.json`
74+
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`
7678

7779
## Validator Node
7880

@@ -87,19 +89,19 @@ $ run_dcl_node -c <chain-id> <node-name>
8789
```
8890

8991
This command:
90-
- configures dclcli to communicate with the genesis node:
91-
- by default it will evaluate it from the `persisten_peers.txt` (using its first entry)
92-
- you can specify the peer explicitly using `-p/--peer`: `-p <node-id@host:port>` (port is usually considered as `26656` here)
92+
9393
- generates a new key entry for a node admin account
9494
- by default `<node_name>admin` key name is used
9595
- can be configured using `-k/--key-name` option
9696
- properly locates `genesis.json`
9797
- configures and starts the node
9898

9999
Outputs:
100-
- key data (address, public key, mnemonic) as `*.dclkey.json` file in the current directory
101-
- node admin key data: `address` and `pubkey`
102-
- validator data: `address` and `pubkey`
100+
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`
103105

104106
2. Provide generated node admin key `address` and `pubkey` to any `Trustee`(s). So they may create
105107
an account with `NodeAdmin` role. And **wait** until:

0 commit comments

Comments
 (0)