From 6e4889d340c228ac4166ff6f05b5740970717a11 Mon Sep 17 00:00:00 2001 From: Jakub Sztandera Date: Thu, 27 Aug 2020 17:50:16 +0200 Subject: [PATCH 1/2] Don't fail if could not resolved drand dnsaddr Resolves https://github.com/filecoin-project/lotus/issues/3335 Signed-off-by: Jakub Sztandera --- node/modules/core.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/node/modules/core.go b/node/modules/core.go index 0305c737e..830bed501 100644 --- a/node/modules/core.go +++ b/node/modules/core.go @@ -94,7 +94,12 @@ func BuiltinBootstrap() (dtypes.BootstrapPeers, error) { } func DrandBootstrap(d dtypes.DrandConfig) (dtypes.DrandBootstrap, error) { - return addrutil.ParseAddresses(context.TODO(), d.Relays) + 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 { From b27ee8241a8c1381c34c1e1fe33a0f648c3b893f Mon Sep 17 00:00:00 2001 From: Jakub Sztandera Date: Thu, 27 Aug 2020 19:00:42 +0200 Subject: [PATCH 2/2] Add TODO note Signed-off-by: Jakub Sztandera --- node/modules/core.go | 1 + 1 file changed, 1 insertion(+) diff --git a/node/modules/core.go b/node/modules/core.go index 830bed501..d73e4e25d 100644 --- a/node/modules/core.go +++ b/node/modules/core.go @@ -94,6 +94,7 @@ func BuiltinBootstrap() (dtypes.BootstrapPeers, error) { } func DrandBootstrap(d dtypes.DrandConfig) (dtypes.DrandBootstrap, error) { + // 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)