Repository navigation
docs(adr): range-keyed partial-holder discovery over obao4 (#1506) - #1885
Merged
Merged
Conversation
Amend ADR 022 and 039 to make partial holders discoverable and serveable
by byte range, so disjoint ranges source from many holders instead of
funnelling onto full holders — distributing serve load and revenue across
the holder population.
ADR 022 (Content Discovery):
- Provider/StoreRequest/BatchStoreRequest carry a coarse 64 MiB Coverage
bitmap; FIND_VALUE returns Provider{node,coverage} response-side (query
carries no range, Kademlia unchanged).
- Advertise gate relaxes from Complete to >=1 verified block.
- New section: probe bitmap as the fresh authority, DHT record as a stale
routing hint, has_blob redefined as >=1 verified byte (frozen signed set,
no contract change), the has_blob:false + non-empty bitmap consistency
rule, partial-serve, and demand-windowed node assembly.
ADR 039 (Multi-Source Fetch):
- Flip the full-holder-only premise: admit partial holders by coverage,
assign each block to a covering holder, warm uncovered blocks once.
- Node pull leg drives the same scheduler with a sliding demand window.
Consistency: ADR 037 (DHT advertising is now range-keyed) and ADR 038
(scope-boundary / cross-ADR / AC) flipped to match — no ADR is left
asserting range-addressed discovery is deferred. All ADR reference-hygiene
guards pass.
Co-Authored-By: Claude Opus 4.8 <[email protected]>
There was a problem hiding this comment.
Pull request overview
This PR updates the discovery and multi-source-fetch ADRs to make partial holders first-class serving supply by introducing range-keyed (coverage bitmap) discovery at a coarse 64 MiB block granularity, enabling composition of a blob from disjoint cached ranges across many holders.
Changes:
- Extend
cdn/dht/v1provider records (and STORE/BatchStore) to include a coarse 64 MiB Coverage bitmap, and redefine discovery semantics around partial holders (ADR 022). - Update the multi-source scheduler model to assign work by coverage and warm only uncovered blocks, and specify that the same scheduler also drives the node’s cache-miss pull leg with a sliding demand window (ADR 039).
- Align proxy-warming and bao verified-range streaming ADRs to the new range-keyed discovery model and remove now-stale “deferred” assertions (ADR 037, ADR 038).
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| adr/022-content-discovery.md | Adds coverage-carrying Provider/STORE shapes and specifies range-keyed partial-holder discovery semantics. |
| adr/039-multi-source-parallel-fetch.md | Updates scheduler assumptions to admit partial holders by coverage; adds demand-windowed node pull-leg behavior. |
| adr/038-bao-verified-range-streaming.md | Reframes scope boundary to rely on ADR 022 for range-keyed discovery while keeping this ADR focused on verification. |
| adr/037-regional-proxy-warming.md | Updates probing/advertising text so warmed partials become discoverable serving supply via coverage. |
Suppressed comments (1)
adr/022-content-discovery.md:145
- This STORE flow trigger says publication begins when the node verifies its first byte ("any verified partial"), but the record being published requires a non-empty 64 MiB Coverage bitmap. That combination implies the first publish could carry an empty bitmap, which the earlier types forbid. Reword the trigger to match the 64 MiB block-granularity publish gate used elsewhere (e.g., Acceptance Criteria #21 and ADR 037).
When a node verifies its first byte of blob H — on any verified partial, not only on `Complete`:
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…ot the byte (#1506) has_blob and coverage are two views of one fact, so publish, has_blob, and the bitmap all key on the 64 MiB discovery block: has_blob:true iff the coverage bitmap is non-empty. A sub-block fragment reports empty coverage and is not advertised; serving any range still signs ok:true, so actual serves stay slashable regardless of the possession bool. Consistency rule is now the biconditional (both false+non-empty and true+empty are malformed). Also: 'entries' (not 'hashes') for the BatchStore admitted tail, and the node-to-node pull-through requirement is 'covers the needed range', not 'holds the full blob'. Addresses PR #1885 review. Co-Authored-By: Claude Opus 4.8 <[email protected]>
This was referenced Aug 31, 2026
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.
Closes the design half of #1506. Amends the discovery ADRs so partial holders become serving supply — disjoint byte ranges source from many holders instead of funnelling onto the full-holder set, distributing serve load and revenue across the population.
What changed (ADR-only; no code)
ADR 022 — Content Discovery
Provider/StoreRequest/BatchStoreRequestcarry a coarse 64 MiBCoveragebitmap;FIND_VALUEreturnsProvider{node, coverage}response-side (the query carries no range — Kademlia semantics unchanged).Completeto ≥1 verified block.has_blobredefined as "≥1 verified byte" (the signed set{hash, has_blob, rate_per_mb, timestamp_us}stays frozen — no contract change); thehas_blob:false+ non-empty-bitmap consistency rule; partial-serve; demand-windowed node assembly. ACs 21–25.ADR 039 — Multi-Source Fetch
ADR 037 / 038 — consistency
Discovery model (why two surfaces)
Clients discover latency-first (registry + probe, never DHT); nodes discover holder-first (DHT
FIND_VALUE). So coverage rides both the DHT record (node-facing, stale hint) and the probe response (fresh authority) — one shared 64 MiB granularity.Not in this PR
Implementation. The spec and a task-decomposed plan (PR1 = bitmap plumbing; PR2 = coverage-aware scheduler on both consumers, with a sliding-window spike) live in scratch, not the repo. No contract change; the frozen signed set and slash paths (ADR 014) are untouched.
All ADR reference-hygiene guards pass (
make check-refs).🤖 Generated with Claude Code