Skip to content

No require_authorized_origin equivalent on the cache-miss pull-through path: operators cannot opt out of relaying/warming unclaimed content #821

Description

@alpergundogdu

Summary

Prefetch (speculative acquisition) has an opt-in operator gate, prefetch.require_authorized_origin, that restricts acquisition to hashes whose namespace has a currently-authorized on-chain origin. The reactive cache-miss pull-through path has no equivalent gate — it is permissionless by design, serving and warm-caching any hash a paying client requests regardless of whether the content has any authorized origin. Some operators may not want to relay or cache unclaimed content (no namespace / no authorized origin) for policy or legal reasons, and today they have no knob for it.

Evidence in the ADRs

  • ADR 022 § Recommended configuration — prefetch.require_authorized_origin (default true): prefetch fires only if the FIND_VALUE candidate set contains at least one operator currently authorized as origin via OriginAssignment.getOrigins(namespaceId) (with namespaceId == 0 resolving to the default-open allow-list).

  • ADR 022 § Scope and limits explicitly carves the reactive path out of that gate:

    "The cache role remains permissionless: any bonded operator may serve any hash they have, and the cache-miss pull-through path used to fulfill an in-flight cdn/client/v1 StreamRequest from a paying customer is unaffected by these knobs."

    and notes truly-unclaimed hashes "get no prefetch ever" but can still be pulled-through/served reactively (operators can only opt in to caching them via explicit pinning — there is no symmetric way to opt out of pull-through for them).

  • ADR 037 § Node serving: window-paced pull-through + § Seed-leech caps govern the reactive path with pull_ahead_bytes, max_unrecouped_leech_bytes, and share_ratio. These bound economic exposure (unrecouped bytes), not content authorization. ADR 037 line 72 says the require_authorized_origin gate "compose[s] with these caps where an operator wants the additional restriction," which is in mild tension with ADR 022's flat statement that pull-through is "unaffected by these knobs" — the composition is asserted but not actually specified for the reactive path.

The gap

The seed-leech caps answer "how much speculative loss will I absorb?" They do not answer "do I want to be a relay/cache for content that has no DAO-ratified origin at all?" An operator who wants to serve only authorized-origin content (or refuse unclaimed namespaces) can set that posture for prefetch but not for the request-driven pull-through path that actually does the bulk of warming. ContentBlacklist (ADR 011/031) is a reactive denylist of specific objectionable hashes — not a proactive allow-list posture, and it requires governance to enumerate bad hashes rather than letting an operator default-deny unclaimed content.

Proposed direction (for discussion)

Add an optional operator-policy gate on the reactive pull-through path, mirroring the prefetch gate but default-permissive to preserve current behavior — e.g. pull_through.require_authorized_origin (default false). When enabled, the node refuses to initiate an upstream pull and the associated cache-warming write for a hash whose namespace has no currently-authorized origin via OriginAssignment.getOrigins(namespaceId) (same registry-cache + fail-closed-on-RPC-unavailable pattern the prefetch gate uses), returning NotFound to the requesting client. This reuses existing machinery and is purely additive.

Open design questions

  1. Default value. Prefetch's gate defaults true; the reactive path is intentionally permissionless. A pull-through gate almost certainly defaults false to avoid changing network behavior — confirm.
  2. Already-held ranges. The seed-leech caps "never refuse to serve a range already held." For a content-policy gate an operator might want to refuse even held ranges. Is this a pull-initiation gate only, or also a serve gate? (The latter overlaps ContentBlacklist semantics.)
  3. Reconcile the ADRs. ADR 022 § Scope and limits ("unaffected by these knobs") vs. ADR 037 line 72 ("compose ... where an operator wants the additional restriction") should be made consistent once this is decided — likely a small ADR 022/037 amendment rather than a new ADR.
  4. namespaceId == 0 / default-open. Decide whether default-open allow-list hashes count as "authorized" for the reactive gate the same way they do for prefetch.

Scope

Primarily an ADR/design decision (touches ADR 022 § Scope and limits and ADR 037 § Seed-leech caps / Cross-ADR Impact). The cdn/client/v1 pull-through handler that this gate would hook into does not exist yet (its bring-up is tracked separately per ADR 037 § Cross-ADR Impact → ADR 005), so this can be resolved as a design clause before that handler lands.

Activity

  1. added
    design:consistency
    design:missing-decision
    on Jun 5, 2026
  2. github-actions commented on Jun 5, 2026

    @github-actions

    🎯 Triage report

    This issue identifies a policy-gate asymmetry: prefetch has an opt-in require_authorized_origin guard, but the reactive cache-miss pull-through path is intentionally permissionless with no equivalent knob. The reporter proposes adding pull_through.require_authorized_origin (default false) to mirror the prefetch gate while preserving current network behavior. The issue also surfaces a concrete ADR inconsistency — ADR 022 says pull-through is "unaffected by these knobs" while ADR 037 line 72 asserts they "compose" — that must be resolved before the cdn/client/v1 handler is implemented.

    📊 Assessment

    Dimension Value Reasoning
    Type Feature Proposes a new operator config knob; no existing behavior is broken, only a gap identified
    Labels consistency, adr-review, missing-decision (+ existing technical) ADR 022 vs ADR 037 wording conflict; ADR amendment needed once design questions resolved; 4 open design questions not yet recorded in any ADR
    Coding agent Not suitable Four open design questions (default value, serve-gate vs pull-gate scope, ADR reconciliation, namespaceId == 0 treatment) require team consensus before any implementation can start. The target handler (cdn/client/v1) also does not exist yet.

    🔗 Similar issues

    💡 Notes and suggestions

    Design questions that need team sign-off before implementation:

    1. Default value — Almost certainly false to preserve the intentionally-permissive cache role. Confirm explicitly in the ADR amendment so downstream implementers don't have to guess.

    2. Scope of the gate: pull-initiation only vs. serve gate — The seed-leech caps "never refuse to serve a range already held." A content-policy gate for already-held blobs would overlap ContentBlacklist semantics (ADR 011/031). Recommend deciding upfront and documenting: likely this is a pull-initiation gate only (matching the prefetch gate's behavior), with ContentBlacklist remaining the mechanism for refusing held blobs.

    3. ADR reconciliation — ADR 022 § Scope and limits says pull-through is "unaffected by these knobs"; ADR 037 line 72 says they "compose ... where an operator wants the additional restriction." These can't both be fully right. The resolution is likely a targeted amendment to ADR 022 § Scope and limits to allow for an opt-in gate (not remove the permissionless default, just add the knob). A new ADR is probably not warranted — a small amendment to both 022 and 037 should be sufficient.

    4. namespaceId == 0 / default-open allow-list — Decide whether hashes in the default-open namespace count as "authorized" for the reactive gate the same way they do for prefetch. This is the same decision already made for prefetch, so consistency strongly favors reusing that logic unchanged.

    Implementation sketch (once design is settled):

    • Add pull_through.require_authorized_origin: bool (default false) to the node config schema in crates/common
    • Hook the check into the cdn/client/v1 pull-through handler (tracks with ADR 005 bring-up)
    • Reuse the existing OriginDirectory trait + registry-cache (already wired for prefetch via DHT prefetch: live FindValue→probe→pull-through acquisition + OriginAssignment subscription (AC 7 of #650) #820)
    • Fail-closed on RPC unavailability (same pattern as prefetch gate)
    • Return NotFound to the requesting client when the gate rejects a pull
    • Add corresponding config documentation and metric (decdn_pull_through_rejected_unauthorized_total or similar)

    Pre-conditions:

    Generated by Agentic Triage for issue #821 · sonnet46 623.8K · ◷

    Add this agentic workflows to your repo

    To install this agentic workflow, run

    gh aw add githubnext/agentics/workflows/issue-triage.md@94ec5db57374c5b04a4b8eef8b4413f9af44d63f
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

design:consistencydesign:missing-decision

Fields

Priority

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions