Repository navigation
Description
Component
node (decdn-node daemon)
Who it affects
node operator, client (someone running decdn get or the gateway), publisher (someone importing content or sponsoring downloads)
Problem
The flash-crowd post says "every cache miss builds a new server: a node that lacks the bytes pulls them from a peer and pays for the pull." The daemon's default says the opposite. node_to_node_pull_through_enabled is documented in crates/common/src/config/types.rs as "absent / false (the default) → a cache miss serves NotFound", and "OFF by default for the initial network". A node started from decdn config init or the README refuses every miss.
The devops role already disagrees with the daemon: decdn_node_to_node_pull_through_enabled defaults to on for a node with no origin backend, so a fleet node and a hand-installed node behave differently on the same miss. A hand-installed node is also the one with no origin, so it is the one the default hurts most.
Proposed solution
Make the daemon default role-derived, the way relay_foreign_namespaces already is: absent resolves to on when no origin backend is configured (a cache node exists to fill misses) and off when one is (an origin node serves its own content and refuses foreign hashes anyway). An explicit value overrides either.
Guard the money, not the feature:
- The pull is already gated behind a valid, pool-bound client request, so an unpaid request cannot drive egress. Keep that.
- Bound the working budget by default:
blockchain.buyer_working_deposit_micro_usdcgets a small default (enough for one day of misses at the fleet's observed rate, documented in the runbook) instead of being required config, anddecdn setupprints the figure and asks for a USDC balance that covers it. - When the buyer wallet holds no USDC, the miss serves
NotFoundas today and the node logs once per hour that pull-through is enabled but unfunded, with the exactpull_unreachable_total-style counter so the operator can see it indecdn node status. - The devops role drops its own derivation and passes the knob through, so the two defaults cannot drift again.
Alternatives considered
- Keep off, fix the blog. The post describes the design ADR 001/022 specify; the default is the thing that is wrong. A network where misses are refused is a static mirror, and the flash-crowd argument does not hold for it.
- On everywhere, including origin nodes. An origin node refusing foreign namespaces is a deliberate policy (design: cold-blob non-holder fallback targets nodes whose default relay_foreign_namespaces refuses it — ADR 037 warming vs ADR 002 origin-only policy is undocumented #1990); the role-derived default keeps it.
Design scope
- This proposal changes the protocol, the economics, or the contract surface.
A config default. The wire and the pool are unchanged.
Related
- Origin-only policy vs warming: design: cold-blob non-holder fallback targets nodes whose default relay_foreign_namespaces refuses it — ADR 037 warming vs ADR 002 origin-only policy is undocumented #1990
- Bonded non-holders refusing pull-through: node: bonded non-holders still refuse pull-through with NotFound (pull_leg_miss, cause=clean_miss) after #2345 (hel1 37 in one batch, mostly on SDXL complement ranges) #2366
- Fleet inherits the devops default today (decdn/devops role
decdn_node), so the fleet is already on; this makes the daemon match.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Projects
- StatusShow more project fieldsDone
Activity