Repository navigation
registry: tell the beacon which node a relayed handshake was parked for - #129
Merged
Merged
Conversation
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>
6 tasks done
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Relayed trust handshakes take about two minutes because each side only finds a parked message on its 60-second poll. When
request_handshakeorrespond_handshakeparks a message, the registry now calls a hook with the recipient's node ID;cmd/rendezvouswires it to the co-located beacon, which sends that node a two-byte "poll now".Changes
cmd/rendezvouswires the hook to the beacon'sNotifyNodeby 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🤖 Generated with Claude Code