docs: multi-peer data plane + self-certifying addresses design (sub-project #2, 2a) - #33
Merged
Conversation
…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>
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.
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
fd ‖ BLAKE2s(pubkey)[..15]— the address is the identity, no authority. (Per the research decision.)peer_*), inner address derived not configured.PeerManager— a thin routing/demux layer over the existing per-peerDataPlanes (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.Dispatch::on_udp(src)+EgressDatagram.dst, drivers move torecvfrom/sendto. This is also exactly what multi-core (Deferred: multi-queue throughput sharding (scale past one core) #10) needs.handshake.rsrefactored 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); droppinginitiate; and the "PeerManager stampsdst" split vsDataPlaneowning 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