This implement the voting mechanism, with pools and responses and account for the votes properly. The peer selection is not done at this point in time.
Depends on D2045
jasonbcox | |
schancel | |
Fabien |
Restricted Project |
This implement the voting mechanism, with pools and responses and account for the votes properly. The peer selection is not done at this point in time.
Depends on D2045
make check
Updated tests and added new ones to reflect the added fonctionalities.
Lint OK |
No Unit Test Coverage |
Buildable 3860 | |
Build 5793: Bitcoin ABC Buildbot (legacy) | |
Build 5792: arc lint + arc unit |
Requesting changes only for the sanity check. Everything else is optional considering the timeline.
src/avalanche.cpp | ||
---|---|---|
77 ↗ | (On Diff #5748) | Needs check for vr == w.end() for sanity |
182 ↗ | (On Diff #5748) | Does there need to be fuzzing so that the same node isn't selected every time? |
219 ↗ | (On Diff #5748) | remive -> remove |
220 ↗ | (On Diff #5748) | enevr -> never |
src/avalanche.h | ||
160 ↗ | (On Diff #5748) | quesries -> queries |
162 ↗ | (On Diff #5748) | RequestReccord -> RequestRecord |
src/test/avalanche_tests.cpp | ||
317 ↗ | (On Diff #5748) | ti -> it |
src/avalanche.cpp | ||
---|---|---|
182 ↗ | (On Diff #5748) | There is no node selection for now, so that wouldn't fuzz anything :) |
src/protocol.h | ||
---|---|---|
309 ↗ | (On Diff #5768) | We should use (1 << 9) since BU is using 6,7,8 for Graphene, WeakBlocks, and compact block filters: // NODE_GRAPHENE means the node supports Graphene blocks // If this is turned off then the node will not service graphene requests nor // make graphene requests NODE_GRAPHENE = (1 << 6), // Bits 24-31 are reserved for temporary experiments. Just pick a bit that // isn't getting used, or one not being used much, and notify the // Bitcoin Unlimited devevelopement team. Remember that service bits are just // unauthenticated advertisements, so your code must be robust against // collisions and other cases where nodes may be advertising a service they // do not actually support. Other service bits should be allocated via the // BUIP process. NODE_WEAKBLOCKS = (1 << 7), // NODE_CF indicates the node is capable of serving compact block filters to SPV clients. NODE_CF = (1 << 8) }; |
src/avalanche.cpp | ||
---|---|---|
77 ↗ | (On Diff #5748) | Bracket create the element if missing, so it's never end(). But this whole thing is wong anyways. |
src/protocol.h | ||
309 ↗ | (On Diff #5768) | BU has a big problem designing it protocol. They use service bits like there is an infinite supply of them. Graphene doesn't require a service bit. I talked to George about this. |
src/protocol.h | ||
---|---|---|
309 ↗ | (On Diff #5768) | More over, Bits 24-31 are reserved for temporary experiments. |
src/protocol.h | ||
---|---|---|
309 ↗ | (On Diff #5768) | This is what I'm concerned about: https://reviews.bitcoinabc.org/D2050#inline-10963 I think it's safer to just use (1 << 9) as there's no downside to doing this. |
Use bit 24 instead of 6 as it in the experiment range and this is clearly still in flight.
src/test/avalanche_tests.cpp | ||
---|---|---|
441 ↗ | (On Diff #6041) | You may want to test against wrong ordering if there is more than 1 block |