-
Notifications
You must be signed in to change notification settings - Fork 807
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
[Merged by Bors] - Packet filter cli option #2523
Conversation
hmm.... I dont recall banning localhost in the packet filter. Are you sure disabling the packet filter resolves this? I think the packet filter just limits requests and will ban an ip if it spams requests, which is probably what you're doing on smaller testnets. Also, on smaller testnets you should set the --target-peer paramter to the expected number of nodes to prevent continuous discovery requests which will lead to discovery spamming |
It seems to be banning the last connecting localhost node from the logs
This is on a local testnet with 4 beacon nodes all of them running with |
^I've observed the same as Pawan when running local testnets |
Oh yeah. I think I added a limit per IP. So if all your nodes are under a single IP, its going to ban that IP. Least the filters are working correctly. I guess we should set this CLI flag for all the nodes on the testnet, not just the bootnodes, because the other nodes will also ban localhost from excessive traffic. |
I think this should only happen after > 10 localhost beacon nodes which is sufficient for CI atleast (doppleganger tests)
Can add it in if required though :) |
That config says that we allow up to 10 people to talk to us per IP. However in the packet filter, we set default rate limits. There is a limit of how many messages we can receive per IP. See here: https://github.com/sigp/discv5/blob/master/src/config.rs#L106 The default value is on average 9 per second. This means per IP we only allow 9 requests per second before we ban the IP. So even though we allow 10 peers, on a small network, they will hit us with lots of requests such that we ban the IP from excessive requests. So I think other nodes will also hit this limit if everyone is under the same IP. |
87bc117
to
2353618
Compare
Ohh yeah that makes sense. Added the flag in beacon node as well in 2353618 |
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.
Looks good to me
bors r+ |
## Issue Addressed N/A ## Proposed Changes Adds a cli option to disable packet filter in `lighthouse bootnode`. This is useful in running local testnets as the bootnode bans requests from the same ip(localhost) if the packet filter is enabled.
Pull request successfully merged into unstable. Build succeeded: |
## Issue Addressed N/A ## Proposed Changes Adds a cli option to disable packet filter in `lighthouse bootnode`. This is useful in running local testnets as the bootnode bans requests from the same ip(localhost) if the packet filter is enabled.
Issue Addressed
N/A
Proposed Changes
Adds a cli option to disable packet filter in
lighthouse bootnode
. This is useful in running local testnets as the bootnode bans requests from the same ip(localhost) if the packet filter is enabled.