What is a pruned node?

7 min read

What is a pruned node basically, if you have pruning enabled, when your node has downloaded the data bloc and finish validating the blocks and transactions, it will delete the old data, since it’s not useful having them because it’s already been validate, and this will liberate some space in the disc, and helps because  an entire blockchain can  take a lot of space in your pc.

If you decide to run a node, you will need to have a lot of resources and need to be connected to the internet at all times, but if you pruned the node it could be in a cheaper device, such as a raspberry Pi.

Pruned nodes Why were they created?

Pruned nodes are the solution to save space in the disk and for people who want to help secure the network but aren’t willing to commit, or don’t have the resources to act as a full node.

This is the answer of the growing concern of the bitcoin blockchain. approximately 285.06 gigabytes it’s the size. And every 10 minutes, that size grows larger and larger, but not only bitcoin uses this, also Ethereum does itis another user of this pruned nodes because the large size of his block chain that actually it’s even bigger than bitcoin

This pruned node is fully functional and it does not compromise the verifiability of the node

How does a pruned node work?

Before a node can be pruned, they need to download the full transaction history up to day, after this the reduction in storage can begin.

They delete a little percentage of the older block data, there are four types of data: the raw blocks as received over the network (blk???.dat), the undo data (rev???.dat), the block index and the UTXO set (both LevelDB databases), but they keep the complete database of all UTXOs. This is what he needs to verify the new blocks and if the other data are too old could be deleted.

But, the mining pool owners on the other hand, may not want to use a pruned block, a fork in the line may cause some problems.

The companies providing a bitcoin service must stick to the full blockchain at all times, no matter what.

And there are the bitcoin nodes. Every bitcoin node, currently runs the bitcoin core client and stores the block chain in its entirety.

So, not all will would run a pruned node because the necessities they will have.

How can we create our own pruned node?

This is a feature that was originally introduced in Bitcoin Core 0.11. To enable a block pruning you need to use a command line:

-prune=N     where N is the number of MB to allot for raw block & undo data.

You could use ElectrumX, this is a reimplementation of the Electrum Server and is compatible with pruning. These are the two more recommended software’s, there is more but they are not recommended for pruning. It’s because there may be experimental builds or not finished yet.

Some common questions are: we need to download the full node for being able to prune the node, well, yes, if you are using the wallet for the first time, and syncing the node from scratch, you will have to download the whole blockchain. A full download won’t work for everybody because of the slow internet speeds and a monthly data cap.

Well, you got the speed, but not the storage, well when you activate the pruned, this is not a problem, it will automatically delete all the old data on the fly while the new blocks are being downloaded. So basically, it won’t occupy more of your disk space than you’ve specified.

Warning: do not download the block chain from torrents or one link full download. Also downloading the whole blockchain or a pruned blockchain from online sources is highly not recommended.

It is totally insecure so don’t download from untrusted sites. You could still find someone that you can trust.

Like get a copy of a blockchain from a trusty friend. But if you can’t find a friend or source, you could use bitcoin core or the ElectrumX.


Pruned nodes or full nodes Which is better?

Talking about security, a pruned node with at least 2 GB and a full node there is no major differences, both nodes are just as safe. There is a difference in the way they validate the transaction at any point of time of the blockchain.

We need to remember that a pruned node has a limited track record, meanwhile the full node has the full copy of the blockchain history, this however is not a problem because you can verify the information in another full node.

Where this could be a breaking point, a full node could be used as a starter point for another node, and if something really bad happens, this could be the life saver.

When you prune a block, you cannot go back to an unpruned state, you can only delete the pruned block and re-download the full block. If there is any problem that cause to use the command reindex like a disk corruption, this will cause a pruned node to re download the full blockchain

In the end, both nodes are a nice choice, but if u wish a node for personal use and don’t waste a lot of resources, a pruned node it will do the work, but if you have a lot of resources, you could use a  full node, go for it, not only u got an extremely safe and you will help the network to maintain its security and decentralization. The decision in having a pruned node or not remains in the resources you have.