Skip to content

Disk usage optimization

Customize configuration settings to reduce disk requirements for validator nodes.

Blockchain databases tend to grow over time, depending on things like block speed and transaction amounts. For Daodst we're talking close to 100GB of disk usage for the first two weeks.

Few configurations can significantly reduce the required disk usage. Some of these changes will not fully take effect until you configure and sync from using them.

index

If you don't need to query transactions from a specific node, you can disable the index. Set it in config.toml

indexer = "null"

If you do this on a node that is already synced, the collected indexes will not be cleared automatically, you will need to delete them manually. The index is located under the database directory named data/tx_index.db/.

State synchronization snapshot

I believe this is disabled by default on Daodst, but will be listed here anyway. In app.toml set

snapshot-interval = 0

Note that if state sync is enabled on the network and working properly, it will allow one to sync a new node in a matter of minutes. But this node will not have history.

Configure pruning

By default, every 500 states are kept, and the last 100 states are kept. In the long run, this consumes a lot of disk space, which can be optimized with the following custom configuration:

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

index

If you don't need to query transactions from a specific node, you can disable the index. Set it in config.toml

indexer = "null"

If you do this on a node that is already synced, the collected indexes will not be cleared automatically, you will need to delete them manually. The index is located under the database directory named data/tx_index.db/.

State synchronization snapshot

I believe this is disabled by default on Daodst, but will be listed here anyway. In app.toml set

snapshot-interval = 0

Note that if state sync is enabled on the network and working properly, it will allow one to sync a new node in a matter of minutes. But this node will not have history.

Configure pruning

By default, every 500 states are kept, and the last 100 states are kept. In the long run, this consumes a lot of disk space, which can be optimized with the following custom configuration:

5.3G    ./state.db
70G     ./application.db
20K     ./snapshots/metadata.db
24K     ./snapshots
9.0G    ./blockstore.db
20K     ./evidence.db
1018M   ./cs.wal
4.7G    ./tx_index.db
90G     .

This optimized configuration has reduced disk usage to 17 GB.

17G     .
1.1G    ./cs.wal
946M    ./application.db
20K     ./evidence.db
9.1G    ./blockstore.db
24K     ./snapshots
20K     ./snapshots/metadata.db
5.3G    ./state.db