-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Replace ConnectedPoint
with Dialer
in libp2p_swarm::DialError::WrongPeerId
#2767
Comments
That sounds reasonable to me. Thanks @dmitry-markin for the detailed report. I am not going to work on this any time soon. I am happy to help you implement it though. Given your "maybe", are you still interested? |
Yes, I think I can look into it in a week or so. The one thing I worry about is that these changes will definitely break the API, and I don't know how to handle it. I.e, I can update substrate, but we need to somehow notify other clients. |
Given that this is not a subtle change, but a change at the type system, I think users will (a) notice early and (b) can consult the changelog to get more advice. In other words, I am not worried about the breaking API change @dmitry-markin. |
It seems the cause for To fix the API issue we can drop the
Another option is to keep I would go with the second option, but I don't understand whether we need to report the @mxinden what do you think? |
I've implemented the simplest solution in #2793. |
I would be in favor of doing as much as possible at compile time. Would splitting |
Yes, this seems reasonable, I'll check it. |
Hey @jxs Can I pick this issue? |
Hi @akaladarshi yes! that would be great, Thanks! 🚀 |
Description
Change the
endpoint
type toDialer
, extracting it fromConnectedPoint
.Motivation
Currently in case of
DialError
withWrongPeerId
theConnectedPoint
is returned, which can containListener
, which can't happen, because we are the dialing side. ReplacingConnectedPoint
withDialer
can help to resolve this ambiguity and eliminate client code assertions.ConnectedPoint
endpoint type inWrongPeerId
was introduced in this PR, which was merged here.The original discussion that lead to this issue is in the substrate PR that changes the error printed when we connect to a bootnode that provides a different than expected peer id.
Are you planning to do it yourself in a pull request?
Maybe.Yes.The text was updated successfully, but these errors were encountered: