Make sure you have all prerequisites set up.
Steps [1-8] are the same as in full-node.md
except:
-
Set
<node-type>
to"validator"
when using run_dcl_node -
Configure node specific parameters before running the node:
[
config.toml
][p2p] pex = false persistent_peers = "<node1-ID>@<node1-IP>:26656,..." # See the comment below on what values should be set here addr_book_strict = false [consensus] create_empty_blocks = false create_empty_blocks_interval = "600s" # 10 mins
[
app.toml
][state-sync] snapshot-interval = "snapshot-interval" snapshot-keep-recent = "snapshot-keep-recent"
-
persistent_peers
value:- If your VN doesn't use any Private Sentry nodes, then the
persistent_peers
field must point to other orgs' validator/sentry nodes with public IPs.
Fortestnet-2.0
ormain-net
thepersistent_peers
string can be get from the CSA slack channel. - If Private Sentry Nodes are used, then it must point to
Private Sentry
nodes with private IPs. - Use the following command to get
node-ID
of a node:./dcld tendermint show-node-id
.
- If your VN doesn't use any Private Sentry nodes, then the
./dcld keys add "<key-name>" 2>&1 | tee "<key-name>.dclkey.data"
- Remember generated
address
andpubkey
they will be used later. You can retrieveaddress
andpubkey
values anytime using./dcld keys show <name>
. Of course, only on the machine where the keypair was generated.
Notes: It's important to keep the generated data (especially a mnemonic that allows to recover a key) in a safe place
-
Get this node's tendermint validator address:
./dcld tendermint show-address
. Expected output format:cosmosvalcons1yrs697lxpwugy7h465wskwu2a5w9dgklx608f0
-
Get this node's tendermint validator pubkey:
./dcld tendermint show-validator
. Expected output format:cosmosvalconspub1zcjduepqcwg4eenpcxgs0269xuup5jlzj3pdquxlvj494cjxtqtcathsq7esfrsapa
-
Note that validator address and validator pubkey are not the same as
address
andpubkey
were used for account creation. -
Wait until the value of
catching_up
field gets tofalse
value. -
Add validator node:
dcld tx validator add-node --pubkey=<validator pubkey> --moniker=<node name> --from=<key name>
. If the transaction has been successfully written you would find"code": 0
in the output JSON.
-
Get the list of all nodes:
dcld query validator all-nodes
. The node must present in the list and has the following params:power:10
andjailed:false
. -
Get the node status:
dcld status --node tcp://<node_ip>:26657
. The value ofnode ip
matches to[rpc] laddr
field in$HOME/.dcl/config/config.toml
(TCP or UNIX socket address for the RPC server to listen on).
Make sure thatresult.sync_info.latest_block_height
is increasing over the time (once in about 10 mins). -
Get the list of nodes participating in the consensus for the last block:
dcld query tendermint-validator-set
.- You can pass the additional value to get the result for a specific height:
dcld query tendermint-validator-set 100
.
- You can pass the additional value to get the result for a specific height: