Skip to main content
Version: mainnet (v0.77)

How to save disk space

Clean up and disable the CometBFT indexer

  • Suitable for: data node

  • Downtime required: up to 2 min

How to check if you really need it

To check if you need to clean the transactions index for CometBFT (formerly Tendermint), navigate to the COMETBFT_HOME/data and see how big are files there:

# cd COMETBFT_HOME/data

# du -sh ./*
du -sh ./*
59G ./blockstore.db
215M ./cs.wal
18K ./evidence.db
512 ./priv_validator_state.json
265M ./state.db
61G ./tx_index.db

In the above scenario, we could save about 61 GB of the storage on our server.

Cleanup instructions

  1. Stop the node: sudo systemctl stop vegavisor
  2. Open the CometBFT config (COMETBFT_HOME/config/config.toml) and disable the tx_indexer.indexer by setting it to null
[tx_index]
indexer = "null"
  1. Navigate to COMETBFT_HOME/data and rename tx_index.db to something else. This step allows you to easily recover if something goes wrong.
# cd COMETBFT_HOME/data

# mv tx_index.db tx_index.db.tmp
  1. Create the empty tx_index.db directory in the COMETBFT_HOME/data
# cd COMETBFT_HOME/data

# mkdir tx_index.db
  1. Start your node and make sure everything is fine
  2. Remove big directory created in the step 3.
# cd COMETBFT_HOME/data

# rm -r tx_index.db.tmp