Skip to content

Commit 4073317

Browse files
apollo_network: changed gossipsub configurations
1 parent f984528 commit 4073317

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

crates/apollo_network/src/mixed_behaviour.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
// TODO(shahak): Erase main_behaviour and make this a separate module.
22

3+
use std::time::Duration;
4+
35
use libp2p::identity::Keypair;
46
use libp2p::kad::store::MemoryStore;
57
use libp2p::swarm::behaviour::toggle::Toggle;
@@ -114,7 +116,7 @@ impl MixedBehaviour {
114116
gossipsub::MessageAuthenticity::Signed(keypair),
115117
gossipsub::ConfigBuilder::default()
116118
// TODO(shahak): try to reduce this bound.
117-
.max_transmit_size(1 << 34)
119+
.max_transmit_size(1 << 20).flood_publish(false).mesh_n_low(5).mesh_n(10).mesh_n_high(15).mesh_outbound_min(3).gossip_factor(0.0).gossip_lazy(0).gossip_retransimission(0).history_length(1).history_gossip(0).heartbeat_interval(Duration::from_millis(700)).duplicate_cache_time(Duration::from_secs(3))
118120
.build()
119121
.expect("Failed to build gossipsub config"),
120122
)

0 commit comments

Comments
 (0)