Documentation ¶
Index ¶
Constants ¶
View Source
const HashSize = 32
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LeafData ¶
type LeafData struct { BlockHash [32]byte TxHash Hash Index uint32 // txout index Height int32 Coinbase bool Amt int64 PkScript []byte }
LeafData is all the data that goes into a leaf in the utreexo accumulator. Everything here is enough data to verify the bitcoin signatures
func (*LeafData) SerializeSize ¶
SerializeSize says how big a leafdata is
type UData ¶
type UData struct { Height int32 AccProof accumulator.BatchProof Stxos []LeafData TxoTTLs []int32 }
func GenUData ¶
func GenUData(delLeaves []LeafData, forest *accumulator.Forest, height int32) ( ud UData, err error)
GenUData creates a block proof, calling forest.ProveBatch with the leaf indexes to get a batched inclusion proof from the accumulator. It then adds on the leaf data, to create a block proof which both proves inclusion and gives all utxo data needed for transaction verification.
func UDataFromCompactBytes ¶
func (*UData) ProofSanity ¶
Verify checks the consistency of uData: that the utxos are proven in the batchproof
func (*UData) SerializeSize ¶
SerializeSize outputs the size of the udata when it is serialized
func (*UData) ToCompactBytes ¶
Click to show internal directories.
Click to hide internal directories.