Rate limiting for rust libp2p GossipSub #5632
Replies: 2 comments 3 replies
-
Hi! There's |
Beta Was this translation helpful? Give feedback.
-
is that an attack vector by itself? Gossipsub offers multiple ways to both downscore bad/malicious peers, and discard messages therefore reducing the DoS attack vector possibilities. you can validate the messages via data transform and invalid messages will penalize the peers who sent them. If the messages are valid you can discard rpc's bigger than a defined size and as I referred above you can set the max number of messages an rpc can contain with You can also define the duplicate cache duration time, duplicate messages are ignored and not forwarded. If can even blacklist a peer that you may deem malicious via other protocol. This should cover most of the cases, but if it doesn't yours you an always submit an issue and we'll see from there :) |
Beta Was this translation helpful? Give feedback.
-
I want to add some rate limiting capabilities to nodes in our network. We are using a rendevouz client/server model and gossipsub for message organization and propagation. I see that this crate used to exist (https://crates.io/crates/libp2p-ratelimit), but for some reason it was removed from libp2p

Does anyone know if there is in fact still any existing rate limiting crate to plug into our swarm, or do I need to start thinking about building something custom?
Beta Was this translation helpful? Give feedback.
All reactions