HomePhabricator

[avalanche] use the OrphanProofPool

Description

[avalanche] use the OrphanProofPool

Summary:
Plug the orphan proofs pool into PeerManager and start using it to store proofs with missing utxos or wrong UTXOs that could potentially become good in case of a reorg.
Re-check all proofs at each chaintip change, create a new peer for proofs that have become good, remove them from the orphan pool.

Regarding the choice of setting the pool capacity to 10000 stakes, I ran a benchmark and found that I can verify 10000 single-stake proofs in 0.39s. It seems reasonable to keep this number below 1 second if we want to check all the proofs at each tip change.

Test Plan: ninja all check-all

Reviewers: #bitcoin_abc, PiRK, majcosta, Fabien

Reviewed By: #bitcoin_abc, majcosta, Fabien

Subscribers: PiRK, deadalnix, Fabien, majcosta

Differential Revision: https://reviews.bitcoinabc.org/D9476

Details

Provenance
PiRKAuthored on Jun 1 2021, 13:04
deadalnixCommitted on Jun 4 2021, 15:07
deadalnixPushed on Jun 4 2021, 15:07
Reviewer
Restricted Project
Differential Revision
D9476: [avalanche] use the OrphanProofPool
Parents
rABCa53677be459f: Use smart pointer in the orphan proof pool
Branches
Unknown
Tags
Unknown