lighthouse
lighthouse copied to clipboard
Use the `mesh_n` value from `NetworkLoad` for `PeerScoreSettings`
Issue Addressed
We're using the libp2p default gs_config here for PeerScoreSettings:
https://github.com/sigp/lighthouse/blob/6c0c41c7acecbc4d149a3715eccae24d3d3de933/beacon_node/lighthouse_network/src/service/mod.rs#L180
and then we build a Lighthouse specific one here and use it for Gossipsub https://github.com/sigp/lighthouse/blob/6c0c41c7acecbc4d149a3715eccae24d3d3de933/beacon_node/lighthouse_network/src/service/mod.rs#L266-L273
The only value that is used for initialising PeerScoreSettings from the gs_config appears to be the mesh degree mesh_n, which is taken from NetworkLoad.
Proposed Changes
Build the correct gs_config and use the mesh_n value for PeerScoreSetttings.
Note that the score settings needs a bit of rework, so this would just be a temporary fix.
The impact of this fix is that scoring will now use the mesh_n from NetworkLoad (default to 4) rather than the libp2p2 hard coded value (6).
Marking this as work-in-progress as this PR is mainly for tracking and need some review from @AgeManning
@mergifyio queue
queue
✅ The pull request has been merged automatically
The pull request has been merged automatically at d30ba976a156d88d0bb734af03dbd81578f5834e