Skip to content

net: add experimental HNS node rendezvous and relay - #960

Draft
denuoweb wants to merge 5 commits into
handshake-org:masterfrom
denuoweb:agent/hnsr-poc
Draft

net: add experimental HNS node rendezvous and relay#960
denuoweb wants to merge 5 commits into
handshake-org:masterfrom
denuoweb:agent/hnsr-poc

Conversation

@denuoweb

@denuoweb denuoweb commented Jul 21, 2026

Copy link
Copy Markdown

Summary

  • limit this draft to the first HNSR layer: outbound-only full nodes receiving ordinary relayed Handshake peer sessions through HNS_NODE_V1
  • add a private HNSR envelope, rendezvous and relay capability bits, strict packet/state bounds, and a regtest-only feature gate
  • implement iterative rendezvous discovery, replicated unnamed-node routes, two-relay reservation lifecycle and failover, bounded circuits, flow control, and inner Brontide
  • exercise ordinary hsd peers, 1,000 pings, and a real mined block over the inner relayed connection

Deliberate split

The earlier version of this PR combined node rendezvous, named-service authorization, a web profile, and later routing hardening. This draft now stops before the named-service commit so the node transport can be reviewed independently.

Named-service authorization and browser/web transport will be proposed separately only after the node-rendezvous layer receives review.

Scope and safety

The experiment is opt-in, disabled outside regtest, and does not forward to a requester-selected host or port. A circuit terminates only at the live peer connection bound to its signed reservation. Private values 0x04000000, 0x08000000, and 0xf3 are collision-prone test values, not requests for permanent assignments.

Validation

NODE_BACKEND=js npm run test-file -- \
  test/hnsr-test.js test/brontide-test.js test/net-test.js

NODE_BACKEND=js node scripts/run-hnsr-regtest-trial.js \
  docs/hnsr-regtest-phase1.json
  • focused HNSR, Brontide, and network suites: 65 passing
  • eight independently keyed FullNodes on regtest
  • four-copy publication with recovery after rendezvous loss
  • reservation renewal, withdrawal, disconnect invalidation, and stale-ticket rejection
  • automatic first-relay failure fallback
  • an ordinary inner hsd peer session carrying 1,000 pings and a real block
  • bounded admission and relay queues with zero drops in the checked trial

Program relationship

See the canonical program architecture and review order.

@denuoweb denuoweb changed the title Add regtest HNSR proof of concept Add experimental HNSR Phase 1/2 reference implementation Jul 22, 2026
@denuoweb
denuoweb marked this pull request as ready for review July 22, 2026 04:35
@denuoweb
denuoweb marked this pull request as draft July 23, 2026 00:31
@denuoweb denuoweb changed the title Add experimental HNSR Phase 1/2 reference implementation net: add experimental HNS node rendezvous and relay Jul 23, 2026
@denuoweb

Copy link
Copy Markdown
Author

@nodech — requesting review of the node-rendezvous layer, especially route admission, reservation lifecycle, circuit flow control, and interaction with ordinary peer traffic. Named-service and web layers have been removed from this PR.

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