Use the mesh_n value from NetworkLoad for PeerScoreSettings (#5013)

* Build `gs_config` and use the `mesh_n` config for `PeerScoreSettings`

* Remove unused imports

* Merge branch 'unstable' into peer-score-settings

# Conflicts:
#	beacon_node/lighthouse_network/src/config.rs
#	beacon_node/lighthouse_network/src/service/gossipsub_scoring_parameters.rs
#	beacon_node/lighthouse_network/src/service/mod.rs
This commit is contained in:
Jimmy Chen
2024-04-12 06:14:15 +10:00
committed by GitHub
parent 7e49f82726
commit d30ba976a1
4 changed files with 19 additions and 40 deletions

View File

@@ -69,10 +69,6 @@ pub struct Config {
/// Target number of connected peers.
pub target_peers: usize,
/// Gossipsub configuration parameters.
#[serde(skip)]
pub gs_config: gossipsub::Config,
/// Discv5 configuration parameters.
#[serde(skip)]
pub discv5_config: discv5::Config,
@@ -278,12 +274,6 @@ impl Default for Config {
.join(DEFAULT_BEACON_NODE_DIR)
.join(DEFAULT_NETWORK_DIR);
// Note: Using the default config here. Use `gossipsub_config` function for getting
// Lighthouse specific configuration for gossipsub.
let gs_config = gossipsub::ConfigBuilder::default()
.build()
.expect("valid gossipsub configuration");
// Discv5 Unsolicited Packet Rate Limiter
let filter_rate_limiter = Some(
discv5::RateLimiterBuilder::new()
@@ -336,7 +326,6 @@ impl Default for Config {
enr_quic6_port: None,
enr_tcp6_port: None,
target_peers: 100,
gs_config,
discv5_config,
boot_nodes_enr: vec![],
boot_nodes_multiaddr: vec![],