-
Notifications
You must be signed in to change notification settings - Fork 281
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
AutoNAT: Clarify cases in which response status E_DIAL_ERROR
should be returned
#411
Comments
I agree that it should be a We can clarify this in the spec, however, we can't change the way that already deployed Go implementations behave. This means that probing a single address won't be possible until all nodes have upgraded (which, at the current speed of upgrades in the IPFS network means a couple of years). This was one of the reasons for Autonat v2 proposal. |
I think if we agree that |
I am in favor of this. |
@elenaf9 Let's do it! And add a comment that we can't rely on this error code since all versions before v0.20.0 sent the wrong error code. |
I don't follow. Wouldn't you be able to set the dial message to have only one address? I think this change could be backwards compatible since older nodes only check if the response was OK or not. https://github.com/libp2p/go-libp2p/blob/393e3518b397a1ae88fd825c85f892956868543f/p2p/host/autonat/client.go#L79 |
I should have been more precise. A positive response will be actionable, but when you receive a DialError, you don't know if that's because the peer tried to dial you and failed, or the peer just didn't support the transport (for example). |
Closing this since we agree that there is only one case in which |
Follow up on libp2p/rust-libp2p#2618 (comment).
Concerning the ResponseStatus E_DIAL_ERROR, the AutoNAT spec currently only states that:
However, the Go implementation also returns
DialError
s without even trying to the dial a remote peer. Concretely, this happens whenskip_dial
returns true for the client's observed address, which is the case if it is e.g. a relayed or private address.I don't think that this should count as an dial error since the server never actually tried to dial the client. Instead a
DialRefused
should be returned (which would also match the returned status_text "refusing to dial peer with blocked observed address").If folks disagree and are in favor of returning a
DialError
, this should be part of the spec.The text was updated successfully, but these errors were encountered: