Page MenuHomePhabricator

[avalanche] Drop stale votes and stale proofs
ClosedPublic

Authored by sdulfari on May 27 2022, 04:27.

Details

Reviewers
deadalnix
Group Reviewers
Restricted Project
Commits
rABC7ebfaec9f5ef: [avalanche] Drop stale votes and stale proofs
Summary

When Avalanche votes become stale, drop them. The caller (net_processing) can
decide what to do with an item that had its vote dropped. This patch handles
the stale proof case and leaves the stale block case to future work.

A stale proof is dropped from all proof pools and is not rejected. Peers
polling for this proof will get an UNKNOWN response. The rationale behind this
is stale proofs cannot be assumed to be rejected. It's possible that the proof
will eventually be accepted by the network in the future. It's better to wait
and see if a peer will share this proof with us later and vote again.

Stale blocks are not yet handled in any meaningful way and will be in a future
patch. While not ideal, it's safe to fallback on Nakamoto consensus for now.
Any blocks mined on top of a stale block or as a competing chaintip will kick
off new Avalanche votes, allowing the network to reconcile. This case should be
very rare since nodes propagate blocks aggressively.

Test Plan
ninja check-functional

Diff Detail

Event Timeline

deadalnix requested changes to this revision.May 28 2022, 00:08
deadalnix added a subscriber: deadalnix.
deadalnix added inline comments.
src/net_processing.cpp
5049 ↗(On Diff #33704)

Add a comment for the fallthrought. The compiler should have yelled at you.

5112 ↗(On Diff #33704)

There is nothing more to do.

This revision now requires changes to proceed.May 28 2022, 00:08
This revision is now accepted and ready to land.May 29 2022, 23:56
Unknown Object (User) added a subscriber: Unknown Object (User).Nov 3 2022, 13:37
This comment was removed by Fabien.