Skip to content
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

Merged
merged 7 commits into from
Jan 18, 2022

Conversation

mxinden
Copy link
Member

@mxinden mxinden commented Jan 18, 2022

Replaces #2428.

rkuhn and others added 6 commits January 15, 2022 11:24
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>
@mxinden mxinden merged commit 4001b56 into libp2p:master Jan 18, 2022
@rkuhn
Copy link
Contributor

rkuhn commented Jan 19, 2022

Thanks a lot for pushing this over the line, @mxinden!

Copy link

@bkchr bkchr left a 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

Comment on lines +811 to +815
if self.local_id == obtained_peer_id {
Err(PendingConnectionError::WrongPeerId {
obtained: obtained_peer_id,
endpoint: endpoint.clone(),
})
Copy link

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

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

@tomaka tomaka Jun 20, 2022

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.

Copy link

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 🤷

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants