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

fix issue: inscrease max peers count and use p2p.peers.hi as maxPeers instead #255

Merged
merged 3 commits into from
Mar 26, 2024

Conversation

ping-ke
Copy link
Collaborator

@ping-ke ping-ke commented Mar 23, 2024

As we will have more than 100 nodes in the public testnet, we can increase the maxPeers to a larger number like 70 (prysm set this number to 70).
As the code uses p2p.peers.lo and p2p.peers.hi to set up libp2p connection manager, so when peers count larger than p2p.peers.hi, some connections (peer count - p2p.peers.lo) would disconnect at the same time.

How to test

run es-node to join the public testnet, and the peer count joins the local node should not be larger than 70, and when the peer count reaches 70, multi-connections (peer count - p2p.peers.lo) disconnect in a short time.

@ping-ke ping-ke requested review from qizhou, qzhodl and syntrust March 23, 2024 08:50
@qzhodl
Copy link
Collaborator

qzhodl commented Mar 25, 2024

As we will have more than 100 nodes in the public testnet, we can increase the maxPeers to a larger number like 60. As the code uses p2p.peers.lo and p2p.peers.hi to set up libp2p connection manager, so when peers count larger than p2p.peers.lo , some connections (peer count - p2p.peers.lo) would disconnect in the same time.

How to test

run es-node to join the public testnet, and the peer count joins the local node should not be larger than 60, and no multi-connections disconnect in a short time.

I think the right description is "when peers count larger than p2p.peers.hi , some connections (peer count - p2p.peers.lo) would disconnect in the same time"?

Copy link
Collaborator

@qzhodl qzhodl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@ping-ke ping-ke changed the title fix issue: inscrease max peers count and use p2p.peers.lo as maxPeers instead of p2p.peers.hi, fix issue: inscrease max peers count and use p2p.peers.hi as maxPeers instead Mar 25, 2024
@ping-ke ping-ke merged commit 5c85b23 into main Mar 26, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants