Skip to content

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

Closed
@jxs

Description

@jxs

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    tracking-issueIssues which are the entry point to bigger projects.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions