diff --git a/waku/v2/node/wakunode2.go b/waku/v2/node/wakunode2.go index 25ca5697b..7b44b35ac 100644 --- a/waku/v2/node/wakunode2.go +++ b/waku/v2/node/wakunode2.go @@ -740,6 +740,20 @@ func (w *WakuNode) connect(ctx context.Context, info peer.AddrInfo) error { return err } + for _, addr := range info.Addrs { + // TODO: this is a temporary fix + // host.Connect adds the addresses with a TempAddressTTL + // however, identify will filter out all non IP addresses + // and expire all temporary addrs. So in the meantime, let's + // store dns4 addresses with a connectedAddressTTL, otherwise + // it will have trouble with the status fleet circuit relay addresses + // See https://github.com/libp2p/go-libp2p/issues/2550 + _, err := addr.ValueForProtocol(ma.P_DNS4) + if err == nil { + w.host.Peerstore().AddAddrs(info.ID, info.Addrs, peerstore.ConnectedAddrTTL) + } + } + w.host.Peerstore().(wps.WakuPeerstore).ResetConnFailures(info) w.metrics.RecordDial()