-
Notifications
You must be signed in to change notification settings - Fork 1.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
Too many Erigon P2P Connections, it made the P2P service hard to maintain #1419
Comments
They are almost all "fake nodes", they don't send anything, they just consume and receive It's been more than 4 months that I've noticed that their number is very high, in any region of the planet they will only connect to you if you are using the "official build" And that "Erigon" is a name that the guy put, they are not really Erigon nodes |
Just an idea: Wouldn't it be possible to create a patch/fix so that only one or two peers with the same remoteAddress (IP) are accepted at the same time? This way those evil nodes wouldn't be able to spam and block other nodes.... well unless they deploy on hundreds of servers with different IP addresses. |
thank you for you advice, we have applied it in some of the P2P nodes, may consider to raise a formal patch to limit the Max connection number per IP. |
I was looking into that and those Erigon nodes are useless mostly because they are not running bsc chain at all. A lot of them are eth nodes or other networks. Limiting IPs is partial solution, but there is PR #1320 |
Just a datapoint regarding PR #1320 - I installed it on one of my nodes for testing, the ratio of these fake peers to real peers is still at around 2:1, as it was before. |
could you provide logs of those peer, especially enodes so I could connect to them and debug but it |
I will try to collect some, will take a day or two though. Just to make sure there's no misunderstanding. I'm not saying that the patch doesn't work, just that it doesn't help for the fake peers. As far as I could see, all of them were incoming connections, so unaffected by your patch. |
Is there any news on this? I also applied PR #1320 and indeed there are fewer erigon nodes in the peer list now. However, there are still some and also a lot of other peers with same remote IP addresses (but with "geth" clients) which I think are fake nodes, too. |
Here is the peer list of one of our nodes, sorted by remote IP. |
What is the command you're using to dump the peers I want to try from my nodes as well. |
System information
Geth version:
geth v1.1.21
. // It is irrelevant to Geth versionOS & Version: Linux
Expected behavior
The P2P connection should be at a reasonable level, better not reach the up limit, defined by
MaxPeers
Actual behavior
MaxPeers has been set to 3500, but the P2P connection reached the up limit very soon.
I dump the peers list, found 2 weird things:
1.Erigon client takes ~2/3 of the peers;
2.Erigon client would keep tens of p2p connections with same IP address.
Attach the log of
admin.peers
admin_peers_1.log
Here is some screenshot from the log:
![image](https://user-images.githubusercontent.com/92799281/230551650-58271565-cb1e-44d9-94b1-3ee6ffe9309f.png)
![image](https://user-images.githubusercontent.com/92799281/230551672-17fb1c56-8dda-4cf8-8fa3-4504863c2162.png)
![image](https://user-images.githubusercontent.com/92799281/230551692-3a4d9bd5-36ea-4b1f-8077-3513aa853cd3.png)
Steps to reproduce the behavior
You should setup an public bsc node, let many other peers connect to you. And you can observe the connected peer list.
But may not easy to reproduce in you device, since we have famous P2P nodes, which is much likely to be connected.
Backtrace
NA
When submitting logs: please submit them as text and not screenshots.
The text was updated successfully, but these errors were encountered: