From d62a5736a512bdb3b9d2810e0f8e03311a121ad1 Mon Sep 17 00:00:00 2001 From: Richard Ramos Date: Fri, 25 Aug 2023 13:02:13 -0400 Subject: [PATCH] fix: return default pubsub topic, and add more logs --- VERSION | 2 +- protocol/transport/transport.go | 8 +------- wakuv2/waku.go | 6 +++++- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/VERSION b/VERSION index 0099ed871..ce8af6cf0 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.165.2 +0.165.3 diff --git a/protocol/transport/transport.go b/protocol/transport/transport.go index b611b8782..ecf14a44f 100644 --- a/protocol/transport/transport.go +++ b/protocol/transport/transport.go @@ -673,11 +673,5 @@ func (t *Transport) StorePubsubTopicKey(topic string, privKey *ecdsa.PrivateKey) } func GetPubsubTopic(communityID []byte) string { - // TODO: remove hardcoded pubsub topic and use shard - result := "/waku/2/status-signed-test-1" - if communityID == nil { - result = relay.DefaultWakuTopic - } - - return result + return relay.DefaultWakuTopic } diff --git a/wakuv2/waku.go b/wakuv2/waku.go index e765bda52..e4d4c3f1f 100644 --- a/wakuv2/waku.go +++ b/wakuv2/waku.go @@ -1230,6 +1230,8 @@ func (w *Waku) Start() error { return fmt.Errorf("failed to start go-waku node: %v", err) } + w.logger.Info("WakuV2 PeerID", zap.Stringer("id", w.node.Host().ID())) + idService, err := identify.NewIDService(w.node.Host()) if err != nil { return err @@ -1833,7 +1835,7 @@ func (w *Waku) subscribeToFilter(f *common.Filter) error { for i := 0; i < len(peers) && i < w.settings.MinPeersForFilter; i++ { subDetails, err := w.node.FilterLightnode().Subscribe(w.ctx, contentFilter, filter.WithPeer(peers[i])) if err != nil { - w.logger.Warn("could not add wakuv2 filter for peer", zap.Any("peer", peers[i])) + w.logger.Warn("could not add wakuv2 filter for peer", zap.Stringer("peer", peers[i])) continue } @@ -1844,6 +1846,8 @@ func (w *Waku) subscribeToFilter(f *common.Filter) error { } subMap[subDetails.ID] = subDetails go w.runFilterSubscriptionLoop(subDetails) + + w.logger.Info("wakuv2 filter subscription success", zap.Stringer("peer", peers[i]), zap.String("pubsubTopic", contentFilter.Topic), zap.Strings("contentTopics", contentFilter.ContentTopics)) } } else {