order | parent | ||||||
---|---|---|---|---|---|---|---|
1 |
|
The CometBFT configuration has three distinct parts:
- The network parameters in genesis.json.
- The nodeID in node_key.json.
- The configuration of the node and its services in config.toml.
Validator nodes also require a private/public key-pair to sign consensus messages.
If a Hardware Security Module (HSM) is not available, CometBFT stores an unencrypted key-pair on the file system in the priv_validator_key.json file and the state of the last block signed in priv_validator_state.json.
The CometBFT HOME folder contains all configuration (in the $HOME/config
folder) for CometBFT as well as all the databases (in the $HOME/data
folder)
used during execution.
Path to the folder is defined by these steps:
- The home folder for CometBFT is read from the
CMTHOME
environment variable. - If the variable is undefined, it is assumed the default
$HOME/.cometbft
. - The environment variable is overridden by the
--home
command-line parameter.
By default, all configuration files are stored under the $CMTHOME/config
directory.
These can be overridden individually for each file in the config.toml
file, for example to
override the genesis_file
location change it here.
By default, all databases are stored under the $CMTHOME/data
directory.
This can be overridden at the db_dir
parameter in the config.toml
file.