Tendermint: local cluster instruction

Tendermint GitHub post two methods to start the local cluster.

Single node, which used four cloud machine.
Docker compose, which require docker and docker-compose.

However, we can make it more simpler by just do a little change in Single node method.

  1. Create k-node network (default is 4-node network, in ./mytestnet)

    tendermint testnet

  2. Check peers ID

    tendermint show_node_id --home ./mytestnet/node0
    tendermint show_node_id --home ./mytestnet/node1
    tendermint show_node_id --home ./mytestnet/node2
    tendermint show_node_id --home ./mytestnet/node3
  1. Modify config.toml in each node directory
    For example node1, three port number have to be changed.
    (1) [rpc] laddr = "tcp://0.0.0.0:36657" and so on, node2 46657, node3 56657
    (2) [p2p] laddr = "tcp://0.0.0.0:36656" and so on, node2 46656, node3 56656
    (3) [p2p] persistent_peers, no change before@, change after @ to 127.0.0.1:26656, 127.0.0.1:36656, 127.0.0.1:46656, 127.0.0.1:56656

  2. Run each node

    tendermint node --home ./mytestnet/node0 --proxy_app=kvstore
    tendermint node --home ./mytestnet/node1 --proxy_app=kvstore
    tendermint node --home ./mytestnet/node2 --proxy_app=kvstore
    tendermint node --home ./mytestnet/node3 --proxy_app=kvstore