Utility structs to handle the 3 hashtrees (output, range proof, kernel) more conveniently and transactionally.
Allows the application of new blocks on top of the sum trees in a
reversible manner within a unit of work provided by the
An extension "pair" consisting of a txhashet extension (outputs, rangeproofs, kernels) and the associated header extension.
A header extension to allow the header MMR to extend beyond the other MMRs individually. This is to allow headers to be validated against the MMR before we have the full block data.
Convenience wrapper around a single prunable MMR backend.
Rewindable (but readonly) view of the kernel set (based on kernel MMR).
An easy to manipulate structure holding the 3 sum trees necessary to validate blocks and capturing the Output set, the range proofs and the kernels. Also handles the index of Commitments to positions in the output and range proof pmmr trees.
Readonly view of the UTXO set (based on output MMR).
Clean the txhashset folder
Starts a new unit of work to extend the chain with additional blocks, accepting a closure that will work within that unit of work. The closure has access to an Extension object that allows the addition of blocks to the txhashset and the checking of the current tree roots.
Starts a new unit of work to extend (or rewind) the chain with additional blocks. Accepts a closure that will operate within that unit of work. The closure has access to an Extension object that allows the addition of blocks to the txhashset and the checking of the current tree roots.
Start a new header MMR unit of work. This MMR tracks the header_head. This MMR can be extended individually beyond the other (output, rangeproof and kernel) MMRs to allow headers to be validated before we receive the full block data.
Rewindable (but still readonly) view on the kernel MMR. The underlying backend is readonly. But we permit the PMMR to be "rewound" via last_pos. We create a new db batch for this view and discard it (rollback) when we are done with the view.
Overwrite txhashset folders in "to" folder with "from" folder
Readonly view on the UTXO set. Based on the current txhashset output_pmmr.
Packages the txhashset data files into a zip and returns a Read to the resulting file
Extract the txhashset data from a zip file and writes the content into the txhashset storage dir