-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Spam connections and forged block locators fix #3422
Conversation
Update/mainnet staging
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't a dupe white board needs to debug
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Debug and rerun nobes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
Motivation
The motivation behind this PR is to have a mechanism of banning peer IPs as outlined here to mitigate cases that might stall client/validators.
Approach
A banned peers list was implemented to store peers acting maliciously that are banned for 300 seconds. If a peer sends more than 10 connection requests in under 10 seconds they get banned and if a peer does not respond to block requests within 600 seconds ( can be changed ) they get banned.
Test Plan
This was tested on an isolated network with a different ip/machine per peer. Plan is to test this out on the Canary network with the relevant attacks.
Related PRs
#3366
#3388