use faster decay for bootstrappers
This commit is contained in:
parent
219c8b927d
commit
0d0dd250ee
@ -278,12 +278,28 @@ func GossipSub(in GossipIn) (service *pubsub.PubSub, err error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// validation queue RED
|
// validation queue RED
|
||||||
options = append(options, pubsub.WithPeerGater(
|
pgTopicWeights := map[string]float64{
|
||||||
pubsub.DefaultPeerGaterParams().WithTopicDeliveryWeights(map[string]float64{
|
drandTopic: 5,
|
||||||
drandTopic: 5,
|
build.BlocksTopic(in.Nn): 10,
|
||||||
build.BlocksTopic(in.Nn): 10,
|
build.MessagesTopic(in.Nn): 1,
|
||||||
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
|
// tracer
|
||||||
if in.Cfg.RemoteTracer != "" {
|
if in.Cfg.RemoteTracer != "" {
|
||||||
|
Loading…
Reference in New Issue
Block a user