HomePhabricator

[avalanche] Promote stake contenders when the chain tip updates

Description

[avalanche] Promote stake contenders when the chain tip updates

Summary:
Every time the chain tip updates, we need to "promote" stake contender cache entries in order to continue to track contender payout scripts and proof scores. Every time we do this, we grow the cache, so cleanup needs to be done on this cadence as well. This patch integrates that cache promotion into the Processor, trims the cache accordingly, and adds the -avalanchestakingpreconsensus option to enable this behavior. This same flag will be used to enable avalanche voting on contenders in future patches.

Depends on D17024

Test Plan:

ninja check-avalanche-processor_tests

Reviewers: O1 Bitcoin ABC, #bitcoin_abc, Fabien

Reviewed By: O1 Bitcoin ABC, #bitcoin_abc, Fabien

Subscribers: Fabien

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

Details

Provenance
roqqitAuthored on Oct 28 2024, 16:37
roqqitPushed on Nov 1 2024, 15:48
Reviewer
Restricted Owners Package
Differential Revision
D17027: [avalanche] Promote stake contenders when the chain tip updates
Parents
rABC4b78a30b555d: [ecash-herald] Patch axios syntax bug in getNextStakingReward
Branches
Unknown
Tags
Unknown
Reverted By
D17059: Revert "[avalanche] Promote stake contenders when the chain tip updates"