Repository navigation
Description
Component
client (decdn-client SDK)
Who it affects
client (someone running decdn get or the gateway), publisher (someone importing content or sponsoring downloads)
Problem
"Every byte verified" is a claim the site makes and nothing shows. decdn get ends with a destination path and, under --json, a PullReport (fetched, paid_bytes, spliced_bytes, …) that exists for debugging. Nothing a user can keep, show a publisher, or paste in a bug report says: this hash, these bytes, these nodes, this much USDC, at this time, signed.
Proposed solution
decdn get ends with a receipt, and --receipt <path> writes it:
decdn receipt v1
hash 9194000d…69e5 (bundle, 29.0 GB, 14 entries)
namespace 1
bytes 28,995,469,846 verified · 28,995,469,846 paid
nodes 4 0x2a…f1 (DE) 11.2 GB · 0x9c…03 (US) 9.8 GB · …
paid 0.29 USDC from pool 0x7d…e2 (sponsored by example.org)
started 2026-10-24T14:02:11Z finished 2026-10-24T14:09:48Z
signed 0x5e…a7 (the buyer key) 0xsig…
What it contains and what each part proves:
- The client's own statement, signed by the lane signer that paid: hash, namespace, bytes verified, bytes paid, time window, pool id. This is the client attesting what it did; it is not evidence against anyone.
- Per node: the node's signed
StreamResponsebody ({hash, ok, rate_per_mb, total_bytes, pool_id, …}, which it already signs and the client already verifies) and the cumulative voucher the client sent last. Both exist today in the pull; the receipt keeps them instead of dropping them. - Settlement, later. A voucher is redeemed by the node in its own sweep, so the settlement tx is not known when the pull ends.
decdn receipt settle <file>(or the gateway's receipt page) fills it in afterwards fromPoolRedeemedfor that pool and lane signer, and a receipt viewer shows "settled" once it is.
A publisher embeds a receipt (or its hash) as a badge in a release note: "N downloads verified via deCDN". The gateway (#2593) returns the same receipt for a completed download as /_receipt/<id> and renders it as the page people screenshot.
Format: a JSON document under crates/client with a stable schema (it will outlive wire formats), a decdn receipt verify <file> that re-checks every signature offline against the deployment's chain id, and a short appendix in adr/ that names what a receipt proves and what it does not. Nothing in it is slashing evidence; ADR 014's probe-slash and bytes-regression paths stay what they are.
Alternatives considered
- Print the
PullReportprettier. Unsigned and client-only; no publisher can show it to anyone. - On-chain receipt per download. A tx per pull is the thing the off-chain voucher design exists to avoid.
Design scope
- This proposal changes the protocol, the economics, or the contract surface.
A receipt is assembled from messages that already exist and are already signed. The receipt schema is a client artifact.
Related
- Price before pull, the other half of making the payment visible: cli:
decdn quote <URI>prices a pull from signed probe rates before any paid byte #2600 - Hosted gateway, which renders the receipt page: gateway: hosted public HTTP gateway at
<ns>.decdn.linkthat pays a pool behind the scenes #2593
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Projects
- StatusShow more project fieldsDone
Activity