Page MenuHomePhabricator

[avalanche] Add stake contender polling
ClosedPublic

Authored by roqqit on Nov 12 2024, 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

Diff Detail

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

Event Timeline

Owners added a reviewer: Restricted Owners Package.Nov 12 2024, 21:01
roqqit requested review of this revision.Nov 12 2024, 21:01
Fabien requested changes to this revision.Nov 13 2024, 09:03
Fabien added a subscriber: Fabien.
Fabien added inline comments.
test/functional/abc_p2p_avalanche_contender_voting.py
96 ↗(On Diff #50809)

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 ↗(On Diff #50809)

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.Nov 13 2024, 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.Nov 14 2024, 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.Nov 14 2024, 08:23

rebase on D17144 to fix early convergence issue

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