Repository navigation
Description
Component
node (decdn-node daemon)
Version
06955a38 (testnet, 2026-09-27)
Operating system
Ubuntu, testnet fleet (7 nodes)
Summary
A node that fills its cache only through ranged serve-miss pulls never publishes a DHT provider record for what it holds. Partial blobs are never announced, and a blob completed through ranged fills is announced only after the next restart. This does not match ADR 022 §STORE Flow (adr/022-content-discovery.md:149): "When a node verifies its first 64 MiB block of blob H — on any verified partial, not only on Complete". It also does not meet ADR 022 AC 21 and AC 25 (range-keyed partial-holder discovery).
Steps to reproduce
- Run a non-origin node that gets content only through serve-miss ranged pulls, for example a client bundle pull routed through it.
- Watch
decdn_dht_store_published_totaland the republish scheduler's cold-start log line on restart.
Expected behavior
The node publishes a provider record for H once it verifies its first 64 MiB block, and republishes H on the 30–50 min cycle.
Actual behavior
decdn_dht_store_published_total over the 24 h before 2026-09-27 21:55 UTC:
| Node | Published | Cache fill |
|---|---|---|
| fra1 | ≈224k | 87% |
| bcl (origin) | ≈29k | 26% |
| lon1 | ≈5.2k | 84% |
| nbg1 | ≈3.2k | 37% |
| ash1 | 0 | 19% |
| hel1 | 0 | 10% |
| hil1 | 0 | 0.5% |
The three zeros hold for the whole 26 h window. ash1 was serving mistral bundle ranges from its own cache during the check, with decdn_bytes_received_total rate 0.
- On every restart (09-26 20:32, 09-27 04:18, 10:03, 21:57), hel1's republish cold-start seed logged
cold_start_count: 0while 3.2 GB sat in its cache. fra1 logged 1038–1056. - hel1 and fra1 have identical
node.tomlapart fromregion, so no config setting explains the difference. - Every
dht_store_rejected_{non_staked,quota,holder_mismatch}counter is 0. The zero comes from nothing being sent, not from peers refusing.
fra1's volume matches what it holds and is not over-publishing. dht_routing_table_size is 6, which caps the K+3 fanout at 6. So 1038 hashes × 6 receivers / ~2400 s ≈ 2.6/s, which is what we observe.
Root cause
The scheduler in crates/node/src/dht/publish.rs learns a hash from three sources. None of them fires for a ranged fill:
- Eager publish on
CacheEngine::subscribe_inserts. The only senders are the whole-blobpull_throughcommits atcrates/cache/src/engine.rs:5000and:5006. The ranged serve-miss pull leg (ADR 037/038/039,handlers/client/serve_leg.rs) never sends an insert event. - Cold-start seed via
holder_snapshot(publish.rs:511). It usesiter_hashes, which keeps onlyBlobStatus::Completeblobs (engine.rs:4271), plus origin-held hashes. A range-filled blob is rarelyComplete. - Lag sweep. It runs only when the insert channel reports
Lagged.dht_republish_lag_sweeps_totalis 0 on every node.
The downstream checks already handle partials: cache_still_holds (publish.rs:1068) and fetch_coverage accept partial coverage. Partials just never enter the scheduler.
Impact
- Blocks cached on ash1, hel1 and hil1 never appear in
FIND_VALUEprovider lists. Other nodes' misses skip them and fall back to fra1, lon1, bcl or the origin. This defeats partial-holder supply. - On every node, a blob that becomes
Completethrough ranged fills stays unannounced until the next restart re-seeds it. fra1's holdings are visible only because it restarts often.
Fix
- Send a cache event when the first 64 MiB discovery block of a hash is verified on any fill path. This can be the existing insert channel or a new one.
- Make
holder_snapshotinclude partial blobs with non-empty coverage, so the cold-start seed and the lag sweep cover them. - Related limitation (
publish.rs:1063-1066): a non-origin front partial whose size is unknown gets empty coverage, socache_still_holdsreturnsSome(false)and the hash stays unannounced even after the two changes above. Handle it in the same fix.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Projects
- StatusShow more project fieldsDone
Activity