HomePhabricator

Bump misbehaving factor for unexpected version message behavior

Description

Bump misbehaving factor for unexpected version message behavior

Summary:
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

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

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

Details

Provenance
jasonbcoxAuthored on May 11 2020, 19:24
jasonbcoxPushed on May 13 2020, 23:19
Reviewer
Restricted Project
Differential Revision
D6036: Bump misbehaving factor for unexpected version message behavior
Parents
rABC6e392928a605: Update univalue to 1.1.1
Branches
Unknown
Tags
Unknown