Bitcoin: Reclaim disk space in Bitcoin Core full node

Home > Bitcoin: Reclaim disk space in Bitcoin Core full node

Reclaiming Disk Space on a Bitcoin Core Full Node with Fulcrum

As the Bitcoin user base grows, disk space management becomes increasingly important. In this article, we will learn how to reclaim disk space on a Bitcoin Core full node running on a system with Fulcrum installed.

Context

Bitcoin Core is a popular and widely used full node implementation for Bitcoin. It is responsible for storing and updating the Bitcoin blockchain, as well as managing transactions. Unfortunately, due to its resource-intensive nature, Bitcoin Core nodes often consume significant amounts of disk space.

The current disk size for all Bitcoin Core nodes in our system is 644 GiB. This can lead to performance issues and increased storage costs over time.

Fulcrum and Transaction Indexing

One of the key factors contributing to high disk usage is transaction indexing using Fulcrum, a node-specific implementation that allows for faster and more efficient block discovery. By default, Fulcrum uses the transaction index (txindex) as a pruning mechanism, which can help reduce memory usage by storing only relevant transactions.

Pruning Node

As you discovered, the current system setup includes txindex, but it is not a pruning node. This means that all transactions are stored on disk, even if they are not currently used or referenced in the blockchain. While this may seem convenient, it actually contributes to high disk usage and slows down the network.

Reclaiming Disk Space

To reclaim disk space on your Bitcoin Core full node with Fulcrum, follow these steps:

  • Disable txindex: Set the txindex configuration option to false in the node configuration file (e.g. /etc/bitcoin.conf). This will prevent the use of the transaction index and reduce memory usage.

`blow

/etc/bitcoin.conf

txindex = false


  • Increase RAM: Allocate more memory to your system by adding it to the
    RESOLVED Memoryconfiguration option in the node configuration file (e.g./etc/bitcoin.conf). For example:

hit


/etc/bitcoin.conf

RESOLVED Memory = 1024 MB

  • Use Faster Disk Storage - Consider upgrading your system's hard drive or SSD to improve overall performance and reduce disk usage.
  • Monitor and Tune - Monitor the node's disk usage and adjust its settings as needed to ensure optimal performance.

Additional Tips

  • Make sure you are using a recent version of Bitcoin Core that supports Fulcrum, such as 1.19.x or later.
  • If you have enabled the transaction index in the past but want to disable it, you can do so by setting txindextofalse` and then restarting the node.

Conclusion

If you follow these steps, you should be able to reclaim disk space on your full Bitcoin Core node with Fulcrum. Remember to periodically monitor node performance and adjust its settings if necessary to ensure optimal operation.

More Posts

Share:

Send Us A Message