Reclaiming Disk Space in Bitcoin Core Full Node with Fulcrum

As the user base of Bitcoin grows, managing disk space becomes increasingly important. In this article, we’ll explore how to reclaim disk space in a Bitcoin Core full node running on a system with Fulcrum installed.

Background

Bitcoin Core is a popular and widely-used full-node implementation for Bitcoin. It’s 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 on our system is 644 GiB. This can lead to performance issues and increased storage costs over time.

Fulcrum and Transaction Indexing

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

Pruning Node

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

Reclaiming Disk Space

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

  • Disable txindex: Set txindex configuration option to false in the node’s configuration file (e.g., /etc/bitcoin.conf). This will prevent transaction index from being used and reduce memory usage.






/etc/bitcoin.conf

txindex = false

  • Increase RAM

    : Allocate more memory for your system by adding it to the RESOLVED memory configuration option in the node’s configuration file (e.g., /etc/bitcoin.conf). For example:


/etc/bitcoin.conf

RESOLVED memory = 1024MiB

  • Use a faster disk storage: Consider upgrading your system’s hard drive or solid-state drive (SSD) to improve overall performance and reduce disk usage.

  • Monitor and adjust: Keep an eye on the node’s disk usage and adjust its configuration as needed to ensure optimal performance.

Additional Tips

  • Make sure you’re using a recent version of Bitcoin Core that supports Fulcrum, such as 1.19.x or later.

  • If you’ve enabled transaction index in the past but want to disable it, you can do so by setting txindex to false and then restart the node.

Conclusion

By following these steps, you should be able to reclaim disk space in your Bitcoin Core full node with Fulcrum. Remember to monitor the node’s performance regularly and adjust its configuration as needed to ensure optimal operation.

solana opening port