HomePhabricator

Replace automatic bans with discouragement filter

Description

Replace automatic bans with discouragement filter

Summary:
This patch improves performance and resource usage around IP
addresses that are banned for misbehavior. They're already not
actually banned, as connections from them are still allowed,
but they are preferred for eviction if the inbound connection
slots are full.

Stop treating these like manually banned IP ranges, and instead
just keep them in a rolling Bloom filter of misbehaving nodes,
which isn't persisted to disk or exposed through the ban
framework. The effect remains the same: preferred for eviction,
avoided for outgoing connections, and not relayed to other peers.

Also change the name of this mechanism to better reflect reality;
they're not banned, just discouraged.

Contains release notes and several interface improvements by
John Newbery.

Partial backport of Core PR19219
https://github.com/bitcoin/bitcoin/pull/19219/commits/b6a3448435678b945a89275993c3f51c7215ec09

Test Plan: ninja check check-functional

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Subscribers: deadalnix

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

Details

Provenance
Pieter Wuille <pieter@wuille.net>Authored on Jun 9 2020, 01:46
jasonbcoxCommitted on Jun 11 2020, 21:38
jasonbcoxPushed on Jun 11 2020, 21:38
Reviewer
Restricted Project
Differential Revision
D6506: Replace automatic bans with discouragement filter
Parents
rABCa0c05b6739fe: [CI] Do not enable debug for TSAN builds
Branches
Unknown
Tags
Unknown