Skip to content

node-origin: the coverage-union probe round never spans for the empty root (zero-block target) #2526

Closed

Description

@thiras

Problem

CoverageUnionTracker::spans() (crates/node/src/node_origin/mod.rs, CoverageUnionTracker) is self.target > 0 && …. For the empty root num_blocks(0) == 0, so target stays 0 and spans() is never true, whatever the holders answer.

The pull leg gathers with ProbeGather::CoverageUnion (crates/node/src/node_origin/pull_leg.rs). For the empty root that means:

  • the probe round never ends early on a holder; it waits for every probe to answer or time out,
  • coverage_spans(&candidates) is false, so probe_and_rank always runs the second origin-directory round,
  • spanning_cached_candidates never treats the probe cache as a hit.

The pull still succeeds (the holders reach candidates), so this is latency, not failure. In production the path is unreachable today: iroh-blobs reports the empty root complete at size 0 on every backend, so a node's own store answers has() before a serve-miss is raised. Only a direct Origin::fetch (as in node_origin_discovers_the_empty_blob_by_probe) reaches it.

Found in the review of #2471.

Fix direction

Treat the round as spanning when the requested hash is decdn_protocol::EMPTY_ROOT and at least one holder is admitted. Key it on the hash, as ProbeResponseExt::consistent_with does, not on total_bytes_hint == Some(0): the hint is unsigned, so one lying holder could otherwise end every gather after its own answer. Pass the hash into the tracker, or check hash == EMPTY_ROOT && !candidates.is_empty() beside union.spans() and coverage_spans. Add a coverage_spans unit test on a Some(0) hint.

Activity

  1. self-assigned this
    on Oct 18, 2026
  2. moved this from Backlog to In progress in deCDNon Oct 18, 2026
  3. moved this from In progress to Done in deCDNon Oct 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

Priority

None yet

Projects

  • Status
    Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions