Skip to content

id: holder discovery for blob hashes — provider table, gossip announcements, wire the blob gate #2260

Open

Description

@dezren39

Parent: #2050 (investigation: BitTorrent-style chunk retrieval for graph objects), epic #2056. Follow-up A of the #2050 investigation (full text on #2050, 2026-10-29).

Problem

pkgs/id can discover servers but not content. src/discovery.rs gossip announcements (id-peer-discovery-v1, 30s announce / 120s stale) carry peer presence only — nothing says which blob hashes a peer holds. And the blob access gate in src/blob_gate.rs (fetch/observe decided by membership in a world referencing the hash; observe answers size + held ranges) is not wired into id serve because its WorldAccess reference index (hash → worlds referencing it) "has no producer yet" (blob_gate.rs module doc).

Without a hash→holders index, multi-holder retrieval (#2050 follow-up B) has nobody to schedule from, and holder queries cannot be answered safely for private worlds.

Scope

  • Provider table in pkgs/id: hash → set of (EndpointId, held-ranges summary: complete / ranges / unknown, last-seen), fed by (1) world/doc sync state — peers observed Complete for a hash, the pattern iroh-docs' ProviderNodes uses for iroh-blobs' ContentDiscovery trait — and (2) gossip holder announcements on the existing discovery plane (per-world; full hash sets for small worlds, a compact summary format for large ones — choose and document the format).
  • Produce the blob_gate reference index from the world graph (artifacts/documents naming a hash) and wire blob_events into id serve so fetch/observe are gated as designed. Refusals must stay indistinguishable for unknown vs forbidden hashes; observe stays off by default and world-narrowable only downward.
  • A public server for a world must be able to answer holder queries for that world from its provider table (the rendezvous role in id: investigate: BitTorrent-style chunk retrieval for graph objects #2050 §2, channel 3).

Acceptance criteria

  • A node that holds none of a world's blob can obtain a candidate holder list for its hash from sync state, gossip announcements, or the world's public server.
  • id serve enforces the blob gate on get/get_many/observe with the reference index populated; tests cover member-allowed, non-member-refused, and unknown-hash-indistinguishable cases.
  • Holder announcements never leak holdings of a membership-gated world to non-members.
  • Stale holders expire on the discovery plane's existing announce/stale cadence shape.

Not in scope: the retrieval scheduler itself (follow-up B), global/Mainline discovery (follow-up D).

Activity

  1. added
    app/idPackage/app: id (pkgs/ or apps/ in this repo)
    on Oct 29, 2026
  2. developing-today commented on Oct 29, 2026

    @developing-today
    Contributor
  3. added
    queue/queuedHas a queued task in the Supabase agent queue
    task/small-fixQueue packet kind: bounded fix with reproduction and targeted tests
    on Nov 1, 2026
  4. dezren39 commented on Nov 1, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · handed off

  5. added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed
    queue/queuedHas a queued task in the Supabase agent queue
    on Nov 1, 2026
  6. dezren39 commented on Nov 1, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · picked-up

  7. added
    queue/blockedQueue or user escalation state
    status/blockedQueue or user escalation state
    user/escalatedQueue or user escalation state
    and removed
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Nov 1, 2026
  8. dezren39 commented on Nov 1, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · escalated

    • Agent: queue worker (repo-worker-code), openchamber-scheduled-lane
    • Session / ID: task 5806
    • Task: Implement per-world blob holder discovery and membership-gated serving.
    • Finding: LocalEvents::publish writes group=None; EventStore::documents() exposes no world binding; id serve has no authoritative membership source for these documents; existing discovery is a shared public topic with self-asserted peer announcements. Public holder announcements would risk leaking private-world holdings.
    • Decision needed from Drew: define canonical document↔world association and unscoped-document behavior; serve-side membership source; authenticated private holder query/announcement or explicit deferral; public-server/rendezvous semantics; and what sync evidence proves bytes/ranges are held.
    • Evidence: doc/2026-11-01T17-10-00Z_investigation_id_holder_discovery/2026-11-01T17-10-00Z_investigation_id_holder_discovery.md in the task worktree on branch queue/5806-2260-id-holder-discovery; source refs pkgs/id/src/local_events.rs:201-211, pkgs/id/src/event_store/documents.rs:31-77, pkgs/id/src/commands/serve.rs:858-863.
    • Tests: existing baseline cargo test --no-default-features --features world --test blob_gate passed (8 passed, 0 failed) in nix develop ./pkgs/id; no implementation tests, since no code changed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

app/idPackage/app: id (pkgs/ or apps/ in this repo)queue/blockedQueue or user escalation statequeue/queuedHas a queued task in the Supabase agent queuestatus/blockedQueue or user escalation statetask/small-fixQueue packet kind: bounded fix with reproduction and targeted testsuser/escalatedQueue or user escalation state

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions