-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a libp2p rate limiting behavior #1677
Comments
It is fairly common for gossipped transactions to fail due to transient reasons such as UTXO's being spent before the transaction is included. A transaction that was valid when broadcast could become invalid if its inputs were spent in a newly confirmed block. Penalizing nodes for this could unfairly punish nodes that are simply "behind" in their view of the blockchain state. In bitcoin, only incorrectly formatted transactions (i.e. invalid signatures or corrupt data according to consensus rules) are considered immediately punishable, and all transient (ie. state dependent) failures are ignored but unpunished. https://github.com/bitcoin/bitcoin/blob/6ff0aa089c01ff3e610ecb47814ed739d685a14c/src/net_processing.cpp#L1849 However, bitcoin does implement rate limiting on peers to prevent spam of either valid or invalid transactions to work around this. That is not currently implemented in this PR (but noted in this issue: #1677) https://github.com/bitcoin/bitcoin/blob/6ff0aa089c01ff3e610ecb47814ed739d685a14c/src/net_processing.cpp#L3842C23-L3842C37
I think we need a little clarification here. I understand that gossiped transactions will sometimes fail for non-malicious reasons. This means that we shouldn't punish the nodes that broadcast those transactions. This seems to be an alternative to punishing those nodes while still keeping the network somewhat secure. I'm just having a hard time understanding the sentence:
What does "equally" mean here, for example. |
related: #1663
Since we can't be overly strict on our reputation checks for mempool gossip, we should implement a p2p rate limiter which applies equally to all gossipped transactions.
The text was updated successfully, but these errors were encountered: