Repository navigation
Description
Background
ADR 014 § 2 currently specifies a single-round optimistic challenge-response for BLAKE3 content corruption: challenger posts the node's signed `StreamResponse` + 100 TOKEN bond; node has 24 h to counter with delivery proof; if no counter, slash. This relies on bond economics + the node being unable to produce counter-evidence, not on cryptographic proof of corruption.
ADR 014 also originally sketched a production-grade upgrade path — interactive keccak256 Merkle proofs over 1024-byte chunks — but that sketch was incomplete. In particular, the spec said:
Binding Merkle root to BLAKE3 hash: The contract cannot independently verify that a keccak256 Merkle root corresponds to a given BLAKE3 hash (BLAKE3 is not available on-chain). The production protocol addresses this by requiring the node to commit a keccak256 Merkle root for each blob it serves, either at delivery time (included in `StreamResponse` as an additional field) or registered on-chain. This commitment is the subject of a future ADR.
That subject was never written. The half-design has been dropped from ADR 014 (PR #386) so the ADR doesn't carry sketches of unbuilt designs; this issue tracks the missing follow-up ADR.
What needs deciding
A future ADR must answer at least:
- Where does the keccak256 Merkle root live?
- Added to `StreamResponse` as a signed field (wire-format change, ALPN tier per ADR 013), or
- Pre-registered on-chain by the publisher at ingest, indexed by BLAKE3 hash, or
- Computed lazily by an indexer service and posted on-challenge.
- How is the Merkle root bound to the BLAKE3 hash? Each option above has a different trust model — a signed wire field commits a node to one root per request; an on-chain registry needs the publisher to opt in; a lazy indexer needs anti-griefing.
- Tree shape. ADR 014 sketched a 1024-byte leaf size matching iroh-blobs' BLAKE3 hash-tree leaves. Confirm vs alternative sizes (gas cost vs proof depth tradeoff).
- Two-round protocol mechanics. Challenger submits commitment + corrupt chunk + Merkle proof; node responds with correct chunk + Merkle proof. Resolution rules. Bond mechanics on each side.
- Migration / coexistence with the optimistic path. Both at once? Optimistic deprecated when Merkle ships?
Why now-ish
Optimistic challenge has two known weaknesses:
- Bond-economics dependency — at low TOKEN price the 100 TOKEN griefing cost is small. Cryptographic proof eliminates this dependency.
- Counter-evidence ambiguity — "did the node deliver the bytes" is loose. Cryptographic proof of corruption removes the judgement call.
Neither is a launch blocker if bond + reputation are deemed sufficient at first; this is a hardening step for when the optimistic surface starts to show.
Definition of done
- A new ADR (next free number, currently 028) documenting the production design end-to-end.
- ADR 014 § 2 updated with a one-line cross-reference to the new ADR once it lands.
- Implementation tracking issue(s) filed against the new ADR.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
fix(adr): address PR #477 review — replace MMR with plain binary kecc…
feat(adr): production BLAKE3 corruption verification (#387)
fix(adr): address PR #477 review — replace MMR with plain binary kecc…
fix(adr): resolve ADR 030 §Open Questions — replace bisection with si…
alpergundogdu commentedon May 8, 2026
Resolved without on-chain enforcement.
After working through the threat model end-to-end: progressive BLAKE3 verification at the client (already mandatory in
cdn/client/v1per ADR 002 / ADR 005) catches corrupt bytes at the wire, and post-verification voucher signing means a corrupt window never yields a voucher. Client monetary loss in the corruption case is zero.This collapses the original five questions:
The "node signs wrong R / serves bytes that don't BLAKE3 to X" attack is observably harmful only when the node also ships matching wrong bytes — at which point it's wire corruption, caught by streaming verification. R is never observable to anyone in the corruption case.
Outcome:
OffenseType.Corruptionfrom the enum.Closing this issue as resolved-no-action.
🤖 Generated with Claude Code
docs(adr): remove ADR 014 §2 optimistic corruption path + drop Offens…
docs(adr): resolve corruption at the wire — drop ADR 014 §2 + Offense…
thiras commentedon May 10, 2026
Closing as resolved per the prior comment by @alpergundogdu and PR #480.
PR #480 dropped ADR 014 §2 (optimistic corruption challenge) and
OffenseType.Corruption, with corruption now fully absorbed at the wire by progressive BLAKE3 verification + post-verification voucher signing (see ADR 003 §Corrupted delivery, ADR 014 lines 16, 259-260). No follow-up ADR for keccak256 Merkle proofs is needed — the production-path question is moot.PR #477 (the ADR 030 production-path proposal) was closed as superseded; this issue was missed at that time.