Page MenuHomePhabricator

[avalanche] Simplify contenders by treating rejection and invalidation the same
Needs RevisionPublic

Authored by roqqit on Wed, Feb 26, 22:34.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Summary

This provides a stronger guarantee that once a contender is finalized, it will never be reverted, even if the system managed to re-poll a finalized contender. We don't really care that invalidated contenders do not get removed from the winner set so long as blocks get mined with staking rewards going to a finalized contender.

Test Plan
ninja check check-functional

Diff Detail

Event Timeline

roqqit requested review of this revision.Wed, Feb 26, 22:34
Fabien requested changes to this revision.Thu, Feb 27, 08:19
Fabien added a subscriber: Fabien.
Fabien added inline comments.
src/avalanche/test/stakecontendercache_tests.cpp
249

This one should still be valid, just use reject instead of invalidate

262

It's worth testing the actual behavior, aka rejecting does not undo finalization

This revision now requires changes to proceed.Thu, Feb 27, 08:19