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

feat(swarm): add peer_id to ListenFailure #4818

Merged
merged 3 commits into from
Jun 13, 2024

Conversation

nathanielc
Copy link
Contributor

@nathanielc nathanielc commented Nov 7, 2023

Description

It's possible in certain failure modes to know the peer_id of a failed incoming connection. For example when an inbound connection has been negotiated/upgraded but then rejected locally for a connection limit or similar reason. In these cases it makes sense to communicate the peer_id to behaviours in case they have created any internal state about the peer.

Related #4777

Notes & open questions

Change checklist

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • A changelog entry has been made in the appropriate crates

Copy link
Contributor

@thomaseizinger thomaseizinger left a comment

Choose a reason for hiding this comment

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

Thanks! This is a breaking change so'll have to hold off on it for a while. I hope that is okay. #4777 is not blocked on this as far as I understand because ConnectionIds are unique across peers so we should be able to clean up state properly!

protocols/request-response/src/lib.rs Outdated Show resolved Hide resolved
@thomaseizinger thomaseizinger added this to the v0.54.0 milestone Nov 9, 2023
@thomaseizinger thomaseizinger marked this pull request as draft November 9, 2023 01:26
It's possible in certain failure modes to know the peer_id of a failed incoming connection.
For example when an inbound connection has been negotiated/upgraded but then rejected locally
for a connection limit or similar reason. In these cases it makes sense to communicate
the peer_id to behaviours in case they have created any internal state about the peer.
@nathanielc
Copy link
Contributor Author

This is a breaking change so'll have to hold off on it for a while. I hope that is okay.

Yep all good,no rush on this feature from us.

@thomaseizinger thomaseizinger changed the title feat(swarm): add peer_id to ListenFailure feat(swarm): add peer_id to ListenFailure Nov 10, 2023
Copy link
Contributor

mergify bot commented Dec 18, 2023

This pull request has merge conflicts. Could you please resolve them @nathanielc? 🙏

@jxs jxs force-pushed the feat/listenfailure-peer-id branch from 7f95df7 to 560a12a Compare June 13, 2024 10:18
@jxs jxs marked this pull request as ready for review June 13, 2024 10:36
Copy link
Member

@jxs jxs left a comment

Choose a reason for hiding this comment

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

Thanks!

@jxs jxs added the send-it label Jun 13, 2024
@mergify mergify bot merged commit 43524e7 into libp2p:master Jun 13, 2024
72 checks passed
TimTinkers pushed a commit to unattended-backpack/rust-libp2p that referenced this pull request Sep 14, 2024
It's possible in certain failure modes to know the peer_id of a failed incoming connection. For example when an inbound connection has been negotiated/upgraded but then rejected locally for a connection limit or similar reason. In these cases it makes sense to communicate the peer_id to behaviours in case they have created any internal state about the peer.

Related libp2p#4777

Pull-Request: libp2p#4818.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants