diff --git a/node/modules/lp2p/pubsub.go b/node/modules/lp2p/pubsub.go index d81133f81..90c56f20d 100644 --- a/node/modules/lp2p/pubsub.go +++ b/node/modules/lp2p/pubsub.go @@ -278,12 +278,28 @@ func GossipSub(in GossipIn) (service *pubsub.PubSub, err error) { } // validation queue RED - options = append(options, pubsub.WithPeerGater( - pubsub.DefaultPeerGaterParams().WithTopicDeliveryWeights(map[string]float64{ - drandTopic: 5, - build.BlocksTopic(in.Nn): 10, - build.MessagesTopic(in.Nn): 1, - }))) + pgTopicWeights := map[string]float64{ + drandTopic: 5, + build.BlocksTopic(in.Nn): 10, + build.MessagesTopic(in.Nn): 1, + } + var pgParams *pubsub.PeerGaterParams + + if isBootstrapNode { + pgParams = pubsub.NewPeerGaterParams( + 0.33, + pubsub.ScoreParameterDecay(2*time.Minute), + pubsub.ScoreParameterDecay(10*time.Minute), + ).WithTopicDeliveryWeights(pgTopicWeights) + } else { + pgParams = pubsub.NewPeerGaterParams( + 0.33, + pubsub.ScoreParameterDecay(2*time.Minute), + pubsub.ScoreParameterDecay(time.Hour), + ).WithTopicDeliveryWeights(pgTopicWeights) + } + + options = append(options, pubsub.WithPeerGater(pgParams)) // tracer if in.Cfg.RemoteTracer != "" {