Page MenuHomePhabricator

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

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

Details

Summary

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

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

Event Timeline

Fabien requested review of this revision.Apr 15 2021, 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.Apr 19 2021, 23:50
deadalnix added a subscriber: deadalnix.
deadalnix added inline comments.
src/init.cpp
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.Apr 19 2021, 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.Apr 22 2021, 11:18