GeezerVison is showing github.com — id: design: ID messaging/relay protocol v1 · Issue #2036 · developing-today/code
id: design: ID messaging/relay protocol v1 #2036DescriptionLIST 9 synthesis. Merge the ephemeral-data and relay investigations into messaging/relay protocol v1: low-latency data without a central server, the two data classes (ephemeral live vs chained permanent), relay rules, and the attestation hand-off points the match system needs. Specialist/Summit-grade synthesis.
Program: Drew's 2026-10-28 directive (full text: hatch-personal memory/topics/id-program-2026-10-28.md).
Working pattern: parallel investigations, then the named synthesis issue merges them into a full design. Route guidance: Workhorse by default; Specialist/Summit for synthesis and ramification-heavy work. A result that says "done" is not the endpoint — the orchestrator reviews it and may commission another round. Deliverables: a markdown design/investigation doc (mermaid/SVG diagrams welcome) linked from this issue, plus follow-up issues for anything buildable. Build a proof of concept where the design calls for one, but do NOT build the permanent feature on top of an unreviewed PoC. Activitydeveloping-today commented on Oct 29, 2026 dezren39 commented on Oct 29, 2026 Parent epic: #2056 — ID platform expansion (2026-10-28 directive). dezren39 commented on Oct 29, 2026 🤖 Agent note · handed off (input delivered)
- Agent: queue worker (repo-worker-code), lane B shift
- Session / ID: queue task 3349 (repo-health-code-pilot), 2026-10-29
- Found via: queue claim on id: investigate: multi-hop relay and P2P media paths — bridging peers, optional privacy relay, large-message chunking #2035
- Task: Relay-side input for this synthesis is done: the id: investigate: multi-hop relay and P2P media paths — bridging peers, optional privacy relay, large-message chunking #2035 investigation (relay model + chunking verdict) is in PR doc: multi-hop relay and P2P media investigation (#2035) #2246, doc
doc/2026-10-29T11-05-00Z_investigation_multi_hop_relay_and_p2p_media/. Headlines for the synthesis: adopt iroh-gossip as the fan-out substrate with ID signing/membership/chaining on top; validity = origin signature only, hop chain is audit/loop control; media = direct mesh + member selective-forwarder, hairpin only in privacy-relay mode; no new wire-level chunking (QUIC streams segment; reuse welcome checked-chunking over the 1 MiB frame cap; large payloads by iroh-blobs reference).
- Expectation: This synthesis stays gated until its other input, id: investigate: ephemeral live data vs the chained event graph — retention and intermittent signing #2034 (ephemeral vs chained), also lands. A bridge PoC is filed as id: poc: five-node bridge relay over iroh-gossip — chained fan-out via a single bridging member #2249, explicitly gated on this issue's review.
- Links: id: investigate: multi-hop relay and P2P media paths — bridging peers, optional privacy relay, large-message chunking #2035 · PR doc: multi-hop relay and P2P media investigation (#2035) #2246 · id: poc: five-node bridge relay over iroh-gossip — chained fan-out via a single bridging member #2249 · id: investigate: ephemeral live data vs the chained event graph — retention and intermittent signing #2034
dezren39 commented on Nov 1, 2026 🤖 Agent note · state: picked up
dezren39 commented on Nov 1, 2026 🤖 Agent note · state: triaged — design record (queue task 5729)
Design record: ID messaging/relay protocol v1 (synthesis of #2034 + #2035)
Gate status: both inputs have landed — #2034 CLOSED (doc merged via PR #2239) and #2035 CLOSED (PR #2246 merged) — so this synthesis is ungated. Parent epic #2056.
The decision
Adopt protocol v1 as the union of the two investigation verdicts, with the open questions they left answered below. No new substrate and no new wire chunking: v1 is ID semantics layered on machinery that already exists in pkgs/id.
The protocol in one page
- Two data classes over one fan-out. Chained/permanent traffic (identity, membership, documents, money, durable chat, match results) keeps per-event origin signatures on the signed hash chain (
chain.rs:282-309). Ephemeral/live traffic (keystrokes, cursors, presence, live input) never enters the chain per-event: it rides a per-session stream authenticated by one session-header signature + a per-session MAC, closed by segment checkpoints. (Grounded today: web/collab.rs already carries steps/cursors as unsigned MessagePack frames; only the saved revision becomes a signed document.put — local_events.rs:1-18.)
- Fan-out = iroh-gossip (already a dependency; today used only for peer-discovery announcements,
pkgs/id/src/commands/peers.rs). A bridging member forwards to members the sender cannot reach. Validity = the origin signature alone (over content, prev-references, group, sequence); each relay appends a signed hop record outside the envelope (relay ID, previous hop, receipt time) as audit/loop control. A relay can delay or withhold — an availability fault, mitigated by duplicate paths and range-sync catch-up — but cannot forge or re-attribute. Receivers dedupe by message ID.
- Segment checkpoints are ordinary graph events. A checkpoint attests: "this segment's ordered delta, from state Sₙ₋₁, produced state Sₙ; here is its root" — carrying
session_id, segment_seq, prev_checkpoint, root, event_count, time bounds, signature, optional audit-blob reference (residue shape: id: investigate: ephemeral live data vs the chained event graph — retention and intermittent signing #2034 doc §7). Live views rebuild from the latest checkpoint + the ephemeral stream since it. Defaults: 256 events or 2 s, world-configurable in the WorldLimits style (world/mod.rs:59-99).
- Media never goes through the gossip tree and never hairpins by default: direct QUIC mesh ≤ ~6, a member as selective forwarder of already-encrypted packets beyond that; a central hairpin exists only in opt-in privacy-relay mode. Protocol v1's duty here is only to not preclude it.
- No wire-level chunking. QUIC streams segment; oversized single messages reuse the checked-chunking over the 1 MiB frame cap (
frames.rs:16-19); large payloads go by iroh-blobs reference. Event payloads stay bounded (world_caps.rs:65, MAX_EVENT_BYTES = 64 KiB).
- Attestation hand-off: dispute-grade classes (match results, money, contract-like chat) keep per-event/per-transaction signing and mutual (two-sided) attestation — the
attestation.genesis/attestation.claim kinds in attestation.rs:1-15 and id: investigate: match-result attestation — mutual concession, witness adjudication, offline play #2037's mutual-concession model are the hand-off point; segment checkpoints alone never settle a two-party dispute (the equivocation limit in id: investigate: ephemeral live data vs the chained event graph — retention and intermittent signing #2034 §4).
Options considered
- Checkpoint as graph event (chosen) vs parallel signed artifact (
artifact.rs shape): the graph event inherits event_store ordering, the waiting pool, and fork proofs for free; an artifact duplicates all three. Artifact stays the right shape for identity/key material, which is not session traffic.
- iroh-gossip fan-out (chosen) vs a new flooding protocol: PlumTree/HyParView already gives tree repair + duplicate suppression; the only new code is ID's envelope/hop-record layer.
- Segment checkpoints (chosen) vs initial+final signatures only: initial+final lets a relay truncate the tail and proves nothing about timing; segments bound both at O(segments) signature cost.
Invariants the implementation must hold
- A relayed message verifies identically regardless of path length; hop records are never a trust input.
- Compaction never removes a checkpoint, a fork proof, or anything a waiting-pool
after resolution needs (event_store/mod.rs:12-22).
- Durable classes (identity/membership, money, durable documents) are never compacted and never move to checkpoint-only signing.
- Metadata honesty: bridges/relays learn social-graph + timing metadata; v1 states this plainly — hop records are not a privacy feature.
Phased implementation packets (enqueued, in order)
| Phase |
Issue |
Queue task |
Dedupe key |
1 — session header + session.checkpoint event kind |
#3794 |
task 5784 |
repo-health:v1:fix:developing-today/code:issue:3794 |
| 2 — PoC: intermittent-signature live stream (collab) |
#3795 |
task 5785 |
repo-health:v1:fix:developing-today/code:issue:3795 |
| 3 — relay envelope + hop records over iroh-gossip |
#3796 |
task 5786 |
repo-health:v1:fix:developing-today/code:issue:3796 |
| 4 — event_store retention/compaction |
#3797 |
task 5787 |
repo-health:v1:fix:developing-today/code:issue:3797 |
| Companion relay PoC #2249 (five-node bridge) is already filed and was gated on this record; it can proceed under phase 3's envelope. PoCs stay throwaway until reviewed (program rule). |
|
|
|
Question for Drew (explicit, non-blocking — packets proceed either way)
What should a NEW chat channel default to: durable (per-message signed, kept) or live (checkpointed, 90-day bounded)? Options: (a) durable by default, live as an opt-in per channel — recommended: history loss is the failure users notice, and a channel can relax later but cannot retroactively keep what was dropped; (b) live by default for high-chatter rooms — cheaper, but silent history loss surprises. Recommendation: (a). The per-channel policy object itself is built in phase 1/3 scope regardless of the default chosen.
🤖 Agent note · triage task 5729 · lane B · 2026-11-01
dezren39 commented on Nov 1, 2026 Design note: ID messaging/relay protocol v1 · PR #3833
Summary
- Durable facts remain origin-signed chained events; live input uses a signed session header, MAC-authenticated frames, and signed checkpoints (256 events or 2 seconds by default).
- One logical membership/relay policy uses gossip-style fan-out for chained facts and ordered per-session QUIC streams for live frames; live traffic is not queued offline.
- Origin signatures establish message validity; signed hop records are audit/loop-control metadata, with a four-hop default cap.
- Stock iroh-gossip's eager forwarding cannot rely on post-receive validation: phase 3 must gate forwarding on ID acceptance or use ID-controlled forwarding.
- Match results and other dispute-grade outcomes remain durable and use mutual/per-transaction attestation; checkpoints alone are not verdicts.
- Media stays off the gossip tree; prefer direct paths, use member selective forwarding when needed, and make privacy hairpin opt-in with address isolation.
Phased plan: #3794 session/checkpoint schema → #3795 live-stream PoC → #3796 chained relay envelope/hops → #3797 retention/compaction. Each phase has separate merge acceptance in the note; phases 2 and 3 can proceed independently after the shared schema lands.
Question for Drew: Should new chat channels default to (A) durable per-message signing/retention, with live/90-day-bounded mode opt-in (recommended), or (B) live/90-day-bounded for high-chatter rooms? Recommendation: A. No other Drew questions; relay validation, key handling, and compaction safety are implementation requirements with acceptance criteria in the note. dezren39 commented on Nov 17, 2026
Agent note — task 19687 triaged (lane any-u, 2026-11-17): verdict of record stands
dezren39 commented on Nov 23, 2026 PoC report link (per #2249's acceptance): the five-node bridge-relay proof of concept is landed on this branch and open as PR #13454 — report at doc/2026-11-23T12-42-00Z_poc_bridge_relay_2249/2026-11-23T12-42-00Z_poc_bridge_relay_2249.md. Measured: direct A→B median 15.1 ms vs bridged A→D→E median 192.5 ms over 20 messages (loopback, per-send connection setup dominates). Acceptance evidence: hop-chain verification, tamper refusal at ingest, duplicate collapse with two bridges, E reachable only via D. Explicitly NOT the permanent feature — harness and forwarding sink live in the test, disposable by design.
dezren39 commented on Nov 24, 2026
Agent note — second-pass verify (lane oc-code-05, queue task 21784, 2026-11-24)
state: verified — no new follow-on packet; remainder already tracked live.
fresh evidence: #2036 OPEN (design parent, epic/id-program). Design deliverable complete (PR #3833); all four phase issues CLOSED (#3794 phase 1, #3795 phase 2, #3796 phase 3, #3797 phase 4); PoC PR #13454 MERGED 2026-11-23. Implementation remainder is carried by OPEN #5534 (implement ID messaging and relay protocol v1, status:in-review, priority/high, epic/id-program) and the wire-format design by OPEN #5674. No open work references #2036 that lacks an actionable item.
verdict: #2036 stays OPEN as the protocol v1 design parent; this pass routes no new packet (would duplicate #5534). Acceptance met by this recorded verdict. dezren39 commented on Nov 26, 2026
Decided: Close #2036 as a completed design issue; its follow-on implementation and wire-format work stays in #5534 and #5674.
Why: The v1 design is merged in PR #3833, all four named design phases (#3794–#3797) are closed, and the five-node bridge PoC is merged in PR #13454. The remaining work has live, separately tracked issues: #5534 is open in review, and #5674 is open and triaged. Those follow-ups do not leave the v1 design without a written conclusion.
Undo: Reopen #2036 if the merged v1 design or any of its four design phases is found incomplete, or if either listed follow-up is found not to cover the remaining work.
By: agent-next-22-local dezren39 commented on Nov 26, 2026
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|