doc/pruning.md
Read this in other languages: Korean, 简体中文.
One of the principal attractions of Mimblewimble is its theoretical space efficiency. Indeed, a trusted or pre-validated full blockchain state only requires unspent transaction outputs, which could be tiny.
The grin blockchain includes the following types of data (we assume prior understanding of the Mimblewimble protocol):
Assuming a blockchain of a million blocks, 10 million transactions (2 inputs, 2.5 outputs average) and 100,000 unspent outputs, we get the following approximate sizes with a full chain (no pruning, no cut-through):
We note that out of all that data, once the chain has been fully validated, only the set of UTXO commitments is strictly required for a node to function.
There may be several contexts in which data can be pruned:
Pruning needs to remove as much data as possible while keeping all the guarantees of a full Mimblewimble-style validation. This is necessary to keep a pruning node state's sane, but also on first fast sync, where only the minimum amount of data is sent to a new node.
The full validation of the chain state requires that:
In addition, while not necessary to validate the full chain state, to be able to accept and validate new blocks additional data is required:
At minimum, this requires the following data:
Note that further pruning could be obtained by requiring the validation of only a subset of the range proofs, chosen randomly by the validating node.