Disable flood publishing (#4383)
* Disable flood publish * Change default configuration
This commit is contained in:
parent
78ffa378b4
commit
69f1b7afec
@ -363,7 +363,7 @@ impl Default for Config {
|
|||||||
disable_discovery: false,
|
disable_discovery: false,
|
||||||
disable_quic_support: false,
|
disable_quic_support: false,
|
||||||
upnp_enabled: true,
|
upnp_enabled: true,
|
||||||
network_load: 3,
|
network_load: 4,
|
||||||
private: false,
|
private: false,
|
||||||
subscribe_all_subnets: false,
|
subscribe_all_subnets: false,
|
||||||
import_all_attestations: false,
|
import_all_attestations: false,
|
||||||
@ -422,7 +422,7 @@ impl From<u8> for NetworkLoad {
|
|||||||
mesh_n_high: 10,
|
mesh_n_high: 10,
|
||||||
gossip_lazy: 3,
|
gossip_lazy: 3,
|
||||||
history_gossip: 3,
|
history_gossip: 3,
|
||||||
heartbeat_interval: Duration::from_millis(700),
|
heartbeat_interval: Duration::from_millis(1000),
|
||||||
},
|
},
|
||||||
4 => NetworkLoad {
|
4 => NetworkLoad {
|
||||||
name: "Average",
|
name: "Average",
|
||||||
@ -432,7 +432,7 @@ impl From<u8> for NetworkLoad {
|
|||||||
mesh_n_high: 12,
|
mesh_n_high: 12,
|
||||||
gossip_lazy: 3,
|
gossip_lazy: 3,
|
||||||
history_gossip: 3,
|
history_gossip: 3,
|
||||||
heartbeat_interval: Duration::from_millis(700),
|
heartbeat_interval: Duration::from_millis(1000),
|
||||||
},
|
},
|
||||||
// 5 and above
|
// 5 and above
|
||||||
_ => NetworkLoad {
|
_ => NetworkLoad {
|
||||||
@ -443,7 +443,7 @@ impl From<u8> for NetworkLoad {
|
|||||||
mesh_n_high: 15,
|
mesh_n_high: 15,
|
||||||
gossip_lazy: 5,
|
gossip_lazy: 5,
|
||||||
history_gossip: 6,
|
history_gossip: 6,
|
||||||
heartbeat_interval: Duration::from_millis(500),
|
heartbeat_interval: Duration::from_millis(700),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -506,6 +506,7 @@ pub fn gossipsub_config(
|
|||||||
.gossip_lazy(load.gossip_lazy)
|
.gossip_lazy(load.gossip_lazy)
|
||||||
.fanout_ttl(Duration::from_secs(60))
|
.fanout_ttl(Duration::from_secs(60))
|
||||||
.history_length(12)
|
.history_length(12)
|
||||||
|
.flood_publish(false)
|
||||||
.max_messages_per_rpc(Some(500)) // Responses to IWANT can be quite large
|
.max_messages_per_rpc(Some(500)) // Responses to IWANT can be quite large
|
||||||
.history_gossip(load.history_gossip)
|
.history_gossip(load.history_gossip)
|
||||||
.validate_messages() // require validation before propagation
|
.validate_messages() // require validation before propagation
|
||||||
|
Loading…
Reference in New Issue
Block a user