Skip to content

node: default node-to-node pull-through on for a node with no origin backend, with a bounded working budget #2603

Description

@thiras

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_usdc gets a small default (enough for one day of misses at the fleet's observed rate, documented in the runbook) instead of being required config, and decdn setup prints the figure and asks for a USDC balance that covers it.
  • When the buyer wallet holds no USDC, the miss serves NotFound as today and the node logs once per hour that pull-through is enabled but unfunded, with the exact pull_unreachable_total-style counter so the operator can see it in decdn node status.
  • The devops role drops its own derivation and passes the knob through, so the two defaults cannot drift again.

Alternatives considered

Design scope

  • This proposal changes the protocol, the economics, or the contract surface.

A config default. The wire and the pool are unchanged.

Related

Activity

  1. added
    kind:feature
    prio:high
    on Oct 24, 2026
  2. added theissue type on Oct 24, 2026
  3. added
    area:node
    area:cache
    on Oct 24, 2026
  4. added this to the v0.3 milestone on Oct 28, 2026
  5. self-assigned this
    on Oct 28, 2026
  6. moved this from Backlog to In progress in deCDNon Oct 28, 2026
  7. moved this from In progress to Done in deCDNon Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:cachearea:nodekind:featureprio:high

Fields

Priority

None yet

Projects

  • Status
    Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions