nimiq / core-rs-albatross

Rust implementation of the Albatross protocol
https://nimiq.com
Other
160 stars 61 forks source link

Review rate limiting for gossipsub #2570

Open styppo opened 3 months ago

ii-cruz commented 3 months ago

https://docs.libp2p.io/concepts/security/dos-mitigation/ But this doesn't seem to exist in the rust implementation.

There is the peer score system that can potentially be configured such that the peer that spams the network gets a degraded score to the point of being pruned from the mess. https://docs.rs/libp2p/latest/libp2p/gossipsub/struct.PeerScoreParams.html

Talking with @jsdanielh It seems possible to spam the network with TransactionTopic messages.

ii-cruz commented 1 month ago

use rate limiting we have to protect our code. The gossip sub could still be spammed in some circumstances but at least the rest is protected.