waku-org / nwaku

Waku node and protocol.
Other
203 stars 54 forks source link

bug: testing peer manager using 0.0.0.0 and port 0 unexpected behavior #2265

Open SionoiS opened 12 months ago

SionoiS commented 12 months ago

Problem

In this test -> test_peer_manager.nim "Peer manager can use persistent storage and survive restarts"

When nodes use 0.0.0.0 and port 0, manually connecting to one (with the correct address), the peer store is updated with the wrong address for that peer.

Impact

It may indicate a deeper problem and is annoying for tests.

gabrielmer commented 10 months ago

Took a look and seems to be related to https://github.com/waku-org/nwaku/issues/2359

When creating a WakuNode directly with port 0 the internal data structures don't get properly updated. Currently that logic gets triggered from the application layer. Once we decouple both it should be easier for testing.

I'll take care of it :)