-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: 0.0.0.0
included in listenAddrs
of identify message
#1427
Comments
Cc @Menduist. Not sure if it's nwaku usage of nim-libp2p or an issue on nim-libp2p side. |
How it currently works:
@fryorcraken can you confirm if you only see |
I have tested with the wakuv2 prod and test fleet and it looks like Which means it's only included when I run the node locally. When running locally, I thought I was simulating the original issue waku-org/js-waku#751 but with faster feedback loop (I could restart nwaku node instead of waiting 10min for TCP/WS to timeout). I'll have to resume investigations. IMO, As per RFC 1122, section 3.2.1.3 Addressing: RFC-791 Section 3.2:
As |
I can confirm that when it's ran locally:
The address Logs:
However, if I specify the listen address, then the address specified is included in the identify message, for example:
|
@fryorcraken revisiting expected behaviour here:
So perhaps the correct behaviour would be to not include any |
I agree with the reasoning.
Yes, sounds reasonable. Nothing would happen: the address that the js node used to dial the nwaku node would not be overridden and afaik, there would not be any error or ill effect. See usage of |
Just went over the Issue with @vpavlin. There's the case when "--nat=extip:..." is used, as the advertised address differs from "bindIP." It seems also that we are using "toRemotePeerInfo()" primarily for local and testing use and may not behave as expected when nodes communicate over the network, which could cause our current addressing issues. We are as well considering the possibility of relying on ENR as a means to get the peerId and addresses. It seems that there's lots of different addressing possibilities and we don't have a clear idea of for what purpose we should use each address source? @Menduist, could you please advise us on how to approach addressing? |
Weekly Update
|
Problem
When the identify protocol is execute between js-waku and nwaku v0.13.0, the nwaku peer includes a multiaddrs with
/ip4/0.0.0.0/...
in thelistenAddrs
field of the identify message.Note that js-libp2p uses
listenAddrs
whensignedPeerRecord
is not present in the identify message: https://github.com/libp2p/js-libp2p/blob/bae32bafce75a3801a7a96f77a9ccf43b3208f9c/src/identify/index.ts#L361AFAIK,
signedPeerRecord
is not use by nwaku.Note that according to libp2p dev, only valid addresses are expected:
0.0.0.0
address libp2p/js-libp2p#1484 (comment)Impact
This is the cause for waku-org/js-waku#751 which is the highest priority bug for js-waku
To reproduce
This happens for any connection, including connection to a local nwaku node or a wakuv2 prod fleet nwaku node.
debug=waku*,libp2p*
in local storagedial
You will see:
To get the
0.0.0.0
value it's trickier as you would need to use a modify version of js-llbp2p that logs the content of the identify message (see libp2p link in first section).Expected behavior
listenAddrs
only contains values that are expected to be reachable by remote nodesignedPeerRecord
is used or equivalent functionality in ENR format https://rfc.vac.dev/spec/31/nwaku version/commit hash
v0.13
The text was updated successfully, but these errors were encountered: