Page MenuHomePhabricator

[avalanche] Don't turn on service bit if we don't have a proof

Authored by Fabien on Thu, Apr 15, 12:59.



A node with no proof cannot participate actively to the avalanche
network, so it might as well not advertise it with the service bit.

Depends on D9440.

Test Plan
ninja all check-all

Diff Detail

rABC Bitcoin ABC
Lint Not Applicable
Tests Not Applicable

Event Timeline

Fabien requested review of this revision.Thu, Apr 15, 12:59

I get the point that a node that does not vote is not a full avalanche peer. But it can still be a "limited avalanche peer", if it wants to receive and relay proofs, so it can be aware of other avalanche nodes. We will need some other way of signalling the "limited avalanche" state.

Keeping the service bit on for all avalanche aware nodes as it is right now would work. A node signalling the service bit can be considered a limited node until we see its proof.

deadalnix requested changes to this revision.Mon, Apr 19, 23:50
deadalnix added a subscriber: deadalnix.
deadalnix added inline comments.
2457 ↗(On Diff #28193)

Why not ask the avalanche processor if the service bit should be enabled?

This would make things simpler. You'd have to get rid of the above log, but, quite frankly, this would be a plus because it's kinda weird. You'd want to log that it is using a proof when it is using one, not prompt something when it isn't using one, as if it was an error, but it's really not so it's just a log.

This revision now requires changes to proceed.Mon, Apr 19, 23:50

Add a method in the Processor to return if the flag should be set.
Rebase on top of D9440.

This revision is now accepted and ready to land.Thu, Apr 22, 11:18