Page MenuHomePhabricator

[avalanche] Add an invalidation latch to contender cache
Needs RevisionPublic

Authored by roqqit on Thu, Jan 23, 17:51.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Summary

The polling behavior is designed such that invalidated items should not be polled (IsWorthPolling should return false).
Stake contenders are unique in that a particular contenderId can be invalidated but the underlying contender does not fall
out of the contender set unless its proof becomes invalid, so we cannot simply remove the contenderId as a valid contender.

This patch adds an invalidation status bit that latches on when set so that invalidated contenders will no longer be polled.

Test Plan
ninja check-avalanche-stakecontendercache_tests

Diff Detail

Event Timeline

roqqit requested review of this revision.Thu, Jan 23, 17:51
Fabien requested changes to this revision.Fri, Jan 24, 08:37
Fabien added a subscriber: Fabien.

Invalidated invs are removed from the polling list anyway so I'm not sure what the use case is for this. Clearing my queue for now.

This revision now requires changes to proceed.Fri, Jan 24, 08:37