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

Add ConnectionId in Identify events #4980

Closed
stormshield-frb opened this issue Dec 5, 2023 · 0 comments · Fixed by #4981
Closed

Add ConnectionId in Identify events #4980

stormshield-frb opened this issue Dec 5, 2023 · 0 comments · Fixed by #4981

Comments

@stormshield-frb
Copy link
Contributor

Description

Add a field connection_id in protocols/identify/src/behaviour.rs:Event so we can map the received event to the corresponding connection.

Motivation

In order to identify which connection has been used to receive Identify::Event and to react on it, we need to have access to the ConnectionId so that we can have access to the ConnectionInfo of the corresponding connection.

Moreover, for debugging and logging purposes it would be very helpful.

Some events do sometimes have the connection_id field (ping, dht, dctur) but other do not (identify, request_response, ...). Maybe that is something that could be uniformized across behaviours. If so, we would be open to work and participate on this, but it might be a different issue.

Current Implementation

We cannot access the ConnectionId identifying were the Identify event came from.

Are you planning to do it yourself in a pull request ?

Yes

mergify bot pushed a commit that referenced this issue Jun 20, 2024
@mergify mergify bot closed this as completed in #4981 Jun 20, 2024
TimTinkers pushed a commit to unattended-backpack/rust-libp2p that referenced this issue Sep 14, 2024
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 a pull request may close this issue.

1 participant