-
Notifications
You must be signed in to change notification settings - Fork 941
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
*: Rework reporting of invalid and wrong PeerIds #2441
Conversation
Previously, the negotiated PeerId was included in the swarm event and inject_dial_failure’s arguments while the expected one was absent. This patch adds the negotiated PeerId to the DialError and includes the expected one in the notifications.
Co-authored-by: Max Inden <mail@max-inden.de>
also add changelog entries
Thanks a lot for pushing this over the line, @mxinden! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general I think this pr broke something. We have this check that prints a warning when we connect to a bootnode and that provides a different than expected peer id. Any idea what could be broken. See the following issue: paritytech/substrate#11709
if self.local_id == obtained_peer_id { | ||
Err(PendingConnectionError::WrongPeerId { | ||
obtained: obtained_peer_id, | ||
endpoint: endpoint.clone(), | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is that a WrongPeerId
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CC @mxinden
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're connecting to yourself, which isn't allowed. It's true that the error is unclear, but this was an InvalidPeerId
error before this PR and in general has been an error for a very long time now, so I don't see how this specific change could have broken anything.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I also looked over this changeset and didn't find anything that could cause the issue we are seeing. However, I think that after the corresponding libp2p update in Substrate this error started to appear. There is also some internal parity devops issue about the Kusama bootnodes reporting a wrong peerid, but devops assured to me multiple times that all keys are correct. So yeah, I'm assuming now that maybe something changed it libp2p 🤷
Replaces #2428.