-
Notifications
You must be signed in to change notification settings - Fork 36.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace automatic bans with discouragement filter
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.
- Loading branch information
Showing
9 changed files
with
91 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#### Changes regarding misbehaving peers | ||
|
||
Peers that misbehave (e.g. send us invalid blocks) are now referred to as | ||
discouraged nodes in log output, as they're not (and weren't) strictly banned: | ||
incoming connections are still allowed from them, but they're preferred for | ||
eviction. | ||
|
||
Furthermore, a few additional changes are introduced to how discouraged | ||
addresses are treated: | ||
|
||
- Discouraging an address does not time out automatically after 24 hours | ||
(or the `-bantime` setting). Depending on traffic from other peers, | ||
discouragement may time out at an indeterminate time. | ||
|
||
- Discouragement is not persisted over restarts. | ||
|
||
- There is no method to list discouraged addresses. They are not returned by | ||
the `listbanned` RPC. That RPC also no longer reports the `ban_reason` | ||
field, as `"manually added"` is the only remaining option. | ||
|
||
- Discouragement cannot be removed with the `setban remove` RPC command. | ||
If you need to remove a discouragement, you can remove all discouragements by | ||
stop-starting your node. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters