From 924ba6621853151849853f8b66ebccd21cdfe663 Mon Sep 17 00:00:00 2001 From: divma Date: Thu, 6 Aug 2020 00:04:33 +0000 Subject: [PATCH] Update v0.12.2 gossip params (#1449) ## Issue Addressed #1422 --- beacon_node/eth2_libp2p/src/config.rs | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/beacon_node/eth2_libp2p/src/config.rs b/beacon_node/eth2_libp2p/src/config.rs index 288fff227..fa4ec9792 100644 --- a/beacon_node/eth2_libp2p/src/config.rs +++ b/beacon_node/eth2_libp2p/src/config.rs @@ -95,11 +95,18 @@ impl Default for Config { // parameter. let gs_config = GossipsubConfigBuilder::new() .max_transmit_size(GOSSIP_MAX_SIZE) - .heartbeat_interval(Duration::from_secs(1)) + .heartbeat_interval(Duration::from_millis(700)) + .mesh_n(6) + .mesh_n_low(5) + .mesh_n_high(12) + .gossip_lazy(6) + .fanout_ttl(Duration::from_secs(60)) + .history_length(6) + .history_gossip(3) .validate_messages() // require validation before propagation .validation_mode(ValidationMode::Permissive) - // Prevent duplicates by caching messages from an epoch + 1 slot amount of time (33*12) - .duplicate_cache_time(Duration::from_secs(396)) + // prevent duplicates for 550 heartbeats(700millis * 550) = 385 secs + .duplicate_cache_time(Duration::from_secs(385)) .message_id_fn(gossip_message_id) .build();