Skip to content

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
@ping-ke ping-ke deleted the issue237 branch September 11, 2025 09:10
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.

4 participants