Skip to content

fix(relay): new HOP stream for CONNECT after RESERVE (hole-punch interop) - #1476

Open
acul71 wants to merge 2 commits into
mainfrom
fix/circuit-v2-hop-stream-after-reserve-1304
Open

fix(relay): new HOP stream for CONNECT after RESERVE (hole-punch interop)#1476
acul71 wants to merge 2 commits into
mainfrom
fix/circuit-v2-hop-stream-after-reserve-1304

Conversation

@acul71

@acul71 acul71 commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

Summary

Fixes #1304 (remaining hop-stream item). Replaces closed #1305.

Some relays (e.g. rust-libp2p) treat one HOP substream as a single exchange and finish it after RESERVE. The client still reused that stream for CONNECT, which broke hole-punch / relay dials against those relays.

When enable_client runs a reservation exchange, close that stream and open a new HOP stream for CONNECT. If client reservation is disabled, keep the existing single-stream CONNECT path.

Already resolved on main (not in this PR)

Follow-up

Harness-side hole-punch work remains in libp2p/test-plans#849.

Test plan

  • make lint
  • make typecheck
  • Relay suite tests/core/relay/ (121 passed)
  • make linux-docs / newsfragment 1304.bugfix.rst
  • New regression tests:
    • test_dial_peer_info_opens_new_stream_after_reserve
    • test_dial_peer_info_reuses_stream_when_client_disabled
  • CI green on this PR

Made with Cursor

rust-libp2p-style relays finish each HOP substream after one exchange.
Reusing the RESERVE stream for CONNECT dropped the dial path used by
hole-punch interop. Open a fresh HOP stream for CONNECT when the client
reservation path runs.

Fixes #1304

Co-authored-by: Cursor <cursoragent@cursor.com>
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 this pull request may close these issues.

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

1 participant