mit-dci / utreexo

accumulator for bitcoin utxo set
MIT License
323 stars 60 forks source link

accumulator/pollard: Add a VerifyBatchProof method #318

Closed kcalvinalvin closed 3 years ago

kcalvinalvin commented 3 years ago

Pollard now has a method just for verifying a given proof. This new method does not alter the Pollard in any way, making it useful during verifying mempool Bitcoin transactions.

Am looking for inputs in this because I'm thinking maybe we should take out the verification part from IngestBatchProof() and just have the caller call Pollard.VerifyBatchProof() for verifying, and call something like

// This function would force us to export MiniTree and Node, so might not be worth it.
func (p *Pollard) IngestBatchProof(trees []MiniTree, rootCandidates []Node) error {}
adiabat commented 3 years ago

Works for now; we need to reword the ingestion / verification process