From 20fbd66c90d42053f5edfe3f02d3ef4df4263c57 Mon Sep 17 00:00:00 2001 From: vyzo Date: Thu, 27 Aug 2020 21:12:38 +0300 Subject: [PATCH] tweak some pubsub parameters - increase Bootstapp prune backoff to 5min from the default 1min - reduce opportunistic graft threshold to 3.5 to account for low peer scores --- node/modules/lp2p/pubsub.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/node/modules/lp2p/pubsub.go b/node/modules/lp2p/pubsub.go index f847cf7ad..c7fb5123a 100644 --- a/node/modules/lp2p/pubsub.go +++ b/node/modules/lp2p/pubsub.go @@ -235,7 +235,7 @@ func GossipSub(in GossipIn) (service *pubsub.PubSub, err error) { PublishThreshold: -1000, GraylistThreshold: -2500, AcceptPXThreshold: 1000, - OpportunisticGraftThreshold: 5, + OpportunisticGraftThreshold: 3.5, }, ), pubsub.WithPeerScoreInspect(in.Sk.Update, 10*time.Second), @@ -251,6 +251,7 @@ func GossipSub(in GossipIn) (service *pubsub.PubSub, err error) { pubsub.GossipSubDout = 0 pubsub.GossipSubDlazy = 1024 pubsub.GossipSubGossipFactor = 0.5 + pubsub.GossipSubPruneBackoff = 5 * time.Minute // turn on PX options = append(options, pubsub.WithPeerExchange(true)) }