| … | … | @@ -19,15 +19,27 @@ parity audit on hyperdht 6.29.0 while upstream was at 6.34.0 — see |
| 19 | 19 | |
| 20 | 20 | ## Why it matters to us |
| 21 | 21 | |
| 22 | | Our `hyperswarm-peer/src/dht_messages.h` is a **hand-written** codec for the |
| 23 | | HyperDHT wire. Upstream is moving the other way: hyperdht 6.34.0 pulled in |
| 24 | | `hyperdht-address`, which uses hyperschema, and `libhc`'s own commits read |
| 25 | | *"generate manifest encoding via hyperschema-c"*. So their encodings are becoming |
| 26 | | a GENERATED artifact from a shared schema while ours are typed by hand. |
| 27 | | |
| 28 | | Generating ours from the same schemas would make tracking upstream mechanical |
| 29 | | instead of an audit. Not done — recorded as an open question in |
| 30 | | `PARITY-hyperswarm.md` §6.3. |
| 22 | ⛔ **IT CANNOT GENERATE OUR `dht_messages.h`, AND AN EARLIER REVISION OF THIS |
| 23 | FILE SAID IT COULD.** Checked 2026-09-10 against the installed hyperdht 6.34.0: |
| 24 | |
| 25 | ls node_modules/hyperdht -> no spec/ directory |
| 26 | package.json dependencies -> no hyperschema |
| 27 | lib/messages.js -> const c = require('compact-encoding') |
| 28 | |
| 29 | **HyperDHT hand-writes its own wire codecs, exactly as we do.** There is no |
| 30 | upstream schema for the DHT wire to generate from, so "generate ours from the |
| 31 | same schemas and tracking upstream becomes mechanical" was wrong. Only |
| 32 | `hyperdht-address` — a small new dependency of 6.34.0 — is hyperschema-backed, |
| 33 | and `libhc` uses hyperschema-c for its OWN manifest/store encodings. |
| 34 | |
| 35 | Where it genuinely applies to us: |
| 36 | |
| 37 | - **protocols WE define** — a daemon control plane, a session channel. There we |
| 38 | own the schema, so generating both ends is free. |
| 39 | - **libhc integration**, if we ever link it: its encodings are already generated |
| 40 | this way. |
| 41 | - NOT for matching hyperdht's existing wire. That stays a hand-written port |
| 42 | held to vectors (see `PARITY-hyperswarm.md`). |
| 31 | 43 | |
| 32 | 44 | ## Usage |
| 33 | 45 | |