HomePhabricator

[avalanche] discourage ava messages if avalanche is disabled

Description

[avalanche] discourage ava messages if avalanche is disabled

Summary:
If a node does not have avalanche enabled, it should not receive avalanche related net messages.

Nodes decide to send an AVAHELLO messages to a peer if they see that their NODE_AVALANCHE service flag is set. A node sending such a message when this flag is not set is misbehaving.
This should partially mitigate avalanche message spamming.

Note that for the moment the NODE_AVALANCHE is never set, but I expect that it will be set if -enableavalanche is specified.

To make the functional test work, I had to make sure AvalancheDelegation levels are not None in messages.py, else the serialization fails.

Test Plan: ninja all check-all

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Subscribers: Fabien

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

Details

Provenance
PiRKAuthored on Mar 7 2021, 10:18
PiRKPushed on Mar 15 2021, 07:09
Reviewer
Restricted Project
Differential Revision
D9304: [avalanche] discourage ava messages if avalanche is disabled
Parents
rABC37e10967cbba: [Cashtab] Remove all colors from App.css
Branches
Unknown
Tags
Unknown