Skip to content

Commit

Permalink
Disable flood publishing (#4383)
Browse files Browse the repository at this point in the history
* Disable flood publish

* Change default configuration
  • Loading branch information
AgeManning authored Dec 11, 2023
1 parent 78ffa37 commit 69f1b7a
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions beacon_node/lighthouse_network/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ impl Default for Config {
disable_discovery: false,
disable_quic_support: false,
upnp_enabled: true,
network_load: 3,
network_load: 4,
private: false,
subscribe_all_subnets: false,
import_all_attestations: false,
Expand Down Expand Up @@ -422,7 +422,7 @@ impl From<u8> for NetworkLoad {
mesh_n_high: 10,
gossip_lazy: 3,
history_gossip: 3,
heartbeat_interval: Duration::from_millis(700),
heartbeat_interval: Duration::from_millis(1000),
},
4 => NetworkLoad {
name: "Average",
Expand All @@ -432,7 +432,7 @@ impl From<u8> for NetworkLoad {
mesh_n_high: 12,
gossip_lazy: 3,
history_gossip: 3,
heartbeat_interval: Duration::from_millis(700),
heartbeat_interval: Duration::from_millis(1000),
},
// 5 and above
_ => NetworkLoad {
Expand All @@ -443,7 +443,7 @@ impl From<u8> for NetworkLoad {
mesh_n_high: 15,
gossip_lazy: 5,
history_gossip: 6,
heartbeat_interval: Duration::from_millis(500),
heartbeat_interval: Duration::from_millis(700),
},
}
}
Expand Down Expand Up @@ -506,6 +506,7 @@ pub fn gossipsub_config(
.gossip_lazy(load.gossip_lazy)
.fanout_ttl(Duration::from_secs(60))
.history_length(12)
.flood_publish(false)
.max_messages_per_rpc(Some(500)) // Responses to IWANT can be quite large
.history_gossip(load.history_gossip)
.validate_messages() // require validation before propagation
Expand Down

0 comments on commit 69f1b7a

Please sign in to comment.