This maintains a count of the successful compact proofs exchanges and enforce a minimum quantity of node that sent avaproofs message before the quorum is considered valid.
This is a best effort to give confidence that our proof set is in par with the other nodes from the network before we start polling.
The threshold is put to 8: because we need at least 8 nodes in our quorum to have converging votes there is no point using a lower value. This means that 1 out of 8 outbounds should be honest for us to get a good set of proofs.
Details
- Reviewers
sdulfari - Group Reviewers
Restricted Project - Commits
- rABC8f770ea4e862: [avalanche] Use the number nodes from which we've received avaproofs as a…
ninja all check-all
Diff Detail
- Repository
- rABC Bitcoin ABC
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
src/avalanche/avalanche.h | ||
---|---|---|
77 ↗ | (On Diff #33983) | Maybe COUNT instead of NUMBER? It's a bit more self-explanatory this way. |
src/avalanche/peermanager.h | ||
227 ↗ | (On Diff #33983) | To help differentiate this API from the sister one in Processor, maybe name this latchAvaproofsSent()? This makes the return value more intuitive. |
src/avalanche/processor.cpp | ||
292 ↗ | (On Diff #33983) | non-negative |
843 ↗ | (On Diff #33983) | Make a comment why proofs received during IBD do not count. Update the diff summary with more context if necessary. |
test/functional/abc_p2p_avalanche_quorum.py | ||
31 ↗ | (On Diff #33983) | Nit: This can be 8 and can stay that way even if we bump the default higher. This should make the test slightly faster. |
127 ↗ | (On Diff #33983) | This and the above comment no longer make sense with the reference to "half" since there are more than two peers in the quorum now. |
test/functional/abc_p2p_avalanche_quorum.py | ||
---|---|---|
127 ↗ | (On Diff #33983) | This is still valid, each peers is worth half the minimum score for the quorum to be considered valid (-avaminquorumstake) |
Consider renaming the actual Diff to reflect that it's a count of nodes.
(also, singular of criteria should be "criterion")
Something such as: "Use the number of nodes from which we've received avaproofs as a criterion for quorum readiness"