chore: upgrade go-waku

This commit is contained in:
Richard Ramos 2022-11-07 11:25:50 -04:00 committed by RichΛrd
parent bdbb9e2748
commit 91aac3cec0
8 changed files with 14 additions and 12 deletions

2
go.mod
View File

@ -51,7 +51,7 @@ require (
github.com/prometheus/client_golang v1.13.0
github.com/russolsen/transit v0.0.0-20180705123435-0794b4c4505a
github.com/status-im/doubleratchet v3.0.0+incompatible
github.com/status-im/go-waku v0.2.3-0.20221103135445-98745d9e9292
github.com/status-im/go-waku v0.2.3-0.20221107152343-98c3ca8dc60f
github.com/status-im/markdown v0.0.0-20220622180305-7ee4aa8bbc3f
github.com/status-im/migrate/v4 v4.6.2-status.2
github.com/status-im/rendezvous v1.3.6

4
go.sum
View File

@ -1958,8 +1958,8 @@ github.com/status-im/go-ethereum v1.10.25-status.3 h1:otbW2SCLmNNXAT8uqtrhxq0jRl
github.com/status-im/go-ethereum v1.10.25-status.3/go.mod h1:Dt4K5JYMhJRdtXJwBEyGZLZn9iz/chSOZyjVmt5ZhwQ=
github.com/status-im/go-multiaddr-ethv4 v1.2.4 h1:7fw0Y48TJXEqx4fOHlDOUiM/uBq9zG5w4x975Mjh4E0=
github.com/status-im/go-multiaddr-ethv4 v1.2.4/go.mod h1:PDh4D7h5CvecPIy0ji0rLNwTnzzEcyz9uTPHD42VyH4=
github.com/status-im/go-waku v0.2.3-0.20221103135445-98745d9e9292 h1:DpZ2gF6XFMqky5QdF1cOBL/KzXFAAI0/LdgDc1Hw0ec=
github.com/status-im/go-waku v0.2.3-0.20221103135445-98745d9e9292/go.mod h1:jILOqhyOtm3srE79ob53Ifi+dY+KRpzG5FuD2ZQ2IzU=
github.com/status-im/go-waku v0.2.3-0.20221107152343-98c3ca8dc60f h1:VrZZBXVciz38WdhKUbuE4gK9MJ1iWZ6tH8mylkEYGYE=
github.com/status-im/go-waku v0.2.3-0.20221107152343-98c3ca8dc60f/go.mod h1:jILOqhyOtm3srE79ob53Ifi+dY+KRpzG5FuD2ZQ2IzU=
github.com/status-im/go-watchdog v1.2.0-ios-nolibproc h1:BJwZEF7OVKaXc2zErBUAolFSGzwrTBbWnN8e/6MER5E=
github.com/status-im/go-watchdog v1.2.0-ios-nolibproc/go.mod h1:lzSbAl5sh4rtI8tYHU01BWIDzgzqaQLj6RcA1i4mlqI=
github.com/status-im/gomoji v1.1.3-0.20220213022530-e5ac4a8732d4 h1:CtobZoiNdHpx+xurFxnuJ1xsGm3oKMfcZkB3vmomJmA=

View File

@ -30,7 +30,7 @@ func HexArray(key string, byteVal ...[]byte) zapcore.Field {
func (bArr byteArr) MarshalLogArray(encoder zapcore.ArrayEncoder) error {
for _, b := range bArr {
encoder.AppendString(hex.EncodeToString(b))
encoder.AppendString("0x" + hex.EncodeToString(b))
}
return nil
}
@ -42,7 +42,7 @@ func HexString(key string, byteVal []byte) zapcore.Field {
}
func (h hexByte) String() string {
return hex.EncodeToString(h)
return "0x" + hex.EncodeToString(h)
}
// List of multiaddrs

View File

@ -226,7 +226,7 @@ func (wakuLP *WakuLightPush) PublishToTopic(ctx context.Context, message *pb.Wak
if response.IsSuccess {
hash, _, _ := message.Hash()
wakuLP.log.Info("received", logging.HexString("messageID", hash))
wakuLP.log.Info("waku.lightpush published", logging.HexString("hash", hash))
return hash, nil
} else {
return nil, errors.New(response.Info)

View File

@ -186,7 +186,7 @@ func (w *WakuRelay) PublishToTopic(ctx context.Context, message *pb.WakuMessage,
hash := pb.Hash(out)
w.log.Info("published", zap.String("messageID", hex.EncodeToString(hash)))
w.log.Info("waku.relay published", zap.String("hash", hex.EncodeToString(hash)))
return hash, nil
}
@ -345,7 +345,7 @@ func (w *WakuRelay) subscribeToTopic(t string, subscription *Subscription, sub *
envelope := waku_proto.NewEnvelope(wakuMessage, utils.GetUnixEpoch(), string(t))
w.log.Info("received", logging.HexString("messageID", envelope.Hash()))
w.log.Info("waku.relay received", logging.HexString("hash", envelope.Hash()))
if w.bcaster != nil {
w.bcaster.Submit(envelope)

View File

@ -479,7 +479,7 @@ func (store *WakuStore) Query(ctx context.Context, query Query, opts ...HistoryR
messageID, _, _ := m.Hash()
messageIDs = append(messageIDs, messageID)
}
store.log.Info("retrieved", logging.HexArray("messageIDs", messageIDs...))
store.log.Info("waku.store retrieved", logging.HexArray("hashes", messageIDs...))
result := &Result{
Messages: response.Messages,

2
vendor/modules.txt vendored
View File

@ -900,7 +900,7 @@ github.com/status-im/doubleratchet
# github.com/status-im/go-multiaddr-ethv4 v1.2.4
## explicit; go 1.18
github.com/status-im/go-multiaddr-ethv4
# github.com/status-im/go-waku v0.2.3-0.20221103135445-98745d9e9292
# github.com/status-im/go-waku v0.2.3-0.20221107152343-98c3ca8dc60f
## explicit; go 1.18
github.com/status-im/go-waku/logging
github.com/status-im/go-waku/waku/persistence

View File

@ -954,13 +954,15 @@ func (w *Waku) OnNewEnvelopes(envelope *wakuprotocol.Envelope, msgType common.Me
recvMessage := common.NewReceivedMessage(envelope, msgType)
envelopeErrors := make([]common.EnvelopeError, 0)
w.logger.Debug("received new envelope")
logger := w.logger.With(zap.String("hash", recvMessage.Hash().Hex()))
logger.Debug("received new envelope")
trouble := false
_, err := w.add(recvMessage)
if err != nil {
w.logger.Info("invalid envelope received", zap.Error(err))
logger.Info("invalid envelope received", zap.Error(err))
trouble = true
}