Page MenuHomePhabricator

[avalanche] Return pending stake contender status when there is no local staking rewards computed
ClosedPublic

Authored by roqqit on Nov 15 2024, 18:11.

Details

Reviewers
Fabien
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Restricted Project
Commits
rABCea1205ddb23a: [avalanche] Return pending stake contender status when there is no local…
Summary

Before staking rewards is computed on the local node, we cannot be sure
of our vote on any particular contender. To avoid convergence issues, we
respond with a pending status.

This also makes contender voting slightly more robust in the unexpected event
that staking rewards fails to be computed for a block due to a bug or
otherwise.

Test Plan
ninja check-avalanche

Diff Detail

Event Timeline

Owners added a reviewer: Restricted Owners Package.Nov 15 2024, 18:11
roqqit requested review of this revision.Nov 15 2024, 18:11
Fabien requested changes to this revision.Nov 15 2024, 18:14
Fabien added a subscriber: Fabien.
Fabien added inline comments.
src/avalanche/test/processor_tests.cpp
2521 ↗(On Diff #50874)

You no longer have an invalid case in this test, it's worth adding it (either here or in a separate diff)

This revision now requires changes to proceed.Nov 15 2024, 18:14

Added back an invalid case. It is incomplete since the local winner does not actually trigger an ACCEPT vote, but this should make it more obvious where that test is heading.

Fabien added inline comments.
src/avalanche/test/processor_tests.cpp
2443
This revision is now accepted and ready to land.Nov 18 2024, 19:34