Expand description
A collection of functions that implement the consensus rules for the Bitcoin Network. This module contains functions that are used to verify blocks and transactions, and doesn’t assume anything about the chainstate, so it can be used in any context. We use this to avoid code reuse among the different implementations of the chainstate.
Structs§
- Consensus
- This struct contains all the information and methods needed to validate a block, it is used by the ChainState to validate blocks and transactions.
Constants§
- COIN_
VALUE - The value of a single coin in satoshis.
- UNSPENDABLE_
BIP30_ UTXO_ 91722 - The unspendable UTXO on block 91_722 that exists because of the historical BIP30 violation. For Utreexo, this UTXO is not overwritten as we commit the block hash in the leafhash. But since non-Utreexo nodes consider this as unspendable as it’s already been overwritten, we also need to make it not spendable.
- UNSPENDABLE_
BIP30_ UTXO_ 91812 - The unspendable UTXO on block 91_812 that exists because of the historical BIP30 violation. For Utreexo, this UTXO is not overwritten as we commit the block hash in the leafhash. But since non-Utreexo nodes consider this as unspendable as it’s already been overwritten, we also need to make it not spendable.
- UTREEXO_
TAG_ V1 - The version tag to be prepended to the leafhash. It’s just the sha512 hash of the string
UtreexoV1represented as a vector of u8 ([85 116 114 101 101 120 111 86 49]). The same tag is “5574726565786f5631” as a hex string.