The Pruning Protocol: Running High-Security Nodes on Low-Storage
12. The Pruning Protocol: Running High-Security Nodes on Low-Storage
Not everyone has a 1TB SSD. The Pruning Protocol (prune=N) is the feature that allows Bitcoin to remain decentralized even as the ledger grows to massive sizes. It allows you to run a full, high-security node while only using a few gigabytes of disk space. This chapter explains the mechanics of pruning and the trade-offs involved in "deleting the past."
How Pruning Works: The "Download and Discard" Model
A pruned node is NOT a "Light Wallet." It is a Full Node.
-
The node downloads Block #100.
-
It verifies every transaction in Block #100 against its
chainstate(UTXO set). -
Once verified, Block #100 is "Settled."
-
If the node is in pruning mode, it keeps the block for a few days. Once the disk limit is reached, it deletes the raw block data from the
blocks/folder. -
However, the "Knowledge" of the block remains in the
chainstatedatabase forever.
Configuring Pruning
You enable pruning in bitcoin.conf by specifying the target size in megabytes. The absolute minimum is 550MB (which stores about 2 days of history).
# Prune the blockchain to 10GB
# This is enough to keep a few days of history and allow for reorgs.
prune=10000
The Trade-offs: What You Lose
Pruning is a superpower, but it comes with specific limitations:
-
Serving Peers: You cannot help new users sync their nodes from scratch because you don't have the old blocks to give them.
-
Scanning Old Wallets: If you import a private key from 2015 into a pruned node, the node cannot "Scan" the blocks to find your balance. You would have to "Re-index" (which means downloading everything again).
-
No
txindex: You cannot usegetrawtransactionto look up an old transaction ID because the transaction data itself has been deleted.
Pruning and the Lightning Network
Most Lightning Network nodes (like LND, Core Lightning, or Eclair) are perfectly compatible with pruned nodes. The Lightning Network only needs to see the current state of the blockchain to monitor for "Channel Breaches." As long as your node is synced to the tip, your Lightning funds are safe.
The Philosophy of Pruning
Pruning is the key to Bitcoin's survival. It ensures that even if the blockchain grows to 100TB, a user with a cheap laptop and a 50GB hard drive can still verify their own transactions without trusting anyone else. It is the ultimate expression of the "Verify, Don't Trust" mantra, made accessible to everyone.
TeachMeBitcoin is an ad-free, open-source educational repository curated by a passionate team of Bitcoin researchers and educators for public benefit. If you found our articles helpful, please consider supporting our hosting and ongoing content updates with a clean donation: