Here is an article about reclaiming disk space on a Bitcoin Core full node:
Recovering Local Disk on a Bitcoin Core Full Node
As a full node operator, maintaining the health of your Bitcoin Core full node can be a significant task. One of the biggest challenges is consuming disk space, which can lead to slower performance and increased power consumption. In this article, we will explore several strategies for reclaiming disk space on a Bitcoin Core full node.
Current State
Before we dive into solutions, let’s take a look at the current situation. We have a couple of stacks: Bitcoin Core + Fulcrum full node. As you mentioned, we are using txindex as a pruning node because of Fulcrum, which means that disk space is not being used for its intended purpose.
Problem
Using txindex can consume a lot of disk space, especially if it is not properly optimized. The default txindex configuration often results in a large index file that can take up a large portion of our disk. This can lead to slower performance, slower node synchronization, and increased power consumption due to constant disk I/O operations.
Workarounds
Fortunately, there are several ways to reclaim disk space on a Bitcoin Core full node:
Optimizing the txindex configuration
One of the most effective ways to reduce txindex usage is to optimize its configuration. This involves determining optimal values for the following parameters:
txindex.target
: Set this parameter to a lower value, e.g. This will allow the pruning node to prune nodes more aggressively.
txindex.max_index_files
: Increase this limit to ensure that the index file size does not become too large.
txindex.sweep_interval_ms
: Reduce this interval to reduce the frequency of pruning.
Use a custom pruning node
If you don't want to rely on txindex, you can use your own pruning node. This involves setting up a separate node that performs the same function as txindex, but with some optimizations. You can then use this new node as a pruning node and set its "txindex.target" parameter accordingly.
Disable pruning
If none of the above solutions help, you may need to disable pruning entirely. This will require setting "prune_node=off" in the bitcoin core configuration file ("~/.bitcoin/bitcoin.conf"). However, keep in mind that this can slow down node synchronization and increase power consumption.
Use a different index file format
Another solution is to use a different index file format that is more efficient than the default json or index.bin format used by txindex. For example, you could try using a newer format such as "kvdb_index" or "kvdb_1.2". This may require some experimentation and configuration adjustments.
Clean up index files regularly
To maintain optimal performance and reduce disk space usage, it is very important to regularly clean up index files that are no longer needed. You can use tools like bitcoin-cli or a dedicated indexing tool to regularly remove old index files.
Conclusion
Reclaiming disk space on a Bitcoin Core full node requires some experimentation and tweaking of configuration settings. By optimizing txindex settings, using custom pruning nodes, disabling pruning, trying alternative index file formats, and cleaning index files regularly, you can improve node performance and reduce power consumption. Be sure to always monitor your node performance and adjust these solutions accordingly.
Additional Resources
If you want to read more, I recommend checking out these resources:
- [Bitcoin Core Documentation on txindex](
- [Fulcrum Documentation on Pruning Nodes](