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
This commit is contained in:
vyzo 2020-08-27 21:12:38 +03:00
parent efd2129187
commit 20fbd66c90

View File

@ -235,7 +235,7 @@ func GossipSub(in GossipIn) (service *pubsub.PubSub, err error) {
PublishThreshold: -1000, PublishThreshold: -1000,
GraylistThreshold: -2500, GraylistThreshold: -2500,
AcceptPXThreshold: 1000, AcceptPXThreshold: 1000,
OpportunisticGraftThreshold: 5, OpportunisticGraftThreshold: 3.5,
}, },
), ),
pubsub.WithPeerScoreInspect(in.Sk.Update, 10*time.Second), 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.GossipSubDout = 0
pubsub.GossipSubDlazy = 1024 pubsub.GossipSubDlazy = 1024
pubsub.GossipSubGossipFactor = 0.5 pubsub.GossipSubGossipFactor = 0.5
pubsub.GossipSubPruneBackoff = 5 * time.Minute
// turn on PX // turn on PX
options = append(options, pubsub.WithPeerExchange(true)) options = append(options, pubsub.WithPeerExchange(true))
} }