Skip to content

Refresh libp2p relay reservations before registration renewals#34

Merged
robinbraemer merged 3 commits into
connectfrom
codex/relay-reservation-refresh
Jun 23, 2026
Merged

Refresh libp2p relay reservations before registration renewals#34
robinbraemer merged 3 commits into
connectfrom
codex/relay-reservation-refresh

Conversation

@robinbraemer

@robinbraemer robinbraemer commented Jun 23, 2026

Copy link
Copy Markdown
Member

Summary

  • refresh endpoint relay reservations before opening a libp2p registration stream and publishing its registration record
  • reuse the reserved relay address set for registration renewals on that stream, avoiding repeated relay reservation/listen calls during renewals
  • close/retry the registration stream if reservation refresh fails instead of renewing stale relay addrs
  • add connector-side close/error logs around libp2p tunnel and local backend channel shutdown paths
  • preserve the public no-arg Libp2pTunnelTransport() constructor while allowing Guice logger injection

Evidence

  • Staging Bedrock failure at 2026-06-23T07:56:23Z showed libp2p dial failure: relay circuit returned NO_RESERVATION (204), then legacy fallback returned no_responders.
  • Local patched Paper jar loaded on codexstage22a at 2026-06-23T08:06:19Z.
  • Bedrock retry at 2026-06-23T08:10:52Z accepted via libp2p: selectedTransport=direct, warmPath=warm.
  • Join completed at 2026-06-23T08:10:54Z with connectionStatus=success; Paper logged RoboFlax2 joined the game.
  • Five-minute bounded watch after join produced no new NO_RESERVATION or disconnect logs.
  • Later Bedrock hold after diagnostic restart at 2026-06-23T08:40:43Z accepted via libp2p with session d8t4d2ri940s201odsb0, selectedTransport=direct, warmPath=warm, connectionStatus=success; Paper still listed RoboFlax2 online at 10:57:50 Europe/Berlin, then the session ended at 2026-06-23T08:59:43Z with Geyser Bedrock client timed out. No NO_RESERVATION or no_responders appeared, so the remaining long-hold failure does not match stale relay reservation.

Tests

  • ./gradlew core:test --tests 'com.minekube.connect.tunnel.p2p.*'
  • ./gradlew :core:test --tests 'com.minekube.connect.tunnel.p2p.*'
  • ./gradlew test
  • ./gradlew cleanTest test check
  • git diff --check

@robinbraemer robinbraemer merged commit cfcfdb2 into connect Jun 23, 2026
1 check passed
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.

1 participant