Merge remote-tracking branch 'origin/master' into fix/some-fsm-issues

This commit is contained in:
Łukasz Magiera
2020-08-28 16:47:25 +02:00
23 changed files with 415 additions and 342 deletions
+7 -1
View File
@@ -94,7 +94,13 @@ func BuiltinBootstrap() (dtypes.BootstrapPeers, error) {
}
func DrandBootstrap(d dtypes.DrandConfig) (dtypes.DrandBootstrap, error) {
return addrutil.ParseAddresses(context.TODO(), d.Relays)
// TODO: retry resolving, don't fail if at least one resolve succeeds
addrs, err := addrutil.ParseAddresses(context.TODO(), d.Relays)
if err != nil {
log.Errorf("reoslving drand relays addresses: %+v", err)
return nil, nil
}
return addrs, nil
}
func SetupJournal(lr repo.LockedRepo) error {
+2 -1
View File
@@ -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))
}