HomePhabricator

[avalanche] Always send an avahello message if we have a proof

Description

[avalanche] Always send an avahello message if we have a proof

Summary:
This diff removes the filter so we can send avahello messages to peers that don't set the avalanche service bit. This has several benefits:

  • It is less code and less edge cases. Peers with avalanche disabled will simply ignore the message.
  • It makes it possible for a node with avalanche turned on but no proof to poll the network (but it will not be polled, it's kind of a read only mode).
  • It removes the need to broadcast our local proof entirely, leading to further simplification, because sending an avahello is equivalent to sending an inv with our proofid.

Depends on D11363 (otherwise the node will get banned by non avalanche peers).
Reverts D11280 which is no longer needed.

Test Plan:

ninja all check-all

Reviewers: #bitcoin_abc, tyler-smith

Reviewed By: #bitcoin_abc, tyler-smith

Differential Revision: https://reviews.bitcoinabc.org/D11365

Details

Provenance
FabienAuthored on Apr 15 2022, 10:28
FabienPushed on Apr 19 2022, 07:52
Reviewer
Restricted Project
Differential Revision
D11365: [avalanche] Always send an avahello message if we have a proof
Parents
rABC5c1189b9a2ae: [avalanche] Ignore duplicated avahello messages
Branches
Unknown
Tags
Unknown
Reverts
D11280: [avalanche] Broadcast our local proof once it's been verified