Page MenuHomePhabricator

[avalanche] Add stake contender polling
ClosedPublic

Authored by roqqit on Tue, Nov 12, 21:01.

Details

Reviewers
Fabien
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Restricted Project
Commits
rABC3b44e6192850: [avalanche] Add stake contender polling
Summary

This patch allows stake contenders to be polled (if -avalanchestakingpreconsensus is set). They are not yet reconciled, so no avalanche voting is taking place. Manually set winners polled for will respond as accepted.

Depends on D17144

Test Plan
ninja check-functional

Event Timeline

Owners added a reviewer: Restricted Owners Package.Tue, Nov 12, 21:01
roqqit requested review of this revision.Tue, Nov 12, 21:01
Fabien requested changes to this revision.Wed, Nov 13, 09:03
Fabien added a subscriber: Fabien.
Fabien added inline comments.
test/functional/abc_p2p_avalanche_contender_voting.py
96

So my understanding of this (imo very confusing) loop is that the node will respond invalid for the block height the proof was made valid ? This seems like a glitch and not the expected behavior.

Please add some comments in that loop also, e.g. the indexes are using the quorum node but are about block height which makes no sense unless you understand that the chain is setup clean so no block initially and each quorum node caused a block to be mined to generate its proof.

129

You should set a mock time to make it explicit the node never had a chance to compute the winner under normal conditions (because all the proofs are too recent to be considered).

This revision now requires changes to proceed.Wed, Nov 13, 09:03
  • set mock time and give some comments why we do this
  • clarify a bunch of comments in the goofy loop
Fabien requested changes to this revision.Thu, Nov 14, 08:23
Fabien added inline comments.
test/functional/abc_p2p_avalanche_contender_voting.py
103 ↗(On Diff #50849)

I still think this is incorrect. The node has no way to determine if the contender should be picked or not, it should respond something that doesn't impact the vote outcome and not reject it.

This revision now requires changes to proceed.Thu, Nov 14, 08:23

rebase on D17144 to fix early convergence issue

This revision is now accepted and ready to land.Mon, Nov 18, 08:31
This revision was automatically updated to reflect the committed changes.