waku-org / js-waku

JavaScript implementation of Waku v2
https://js.waku.org
Apache License 2.0
162 stars 41 forks source link

chore(peer-exchange): support updates of previously discovered peer's addresses #2051

Open danisharora099 opened 1 week ago

danisharora099 commented 1 week ago

This is a potential bug report

Problem

Based on https://github.com/waku-org/go-waku/pull/1128, it was found out that status-go runs into a problem where if a peer is discovered dynamically, perhaps using Peer Exchange, the peer is stored in the Peer Store with certain TTL. In case the peer is discovered again, in case with updated addresses, it is discarded because we assume that we already have knowledge about its information, but the addresses might be refreshed.

Proposed Solutions

Account for the change of addresses observed, when the same peer is discovered again in Peer Exchange