-
Notifications
You must be signed in to change notification settings - Fork 952
Re-assess Lighthouse's peer count for Fusaka #7877
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
Conversation
|
Overall I propose an initial increase to 200. Once we see how the network handles this, we consider an upgrade to 300 or 400 in a future release. |
Squashed commit of the following: commit 60ea5c6 Author: Age Manning <[email protected]> Date: Mon Aug 18 10:31:31 2025 +1000 Fmt commit 3f7f6fc Author: Age Manning <[email protected]> Date: Thu Aug 14 15:39:23 2025 +1000 Double lighthouse's peer count for Fusaka
jimmygchen
left a comment
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!
|
This pull request has been removed from the queue for the following reason: The merge conditions cannot be satisfied due to failing checks: You may have to fix your CI before adding the pull request to the queue again. |
# Conflicts: # beacon_node/src/config.rs
a3b09f9 to
aedbf75
Compare
Was going to leave this as a comment on #7877 but when noticed it had already been merged. we have `DEFAULT_TARGET_PEERS` which was set to 50 and only used on the `Default` impl for `peer_manager`'s `Config`, which then get's overridden by this `lighthouse_network::Config`s default This PR unifies everything on `DEFAULT_TARGET_PEERS`
Motivation
It is becoming clear that Fuska will benefit from a more connected network.
The requirement to download columns and the large number of columns require us to maintain quite a diverse peer set. We also need a diverse peer set for publishing attestations. Optimizing our peer-set becomes difficult when we are constrained by the maximum number of peers we can maintain connections with.
Lighthouse (and the overall Ethereum network) gains stability when there are more connections between peers allowing us to discover and maintain a more diverse peer set to satisfy the custody and subnet requirements.
I'm therefore proposing to doubling Lighthouse's default peer count to 200.
Justification
The downside of increasing a node's peer-count is simply resource consumption. More connected peers, means that a node needs to support more RPC requests and handle a great gossipsub load. This results in bandwidth, memory and CPU increases. However the increase is not linear as one might expect. Gossipsub bounds the number of peers that consume the most bandwidth and increasing out peer count doesn't increase the number of these peers. These are controlled by the mesh parameters.
Therefore increasing out peer count won't linearly increase our resource consumption. A greater increase in peer count should (theoretically) result in a minimal increase in bandwidth and subsequent cpu/memory use. As the stability and performance in a Fusaka network is significantly more important to us than an increase in resource use, I think it's justified for us to make this trade-off.
Analysis
I'll add more analysis as we go. But preliminary results look like:
100 Peers (Current default)
For our default 100 peer target (running over an hour on mainnet and calculating averages):
This PR 200 Peers (slight gossip modifications)
Comparison
Preliminary Results
Preliminary results show marginal cost to bandwidth and about a 10% increase in memory usage. Although this looks fairly promising I'll collect more data for a more informed decision. For the gains in stability, I think this looks promising and worth the extra resource consumption.
Also, users can always lower their peer counts via
--target-peersif the resource usage is getting too high for them.