Repository navigation
docs(adr): coverage means "will serve", so origins keep has_blob:true (#1506) - #1887
Merged
Merged
Conversation
…#1506) Implementation review of the probe handler surfaced that a node answers has_blob:true in three ways, only one of which is a cached block: an origin-serve-capable node (enumerable origin-held entry, or a live size probe) signs has_blob:true while holding nothing in cache. Under the 'holds >=1 cached block' wording that node would have an empty bitmap, breaking both the has_blob<->non-empty biconditional and origin serving. Fix the definition, not the rule: coverage states which 64 MiB blocks the sender WILL SERVE (a cached verified block, or any block when the node is origin-serve-capable), and has_blob is 'will serve >=1 block'. An origin already read the total size to answer, so it sets every bit. The biconditional (has_blob:true <-> non-empty coverage) stays exact, a non-origin sub-block fragment still signs has_blob:false, and the scheduler never asks a non-origin to serve a block it lacks. Co-Authored-By: Claude Opus 4.8 <[email protected]>
There was a problem hiding this comment.
Pull request overview
This PR updates ADR 022’s definition of coverage and has_blob to align “coverage” with what a node will serve (including origin-serve-capable nodes), preserving the has_blob ⇔ non-empty coverage biconditional without changing the signed probe field set or contracts.
Changes:
- Redefines
Coverageas “blocks the sender will serve” (cached verified blocks, or all blocks for origin-serve-capable nodes). - Updates the
has_blobdefinition and AC 22 to match “will serve ≥1 full 64 MiB block” and keephas_blob ⇔ coverage non-empty.
Suppressed comments (1)
adr/022-content-discovery.md:225
- This paragraph calls the on-chain check a “possession check”, but ADR 014 describes it as a simple
has_blob == truerequirement for ProbeResponse evidence (the contract cannot directly verify possession). Rewording this avoids implying an on-chain possession proof.
**The signed set stays frozen — no contract change.** The signed probe fields `{hash, has_blob, rate_per_mb, timestamp_us}` are unchanged ([ADR 014](014-on-chain-verification.md#adr-014-on-chain-verification-for-slashing-evidence)). `has_blob` is redefined as "will serve ≥1 full 64 MiB block of `H`" — a cached, root-verified block, or any block when the node is an origin-serve-capable source — which is equivalently "the coverage bitmap is non-empty" and which the contract's existing `hasBlob == true` possession check covers unchanged. The block granularity aligns the possession bool with what discovery can route on: a node that advertises has at least one full block it will serve. A non-origin holder of only a sub-block fragment signs `has_blob: false` and is not discoverable, but serving any range of a blacklisted blob still signs `ok: true` over `H` in the `StreamResponse`, dispositive on its own, so every actual serve stays fully slashable regardless of the possession bool. No slash offense reads coverage detail, so the bitmap is unsigned; that also keeps the 64 MiB granularity a freely tunable knob rather than a typehash-frozen field.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| @@ -219,7 +222,9 @@ A holder that has only some 64 MiB blocks of `H` is serving supply: disjoint blo | |||
|
|
|||
| **Probe response — fresh authority.** `cdn/probe/v1` carries the same 64 MiB coverage bitmap as an **unsigned** field in the probe extension ([ADR 013 § Tier 1](013-schema-evolution.md#adr-013-schema-evolution)), derived per-probe from the holder's live bitfield, so it is always current. A requester confirms coverage here before it commits a payment lane for a range. | |||
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.
Follow-up correction to #1885, caught during the implementation deep-dive on the probe handler before any code was written.
The bug
The probe handler signs
has_blob: truein three ways, and only one is a cached blob: an origin-serve-capable node (an enumerable origin-held entry, or a live size probe) answershas_blob: truewhile holding nothing in cache. Under #1885's "holds ≥1 cached block" wording, that node would have an empty coverage bitmap — breaking both thehas_blob ⟺ non-emptybiconditional and origin serving (the node would have to signhas_blob: falseand never be selected for its own content).The fix (definition, not rule)
coverage= the 64 MiB blocks the sender will serve — a cached verified block, or any block when the node is origin-serve-capable (it warms + verifies on delivery). An origin already read the total size to answer, so it sets every bit.has_blob= "will serve ≥1 block" = coverage non-empty. Biconditional preserved.A non-origin sub-block fragment still signs
has_blob: false(serves no full block), and the scheduler never assigns a non-origin a block it lacks — coverage honestly reflects serve-capability, so cache-holders advertise cached blocks and origins advertise all.No rule change, no revert; just the wording of the
Coveragedoc, thehas_blobparagraph, and AC 22. ADR reference-hygiene guards pass.🤖 Generated with Claude Code