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
:
If the node was previously synced with indexing enabled, the existing index must be removed manually:
Disable Snapshots (Optional for Disk Savings)
If you're not using state sync, you may disable automatic snapshot creation:
In app.toml
:
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
:
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
:
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:
Optimized Configuration:
Last updated