Page MenuHomePhabricator

[avalanche] Promote and poll contenders as soon as quorum is active
ClosedPublic

Authored by roqqit on Wed, Apr 23, 21:43.

Details

Summary

This diff accomplishes a few things:

  1. Contender promotion becomes generally more robust to future changes.
  2. A miner restarting a node no longer faces uncertainty of the staking rewards payout address in getblocktemplate, since prior to this change, a block would need to be mined before contenders began polling.
  3. Improves resilience of the network if many nodes are restarted for any reason. This is especially important when coupled with 2.
Test Plan
ninja check check-functional

Diff Detail

Event Timeline

roqqit requested review of this revision.Wed, Apr 23, 21:44
Fabien requested changes to this revision.Thu, Apr 24, 08:10
Fabien added a subscriber: Fabien.
Fabien added inline comments.
src/avalanche/processor.cpp
1178 ↗(On Diff #53661)

This should never happen but the fallback is safe so better do it

src/avalanche/test/processor_tests.cpp
2682–2683 ↗(On Diff #53661)
test/functional/abc_p2p_avalanche_contender_voting.py
487 ↗(On Diff #53661)

Just after this you can check the contenders are polled

542 ↗(On Diff #53661)

Can you check that polling happens immediately after the quorum is established ? There should be enough proofs to fill the 12 slots

This revision now requires changes to proceed.Thu, Apr 24, 08:10
This revision is now accepted and ready to land.Fri, Apr 25, 09:32