-
Notifications
You must be signed in to change notification settings - Fork 439
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
Autodialer uses 0.0.0.0
address
#1484
Comments
Investigation so far: I can see that
0.0.0.0 ip.
I am logging it as soon as it is set: On first dial:
On redial (by killing other libp2p node)
|
One step earlier,
When logging what is returned by the address book at
So it means that the right address is never added to the address book (but it is present in the peer store when I do |
More investigation:
This
So I am guessing the issue is that something sets it to Full logs: console-export-2022-11-21_16-16-16.txt |
Ok, found the issue: js-libp2p/src/identify/index.ts Line 365 in a74d22a
As this is part of the identify protocol. It means that somehow we are already connected to the remote peer. Hence, if there is no signed peer record, is it really best for a Identify message:
I believe I can solve my problem by changing the Also, I changed my handling of peer discovered by adding the mulitaddrs to the address book first:
|
Identify protocol being executed it means that both peers are somehow connected. Hence, it should not override working multiaddresses but only add to it. Fixes libp2p#1484
Confirmed that no issue redialing with this fix: #1485 |
Signed peer records exist so I can (for example) as peer A, receive a record from peer B and give it to peer C. Since the record is signed by peer B's key, peer C does not need to trust me. During identify you only receive addresses directly from the remote peer. It's not in the remote peer's interest to send you false addresses as you'll then not be able to dial it later on. Bad addresses could be part of the signed record too, of course. Could you dig in to where the |
Thank you @achingbrain. I agree with your statement and that the isue is more likely to be the remote peer sending Other implementation is nwaku/nim-libp2p. Will follow-up on this side. I can see that a |
Issue reported upstream: waku-org/nwaku#1427. I am happy to close this or keep it open until it's 100% clarified but explanation provided for js-libp2p's behaviour seems fair. |
Oops, seems like we needed more information for this issue, please comment with more details or this issue will be closed in 7 days. |
This issue was closed because it is missing author input. |
Version:
0.40.0
Platform: Firefox 106.0.4 (64-bit) Fedora Linux
Subsystem:
AutoDialler
/Dialer
/Websocket
Severity: High
Description:
Using libp2p with websockets in the browser, connecting to remote peer:
Goes fine, after ~10min the websocket connection drops.
I can see that the autodialer kicks in and try to re-dial the target. However, instead of using the known multiaddr, the multiaddr gets replaced by
0.0.0.0
in the process:Steps to reproduce the error:
I have not yet been able to have a minimal reproduction repository. I have tried to investigate the issue but I see a lot of refactoring has happen so I need to get familiar with the new code.
The text was updated successfully, but these errors were encountered: