Skip to content

Hole-punch interop: circuit relay v2 hop streams and QUIC dial configuration #1304

@acul71

Description

@acul71

Context

Work was driven by the hole-punch-interop harness in libp2p/test-plans (Docker + rust-libp2p relay + artificial latency). TCP hole-punch paths could fail against the relay; QUIC showed handshake timeouts and aioquic logger errors.

Problems addressed

  1. Circuit relay v2 (client): Some relays (e.g. rust-libp2p) treat one HOP substream as a single exchange and close it after RESERVE. The client previously reused the same stream for CONNECT, which led to dropped streams / failed relay dials. After a successful client reservation, the transport should use a new stream to the relay for CONNECT.

  2. QUIC dial: The cached QuicConfiguration was mutated per dial (is_client, QuicLogger), causing shared-state races and aioquic errors such as QuicLoggerTrace does not belong to QuicLogger. Each dial should use a copy of the client config; tracing is disabled on that path (quic_logger = None) unless a per-dial logger is desired.

  3. Circuit v2 protobuf / discovery / tests: Align with current circuit v2 usage and update tests accordingly (including destination reservation behavior for CONNECT).

Follow-up

Harness-side changes (compose timeouts, test ordering, docs) remain in test-plans and are tracked separately.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions