Skip to content
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

Per IP-address peer limiting? #111

Open
kdeme opened this issue Oct 21, 2019 · 1 comment
Open

Per IP-address peer limiting? #111

kdeme opened this issue Oct 21, 2019 · 1 comment
Labels
P2P question Further information is requested

Comments

@kdeme
Copy link
Contributor

kdeme commented Oct 21, 2019

First off:
I'm not sure if the application the right place to do this. Perhaps this should be arranged system wide as this is typically a kind of restriction that can be variable per system. However, some advice on it should be formulated then.

The concern is that when having a limitation of amount of connected peers (see #107 & #108) combined with certain high timeouts on the handshakes in the rlpx protocol and sub-protocols that one node could easily launch many connects and allow them to timeout hogging up the connections.
This is obviously not completely correct as currently the limit is not enforced by amount of open connections but by amount of actual completed handshakes (and thus fully connected peers, which would be more intensive for a node to pull off). Just mentioning this part, in case we would change that.

However, there is still a higher limit that remains valid which is the open files limit on Unix systems.

First step should probably be to investigate if there are actually locations where there is no timeout at all (other than the TCP timeout): like are these OK?
Basic solution could also be to just lower the timeouts with a decent amount. (For Whisper I actually never used the 10 second timeout)

@jlokier
Copy link
Contributor

jlokier commented Oct 15, 2021

It's worth a note that some IPs appear to be heavily used NAT exit points for ISPs. In particular, from China recently there was one IP responsible for about 1/3 of incoming connections, with different enode keys. Reverse DNS suggested an ISP IP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2P question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants