Use the mesh_n
value from NetworkLoad
for PeerScoreSettings
#5013
+19
−40
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue Addressed
We're using the libp2p default
gs_config
here forPeerScoreSettings
:lighthouse/beacon_node/lighthouse_network/src/service/mod.rs
Line 180 in 6c0c41c
and then we build a Lighthouse specific one here and use it for Gossipsub
lighthouse/beacon_node/lighthouse_network/src/service/mod.rs
Lines 266 to 273 in 6c0c41c
The only value that is used for initialising
PeerScoreSettings
from thegs_config
appears to be the mesh degreemesh_n
, which is taken fromNetworkLoad
.Proposed Changes
Build the correct
gs_config
and use themesh_n
value forPeerScoreSetttings
.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
fromNetworkLoad
(default to4
) rather than the libp2p2 hard coded value (6
).