Page MenuHomePhabricator

Bump misbehaving factor for unexpected version message behavior

Authored by jasonbcox on May 11 2020, 20:33.



The net protocol expects that the version-verack handshake
is complete before other messages are sent. There's no reason to
allow 100 out-of-order messages to come from a single peer before
deciding to ban them. This behavior should be treated more suspiciously
and ban the peer after one order of magnitude fewer messages.

To assess the impact of this patch, I examined mainnet logs spanning the last 4 months.
There were only 13 instances of missing-verack and none of missing-version.
All instances were received from unique peers. Given this data, I think it's safe to assume
we will not see 10+ missing-(version|verack) instances from any currently deployed nodes
that would otherwise not be banned prior to this patch.

Test Plan
ninja check check-functional

Diff Detail

rABC Bitcoin ABC
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

jasonbcox created this revision.May 11 2020, 20:33
Herald added a reviewer: Restricted Project. · View Herald TranscriptMay 11 2020, 20:33
jasonbcox requested review of this revision.May 11 2020, 20:33
jasonbcox planned changes to this revision.
jasonbcox requested review of this revision.May 13 2020, 16:49
jasonbcox edited the summary of this revision. (Show Details)
jasonbcox edited the test plan for this revision. (Show Details)
deadalnix accepted this revision.May 13 2020, 23:14
This revision is now accepted and ready to land.May 13 2020, 23:14