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

swarm: re-introduce ConnectionHandler::{In,Out}boundOpenInfo #5858

Open
jxs opened this issue Feb 11, 2025 · 0 comments
Open

swarm: re-introduce ConnectionHandler::{In,Out}boundOpenInfo #5858

jxs opened this issue Feb 11, 2025 · 0 comments
Labels
tracking-issue Issues which are the entry point to bigger projects.

Comments

@jxs
Copy link
Member

jxs commented Feb 11, 2025

Description

With #3268 was decided to deprecate ConnectionHandler::{In,Out}boundOpenInfo.
#5242 made it official, but there's a bug with these deprecations:
storing the upgrade info in a VecDeque loses the order significance match they prevously had with StreamUpgrade.

Example with request-response after #3914 was merged:

  • Behaviour notifies handler with a request
  • Handler puts the request on requested_outbound and asks the Swarm for a OutboundSubstreamRequest
  • Handler receives a new FullyNegotiatedOutbound from the Swarm and pops the request from requested_outbound.

Problem:

the popped request may not match inserted request in requested_outbound and therefore the negotiated Protocol with the outbound peer as Swarm's negotiating_out is a FuturesUnordered.

This is specially problematic in the Ethereum consensus spec as the negotiated protocol matches the request type and the outbound peer ends up discarding the request as it doesn't match the protocol negotiated.

We should rollback the deprecation attributes of ConnectionHandler::{In,Out}boundOpenInfo at least
cc @elenaf9 @dariusc93

@jxs jxs added the tracking-issue Issues which are the entry point to bigger projects. label Feb 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tracking-issue Issues which are the entry point to bigger projects.
Projects
None yet
Development

No branches or pull requests

1 participant