Page MenuHomePhabricator

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

Authored by roqqit on Fri, Nov 15, 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

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Owners added a reviewer: Restricted Owners Package.Fri, Nov 15, 18:11
roqqit requested review of this revision.Fri, Nov 15, 18:11
Fabien requested changes to this revision.Fri, Nov 15, 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.Fri, Nov 15, 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 ↗(On Diff #50941)
This revision is now accepted and ready to land.Mon, Nov 18, 19:34