Skip to content

docs: multi-peer data plane + self-certifying addresses design (sub-project #2, 2a) - #33

Merged
vxfemboy merged 2 commits into
mainfrom
docs/multipeer-2a-spec
Jul 5, 2026
Merged

docs: multi-peer data plane + self-certifying addresses design (sub-project #2, 2a)#33
vxfemboy merged 2 commits into
mainfrom
docs/multipeer-2a-spec

Conversation

@vxfemboy

@vxfemboy vxfemboy commented Jul 4, 2026

Copy link
Copy Markdown
Member

Design spec for milestone 2a of the control plane — the multi-peer data-plane refactor + self-certifying addresses. Brainstormed and approved; opening for your spec review before we write the implementation plan.

What 2a delivers

  • Key-derived self-certifying addresses: a node's inner IPv6 is fd ‖ BLAKE2s(pubkey)[..15] — the address is the identity, no authority. (Per the research decision.)
  • Peer-list config (replaces single peer_*), inner address derived not configured.
  • PeerManager — a thin routing/demux layer over the existing per-peer DataPlanes (which are already self-contained), so Benchmark harness: hot-path micro-benches + yip-vs-WireGuard netem #1's data path is reused one-per-peer.
  • Addressed socket seamDispatch::on_udp(src) + EgressDatagram.dst, drivers move to recvfrom/sendto. This is also exactly what multi-core (Deferred: multi-queue throughput sharding (scale past one core) #10) needs.
  • In-loop lazy handshake (WireGuard-style) — sessions on first traffic, demux data-vs-handshake by live conn_tag; handshake.rs refactored from blocking loops into step functions.

Explicit non-goals (later milestones)

Discovery/DHT (2c), NAT traversal/hole-punching/relay (2b), per-peer subnets, dynamic admission, multi-core sharding (#10), anti-DPI hardening (#3).

Sign-off asks (in the spec's risks table)

Address derivation details (DOMAIN, prefix, 120-bit truncation, /128 vs /64-per-node); dropping initiate; and the "PeerManager stamps dst" split vs DataPlane owning endpoints.

Spec: docs/superpowers/specs/2026-07-04-multipeer-data-plane-design.md. Please review and flag any changes before I move to the implementation plan.

🤖 Generated with Claude Code

vxfemboy and others added 2 commits July 4, 2026 18:08
…es (2a)

First milestone of sub-project #2 (control plane). Turns yipd from a single
connected peer into a static N-peer mesh: key-derived self-certifying inner
addresses (BLAKE2s(pubkey) -> fd::/128), a peer-list config, a thin PeerManager
over per-peer DataPlanes, an addressed on_udp/EgressDatagram seam
(recvfrom/sendto, which also unblocks multi-core #10), and an in-loop lazy
WireGuard-style handshake. Discovery (2c), NAT traversal/relay (2b), subnets,
and multi-core (#10) are explicit non-goals. Approved in brainstorming; pending
spec review before writing-plans.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Six-task TDD plan: (1) key-derived address helper, (2) peer-list config,
(3) the addressed socket seam (recvfrom/sendto, on_udp(src) + EgressDatagram.dst)
as a no-behavior-change refactor gated on the single-peer netns suite under both
drivers, (4) handshake step-functions, (5) PeerManager (routing/demux + in-loop
lazy handshake over per-peer DataPlanes) + tunnel wiring, (6) 3-peer netns
triangle + CI. Each task ends on an independently testable deliverable; global
constraints (forbid unsafe in yipd, no `as` casts, no wire regression) carried.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vxfemboy
vxfemboy merged commit 2e912f3 into main Jul 5, 2026
8 checks passed
@vxfemboy
vxfemboy deleted the docs/multipeer-2a-spec branch July 5, 2026 06:35
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