Configure the node
Initialize the nolusd home directory, fetch the pirin-1 genesis, add chain-registry seeds and live peers, then set gas price and pruning.
Configuration lives in the node's home directory, ~/.nolus by default, and
is split across two files. config/config.toml holds the CometBFT settings
for networking and consensus, while config/app.toml holds the application
settings such as the gas price, pruning and the API servers. To use another
location, pass --home <dir> to any nolusd command.
Initialize the home directory
Create the home directory with a name for your node and the mainnet chain id:
nolusd init <moniker> --chain-id pirin-1Replace <moniker> with the name of your node. The command creates
~/.nolus/config with config.toml, app.toml, a placeholder
genesis.json, the node key in node_key.json and the consensus key in
priv_validator_key.json.
Use ASCII characters for the moniker, and keep in mind that it becomes
public if the node later becomes a validator. You can change it in the
moniker field of ~/.nolus/config/config.toml.
Fetch the genesis file
Download the mainnet genesis file over the placeholder and check its chain id:
curl -L https://raw.githubusercontent.com/nolus-protocol/nolus-networks/main/mainnet/pirin-1/genesis.json \
-o ~/.nolus/config/genesis.json
jq -r .chain_id ~/.nolus/config/genesis.json # pirin-1The last command prints pirin-1 when the right file is in place.
Add seeds and peers
A new node needs at least one seed or peer to find the network. The public
seed nodes for pirin-1 are listed in the Cosmos
chain registry,
which names seeds.polkachu.com:19756, seeds.lavenderfive.com:11956,
seed.publicnode.com:26656, nolus-mainnet-seed.autostake.com:27016 and
nolus.rpc.kjnodes.com:14359. The following commands read them with their
node ids straight from the registry and write them into config.toml:
SEEDS=$(curl -s https://raw.githubusercontent.com/cosmos/chain-registry/master/nolus/chain.json \
| jq -r '[.peers.seeds[] | .id + "@" + .address] | join(",")')
sed -i -e "s|^seeds *=.*|seeds = \"$SEEDS\"|" ~/.nolus/config/config.tomlLive peers are optional, although adding a few as persistent peers speeds up the first connection. Polkachu publishes the peers that are online right now, and the following commands set them as persistent peers:
PEERS=$(curl -s https://polkachu.com/api/v2/chains/nolus/live_peers \
| jq -r '.live_peers | join(",")')
sed -i -e "s|^persistent_peers *=.*|persistent_peers = \"$PEERS\"|" ~/.nolus/config/config.tomlEach peer entry has the form <node-id>@<host>:<port>.
Set the minimum gas price
The minimum-gas-prices setting in ~/.nolus/config/app.toml is the lowest
fee per unit of gas that your node accepts into its mempool, and nolusd init
writes the following value:
minimum-gas-prices = "0.0025unls"Because wallets and the chain registry use 0.025unls, either value works
for transactions that wallets create.
Transaction fees go to the protocol and none of them stay with validators, as Fees and rewards explains.
Choose a pruning mode
Pruning decides how much historical state the node keeps, and the pruning
setting in app.toml takes one of four values:
| Value | Keeps | Use it for |
|---|---|---|
default | The last 362,880 states, pruned every 10 blocks | Most full nodes and validators |
everything | The 2 latest states | Smallest disk footprint |
nothing | All states | Archive nodes |
custom | What you set in pruning-keep-recent and pruning-interval | Tuned setups |
Nolus produces a block about every 2.2 seconds, so default keeps roughly
nine days of state.
Recommended settings on start
Every time nolusd start runs, nolusd writes the following recommended
values into config.toml and app.toml before the node starts:
| File | Setting | Value |
|---|---|---|
config.toml | consensus.timeout_commit | 1.5s |
config.toml | consensus.timeout_propose | 2s |
config.toml | consensus.peer_gossip_sleep_duration | 50ms |
config.toml | p2p.flush_throttle_timeout | 80ms |
app.toml | wasm.query_gas_limit | 5000000 |
Any edit you make to these keys is overwritten on the next start, so if you
want to keep your own values, start the node with --reject-config-defaults.
Once the node is configured, restore it from a snapshot, and then either set up Cosmovisor or run the node.
Install nolusd
Download the nolusd v0.8.6 release binary for Nolus mainnet, verify its sha256 checksum, install it on your PATH and confirm the version.
Restore from a snapshot
Restore a Nolus node from the weekly pruned pirin-1 snapshot or a community provider's snapshot instead of replaying the chain from genesis.