Closed decanus closed 3 years ago
This seems to come from info
method in wakunode2
. Did you check if the IP is logged correctly in peerInfo? See this line let listenStr = $peerInfo.addrs[0] & "/p2p/" & $peerInfo.peerId
- it might be that 0.0.0.0 is just the first address and not the one we want to print.
That is exactly right, @oskarth. The info
method returns the only announced peerInfo
address and that is the host address. Setting the host address requires configuring the --listen-address
option for the wakunode2
. Since this is missing from the configuration, the address defaults to 0.0.0.0.
I think the easiest solution, for now, is to modify the config by adding --listen-address=134.209.139.210
explicitly. I'm not sure where exactly this config lives (@jakubgs, perhaps you can direct me?) or if NAT should be configured for this host at all.
As far as I can tell there're no mechanisms implemented in nim-libp2p
to announce addresses other than the host address, such as for NAT purposes (also see this comment in nimbus-eth2
). For wakunode2
, though, we can (and should) advertise the external IP and port as the listening address. A (seeming) bug in the NAT setup code will currently cause the external port to default to 0
under any configuration. I'll investigate.
Since 134.209.139.210
is not visible to the host it should not be configured as the listen-address
, as host will attempt binding it to socket (thanks, @jakubgs). Will rather then proceed to make info
announce the external IP.
Side note: since the rpc-api
has been updated to the json-rpc-api
with accompanying method name changes, I'll also fix the infrastructure tasks affected.
Problem
It seems as though
waku_info
returns the wrong IP for a node. We are currently creating a node with the following paramters:notice the
--nat=extip:134.209.139.210
however upon calling thewaku_info
we get:This causes https://fleets.status.im to show incorrect data.
Acceptance Criteria
waku_info
returns correct information.