Skip to content

Latest commit

 

History

History
89 lines (61 loc) · 3.43 KB

File metadata and controls

89 lines (61 loc) · 3.43 KB

Running a Validator Node manually

Prerequisites

Make sure you have all prerequisites set up.

Deployment steps

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.
      For testnet-2.0 or main-net the persistent_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.

10. Create keys for a node admin and a trustee (optional) accounts

./dcld keys add "<key-name>" 2>&1 | tee "<key-name>.dclkey.data"
  • Remember generated address and pubkey they will be used later. You can retrieve address and pubkey 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

11. Add validator node to the network

  • 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 and pubkey were used for account creation.

  • Wait until the value of catching_up field gets to false 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.

12. Check the node is running and participates in consensus

  • 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 and jailed:false.

  • Get the node status: dcld status --node tcp://<node_ip>:26657. The value of node 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 that result.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.