Disconnect on mempool requests from peers when over the upload limit.#7166
Disconnect on mempool requests from peers when over the upload limit.#7166laanwj merged 1 commit intobitcoin:masterfrom gmaxwell:mempool_p2p_when_overlimit
Conversation
Mempool requests use a fair amount of bandwidth when the mempool is large, disconnecting peers using them follows the same logic as disconnecting peers fetching historical blocks.
|
utACK. |
|
Nice, Concept ACK. |
|
ACK Would be nice if #6589 was merged so we could quantify how much is actually used by this on average 👍 |
|
utACK. |
|
utACK |
6aadc75 Disconnect on mempool requests from peers when over the upload limit. (Gregory Maxwell)
|
Cherry-picked to 0.12 as 6ba25d2 |
There was a problem hiding this comment.
I'm not sure how much this achieves, just disconnecting. Is this considered misbehavior? Should it be considered misbehavior if the node reconnects and continues this behavior?
There was a problem hiding this comment.
It's not misbehavior - the peer cannot know that you're close to exceeding your bandwidth limit.
If the node reconnects and keeps bombarding with mempool commands it is absolutely misbehavior (with or without this pull), but this change is not meant as mitigation for attacks.
For better or worse, at the moment we don't have any framework to ban peers based on P2P-level behavior.
6aadc75 Disconnect on mempool requests from peers when over the upload limit. (Gregory Maxwell)
6aadc75 Disconnect on mempool requests from peers when over the upload limit. (Gregory Maxwell)
Bitcoin 0.12 misc P2P/Net PRs Cherry-picked from the following upstream PRs: - bitcoin/bitcoin#5288 - Only the reorg, option was removed in bitcoin/bitcoin#6374 which we merged in #1258 - bitcoin/bitcoin#6561 - bitcoin/bitcoin#6728 - bitcoin/bitcoin#6829 - bitcoin/bitcoin#6974 - bitcoin/bitcoin#7075 - bitcoin/bitcoin#7166 Part of #2074.
Mempool requests use a fair amount of bandwidth when the mempool is large,
disconnecting peers using them follows the same logic as disconnecting
peers fetching historical blocks.