2019-02-01-pruning.md 3.54 KB
Newer Older
1 2 3
layout: post
title: Monero Adds Blockchain Pruning and Improves Transaction Efficiency
Justin Ehrenhofer's avatar
Justin Ehrenhofer committed
summary: Monero adds pruning and reduces range proof verification time with forthcoming upgrade
5 6 7 8
tags: [dev, core, crypto]
author: [Justin Ehrenhofer](https://twitter.com/JEhrenhofer)

Justin Ehrenhofer's avatar
Justin Ehrenhofer committed
To facilitate scalability, Monero recently added blockchain pruning to its daemon software. This feature allows users to optionally "prune" about 2/3 of the blockchain data, while still contributing to the network. There are several other efficiency upgrades in the upcoming 0.14 release.
10 11 12 13 14 15 16

### What is Pruning?

Pruning is the process of removing non-critical blockchain information from local storage. Full nodes keep an entire copy of everything that is stored on the blockchain, including data that is not very useful anymore. Pruned nodes remove much of this less relevant information to have a lighter footprint. Of course, running a full node is always better; however, pruned nodes have most of the important information and can still support the network.

For Bitcoin, many people discuss pruning in the context of intermediary transactions. For example, suppose Alice sends Bob 1 BTC, and then Bob sends this to Charlie. The blockchain would record records of transactions A -> B and B -> C. However, since Alice can no longer spend her funds, it's less important to retain this information. Therefore, nodes can prune this information with a relatively high level of safety. Other nodes on the network would step in if something malicious occurs.

This above example does not apply to Monero, since we do not know when money is spent. However, Monero nodes can prune a lot of other unnecessary information. This includes ring signature data that isn't essential to prevent double-spends. While the Monero blockchain can theoretically be pruned far further than this release enables, more testing is needed to push these limits.
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33

### Pruning Savings

Monero nodes can prune significant amounts of information while still contributing to the network. Pruned nodes successfully remove approximately 2/3 of the total blockchain. Monero's current blockchain is about 65GB. With this update, pruned nodes only need to store about 25GB of data.

Monero pruned nodes will only prune 7/8 of the pruneable transaction data. A random 1/8 of the data is maintained. This 1/8 will be used to sync with other nodes. Pruned nodes will also hold and share the most recent blocks.

Even though pruned nodes contribute to Monero's security and decentralization, they are still less comprehensive than full nodes. Users should still run full nodes whenever possible. However, pruned nodes are better than connecting to someone else's remote node. Pruned nodes therefore have the potential to run on devices that would otherwise be unable to handle the requirements, reducing the need to use remote nodes.

### Transaction Size and Verification Decrease

Monero developers have found new ways to further decrease transaction size and verification time since the 0.13 release. Transaction size will decrease by 56 bytes per output (about 5% for normal transactions). Fees will also drop by ~5%. Range proof verification time takes a massive 60% cut, mostly by folding multiexponentiation operations. Range proofs are a large component of Monero transactions. The below image shows the relative changes compared to other Monero versions.

<img src="/blog/assets/pruning/pruning.JPG" style="width: 800px;"/>

Of course, these improvements are only small parts of the full 0.13 release notes. Follow Monero's development and stay tuned for future upgrades!