How to Set Up a Planetmint Network
You can setup or connect to a network once you have a single node running. Until now, everything could be done by a node operator, by themselves. Now the node operators, also called Members, must share some information with each other, so they can form a network.
There is one special Member who helps coordinate everyone: the Coordinator.
Member: Share hostname, pub_key.value and node_id
Each Planetmint node is identified by its:
hostname
, i.e. the node's DNS subdomain, such asbnode.example.com
, or its IP address, such as46.145.17.32
Tendermint
pub_key.value
Tendermint
node_id
The Tendermint pub_key.value
is stored in the file $HOME/.tendermint/config/priv_validator.json
. That file should look like:
To get your Tendermint node_id
, run the command:
An example node_id
is 9b989cd5ac65fec52652a457aed6f5fd200edc22
.
Share your hostname
, pub_key.value
and node_id
with all other Members.
Coordinator: Create & Share the genesis.json File
At this point the Coordinator should have received the data from all the Members, and should combine them in the file $HOME/.tendermint/config/genesis.json
:
Note: The above consensus_params
in the genesis.json
are default values.
The new genesis.json
file contains the data that describes the Network. The key name
is the Member's moniker; it can be any valid string, but put something human-readable like "Alice's Node Shop"
.
At this point, the Coordinator must share the new genesis.json
file with all Members.
Member: Connect to the Other Members
At this point the Member should have received the genesis.json
file.
The Member must copy the genesis.json
file into their local $HOME/.tendermint/config
directory. Every Member now shares the same chain_id
and genesis_time
(used to identify the Network), and the same list of validators
.
Each Member must edit their $HOME/.tendermint/config/config.toml
file and make the following changes:
Note: The list of persistent_peers
doesn't have to include all nodes in the network.
Member: Start Tarantool
You can start it using the command tarantool
.To run it in the background (so it will continue running after you logout), you can have to create a listener box.cfg{listen=3301}
.
Member: Start Planetmint and Tendermint Using Monit
Install Monit:
If you installed the planetmint
Python package as above, you should have the planetmint-monit-config
script in your PATH
now. Run the script to build a configuration file for Monit:
Run Monit as a daemon, instructing it to wake up every second to check on processes:
Monit will run the Planetmint and Tendermint processes and restart them when they crash. If the root planetmint_
process crashes, Monit will also restart the Tendermint process.
You can check the status by running monit status
or monit summary
.
By default, it will collect program logs into the ~/.planetmint-monit/logs
folder.
Check planetmint-monit-config -h
if you want to arrange a different folder for logs or some of the Monit internal artifacts.
How Others Can Access Your Node
Last updated