waku-org / go-waku

Go implementation of Waku v2 protocol
https://waku.org/
Other
119 stars 43 forks source link

bug: go-waku logs zone-sensitive time #1191

Closed igor-sirotin closed 2 months ago

igor-sirotin commented 3 months ago

Problem

Status user reported there're some logs that use local timezone, which exposes user's location. I fixed a few in status-go, but there're some in go-waku as well:

https://github.com/waku-org/go-waku/blob/19a47a1ac1f58de30cc3d987850f39633fc51711/waku/v2/peermanager/peer_connector.go#L210 https://github.com/waku-org/go-waku/blob/19a47a1ac1f58de30cc3d987850f39633fc51711/waku/v2/peermanager/peer_connector.go#L214 https://github.com/waku-org/go-waku/blob/19a47a1ac1f58de30cc3d987850f39633fc51711/waku/v2/peermanager/peer_connector.go#L231

Solution

When logging, we should always convert time to UTC.

igor-sirotin commented 3 months ago

cc @richard-ramos @chaitanyaprem

chaitanyaprem commented 2 months ago

@igor-sirotin included a fix in #1192 .

If we need this as part of current release, then i will create a PR for release branch cherry-picking this commit.

igor-sirotin commented 2 months ago

@chaitanyaprem thanks for the fix!

Though it's a simple fix, I don't like to harass cherry-picking that much. And I didn't cherry-pick this fix as well: https://github.com/status-im/status-go/pull/5672