HomePhabricator

[avalanche] Add a way to check if a VoteRecord is stale

Description

[avalanche] Add a way to check if a VoteRecord is stale

Summary:
A future patch will use this to handle the case where a vote hasn't finalized after a reasonable time.

The Avalanche whitepaper suggests that it's expected for finalization to occur after O(log(n))
rounds of voting. While our implementation differs in some ways, this expectation should hold
reasonably close. The threshold was selected to be an order of magnitude higher than the number
of votes required for finalization, which gives plenty of room for confidence to reset multiple
times before finalizing under normal network conditions.

This threshold can later be made configurable and/or tightened as needed.

Depends on D11501

Test Plan:

ninja check-avalanche

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Subscribers: deadalnix, Fabien

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

Details

Provenance
sdulfariAuthored on May 19 2022, 23:14
sdulfariPushed on May 24 2022, 22:55
Reviewer
Restricted Project
Differential Revision
D11502: [avalanche] Add a way to check if a VoteRecord is stale
Parents
rABC3044ebc87a98: Fix an exception message in blockencodings_tests when the compact size MAX_SIZEā€¦
Branches
Unknown
Tags
Unknown