Developer Docs
  • Overview
  • Setup & Configuration
    • Run a Validator
    • Configuration
    • Disk Usage Optimization
    • State Sync
    • Mempool
    • Validator FAQ
  • Security Essentials
    • Security
    • Tendermint KMS
    • Validator Security Checklist
  • Upgrades Overview
    • Upgrades
    • List of Upgrades
    • Hard Fork Upgrades
    • Manual Upgrades
    • Rollback
  • BitNet Ops Handbook
    • Testnet
    • Mainnet
    • Run an IBC Relayer
Powered by GitBook
On this page
  1. Setup & Configuration

Disk Usage Optimization

Disk Usage Optimization for BitNet Validators

Running a validator node on BitNet requires careful disk usage planning, especially as the blockchain grows over time. This section provides configuration best practices to minimize disk consumption while maintaining validator stability.

Why Optimization Matters

Blockchains grow continuously due to block frequency, transaction volume, and state changes. Without optimization, validator nodes may require over 90 GB of disk space in just a few weeks. With the following settings, this can be reduced to under 20 GB.

Disable Transaction Indexing (Optional)

If your node does not need to query transactions, disable the transaction indexer:

In config.toml:

indexer = "null"

If the node was previously synced with indexing enabled, the existing index must be removed manually:

rm -rf ~/.bitnetd/data/tx_index.db/

Disable Snapshots (Optional for Disk Savings)

If you're not using state sync, you may disable automatic snapshot creation:

In app.toml:

snapshot-interval = 0

Disabling snapshots saves space but disables rapid state sync capabilities for new nodes.

Enable Custom Pruning

BitNet allows pruning of older blockchain states to reduce database bloat. Use the following recommended configuration:

In app.toml:

pruning = "custom"
pruning-keep-recent = "100"
pruning-keep-every = "0"
pruning-interval = "10"

Avoid setting pruning-keep-recent = "0" — this increases the risk of database corruption if the node crashes unexpectedly.

Reduce Log Verbosity

Logging at the default info level can produce excessive output. Once your validator is running smoothly, switch to a lower level to save disk and improve performance:

In config.toml:

log_level = "warn"

Also ensure that log rotation is enabled to prevent logs from consuming excessive disk space over time.

Example: Disk Usage Before and After Optimization

Default Configuration:

Total Usage: ~90 GB
- 70G ./application.db
- 9G  ./blockstore.db
- 5G  ./state.db

Optimized Configuration:

Total Usage: ~17 GB
- 9G  ./blockstore.db
- 5G  ./state.db
- 946M ./application.db
PreviousConfigurationNextState Sync

Last updated 5 days ago