Skip to content

registry: tell the beacon which node a relayed handshake was parked for - #129

Merged
TeoSlayer merged 1 commit into
mainfrom
feat/handshake-notify
Oct 1, 2026
Merged

TeoSlayer merged 1 commit into
mainfrom
feat/handshake-notify

Conversation

@TeoSlayer

Copy link
Copy Markdown
Contributor

Summary

Relayed trust handshakes take about two minutes because each side only finds a parked message on its 60-second poll. When request_handshake or respond_handshake parks a message, the registry now calls a hook with the recipient's node ID; cmd/rendezvous wires it to the co-located beacon, which sends that node a two-byte "poll now".

Changes

  • A notifier hook called with the recipient's node ID when a handshake request or answer is parked. A refused (duplicate) request notifies nobody.
  • cmd/rendezvous wires the hook to the beacon's NotifyNode by interface assertion, so this builds against the currently pinned beacon and activates once the beacon dependency is bumped to a release that has it (beacon: NotifyNode tells a node the registry holds a relayed handshake for it beacon#59).

Nothing new is disclosed: the notify carries no identity or payload, the requester gets no signal, and the beacon runs in the same process.

Order

Any order builds. To get the effect: beacon release, bump it here, deploy. Updated daemons (pilot-protocol/pilotprotocol feat/fast-relayed-handshake) then see a relayed request in well under a second; un-updated daemons ignore the notify and keep the 60-second pace.

Test Plan

  • go build ./..., go vet ./..., go test ./...
  • TestHandshakeNotifierNamesTheRecipient
  • With beacon, registry and daemon branches together in Docker: request at an unattended private target in 0.1s, first message at 0.4s (before: 57s and 117s)

🤖 Generated with Claude Code

request_handshake and respond_handshake store a message that the recipient
only finds on its next poll, once a minute. Add SetHandshakeNotifier: after
either succeeds the hook is called with the recipient's node ID.
cmd/rendezvous wires it to the co-located beacon's NotifyNode when the
beacon in use has it (asserted, so this builds against beacon releases that
predate it), which prompts an updated daemon to poll at once. The hook is
told nothing but the recipient's node ID; a refused request notifies nobody.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Oct 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@TeoSlayer
TeoSlayer merged commit de8b49e into main Oct 1, 2026
9 checks 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