Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Add DDoS/Spam protection to consensus gossip #1115

Closed
gnunicorn opened this issue Nov 14, 2018 · 3 comments
Closed

Add DDoS/Spam protection to consensus gossip #1115

gnunicorn opened this issue Nov 14, 2018 · 3 comments
Labels
I2-security The client fails to follow expected, security-sensitive, behaviour.
Milestone

Comments

@gnunicorn
Copy link
Contributor

gnunicorn commented Nov 14, 2018

Currently we keep messages in the consensus gossip for up to five minutes, however if any of the authority nodes goes rogue and floods the network, we might run out of memory or it could delay actually useful messages.

We should add some generic per-client throttle mechanism to ConsensusGossip (in substrate-network) of forwarding messages to prevent this.

@rphmeier
Copy link
Contributor

Perhaps this is only in Polkadot but we do only forward 128 or so messages at a time.

@gavofyork gavofyork added I2-security The client fails to follow expected, security-sensitive, behaviour. and removed F5-task labels Dec 18, 2018
@gavofyork gavofyork added this to the 1.x series milestone Dec 18, 2018
@andresilva
Copy link
Contributor

After paritytech/polkadot-sdk#571 is implemented we should revisit our implementation of consensus gossip. We should make sure we only gossip with authorities (potentially prioritizing over authorities in the current grandpa set). Having bound the set of peers we are gossiping with, we should be able to estimate an upper bound of messages going around for the grandpa protocol (and we should enforce it by capping our buffers instead of just pruning based on expiration time).

We should also introduce some ordering for messages, from a higher-level it's more important to keep around messages from later rounds than from older grandpa rounds (that for some reason we might have seen recently).

@gavofyork
Copy link
Member

@andresilva @gnunicorn if there's more to this than polite grandpa, please open a new issue with appropriate detail.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
I2-security The client fails to follow expected, security-sensitive, behaviour.
Projects
None yet
Development

No branches or pull requests

4 participants