Page MenuHomePhabricator

[avalanche] Add an unbroadcast set of proofs
ClosedPublic

Authored by Fabien on Jun 16 2021, 14:10.

Details

Reviewers
PiRK
Group Reviewers
Restricted Project
Maniphest Tasks
Restricted Maniphest Task
Commits
rABC205265b50084: [avalanche] Add an unbroadcast set of proofs
Summary

When a proof is manually submitted via sendavalancheproof, an inventory
is sent to all the peers but they are not tracked like other proof invs.
An unbroadcasted set of proofs is added to the peermanager that allow
for reattempt broadcasting these proofs until a peer has requested it.
This is similar to what is done with transactions, and will also make it
possible to store our proofs to a file and broadcast it at startup like
we do for the mempool content.

Ref T1611.

Test Plan
ninja check-functional

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Fabien requested review of this revision.Jun 16 2021, 14:10
Fabien planned changes to this revision.Jun 16 2021, 14:39

Remove the proof from the set when we receive a getdata request, fix the test and add a case for the proof becoming invalid.

PiRK requested changes to this revision.Jun 17 2021, 08:32
PiRK added a subscriber: PiRK.
PiRK added inline comments.
src/avalanche/peermanager.cpp
519 ↗(On Diff #28940)

last_ -> previous_

This revision now requires changes to proceed.Jun 17 2021, 08:32
This revision is now accepted and ready to land.Jun 17 2021, 13:48
This revision was automatically updated to reflect the committed changes.