mit-dci / utreexo

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

accumulator/pollard: Add support for multi-block proofs #332

Closed kcalvinalvin closed 2 years ago

kcalvinalvin commented 2 years ago

IngestBatchProof now takes in a rememberAll argument. When it is true, IngestBatchProof will mark all of the proof to be remembered.

The functionality is tested by a new function, TestPollardIngestMultiBlockProof which has the forest generate proofs in a certain interval.

NOTE: There hasn't been much testing to check that all nodes that should be forgotten have been forgotten after the pollard is done deleting all the nodes the proof was for.

Furthermore, there needs to be code to forget the proofs if the batchproof was lying about what leaves will be deleted in the future.