Stabilise your node

Avoid missing blocks and getting jailed

If your node is frequently missing blocks and seems not to be stable. There's a couple of things you can do to improve the situation.

You can check your validator's uptime at https://explorer.nodestake.org/dhealth/uptime

1. Setting up pruning strategy

According to Running a full node's Overview page, you can change your node's pruning value to decrease the memory and storage pressure.

Modify ~/.dhealth/config/app.toml (mainnet) or ~/.dhealth-testnet/config/app.toml (testnet):

# default: the last 362880 states are kept, pruning at 10 block intervals
# nothing: all historic states will be saved, nothing will be deleted (i.e. archiving node)
# everything: 2 latest states will be kept; pruning at 10 block intervals.
# custom: allow pruning options to be manually specified through 'pruning-keep-recent', and 'pruning-interval'
pruning = "everything"

Restart your node, the change should be applied immediately.

2. Cleaning memory periodically

You can also clear RAM Memory Cache (or page cache) which has been stacked up during your node's operation. A one liner command is:

sudo sh -c "sync; echo 1 > /proc/sys/vm/drop_caches"

You can also create a cronjob to run this command once everyday to ensure your host is always in the best condition:

crontab -e

0 0 * * * sudo sh -c "sync; echo 1 > /proc/sys/vm/drop_caches"