Expand description
This module defines the structures and methods for handling Utreexo proofs in the context of messaging in the bitcoin network.
Utreexo is a dynamic accumulator, used to represent the UTXO set in a succinct way. This allows for lightweight clients that still perform full-validation. The trade-off is that for every UTXO being spent, you need a proof showing that UTXO is part of the UTXO set.
This proof can be downloaded from the network, as long as you are connected to at least one utreexo archive node. You first download the actual block. Then you figure out which inputs you need – you may not need all of them, due to some of them being cached by your local client. Then you request them by sending a GetUtreexoProof message.
This message asks for one block hash, whether to include leaf data (the data associated with
a given UTXO), and two bitmaps: one for the proof hashes, and one for the leaf indices. These
bitmaps are used to indicate which inputs you want to include in the proof. You list the
inputs that were not created in the same block, in the same order they appear in block. If you
need it, you set the associated bit to true, otherwise you set it to false.
You’ll then receive a UtreexoProof message, which contains the block hash, the proof hashes, and the leaf data for UTXOs being spent. You can then use this data to validate the block, and update your local Utreexo forest.
Structs§
- Bitmap
- A Bitmap used to request proof elements in Utreexo proofs.
- GetUtreexo
Proof - Represents a Utreexo proof request, for a specific block.
- Utreexo
Proof - Represents a Utreexo proof for a specific block.
- Utreexo
Proof Mask - The
UtreexoProofMaskcan be used to specify which parts of the proof data to request.