Skip to content

node never tops up its buyer channels, so an exhausted channel silently degrades pull-through forever #1146

Closed

Description

@thiras

Spun out of the multi-agent review on #1145.

Problem

BuyerChannelService::top_up exists but has no caller anywhere in crates/node (grep: only the definition). The node opens a buyer channel and then never refills it. The CLI has a low-water auto-refill (#1103); the node does not.

Why it now matters more

ServeRejectReason::wire_error deliberately collapses seven server-side reasons onto the wire NotFound — including InsufficientDeposit, UnknownChannel, and OwnerMismatch. Those three mean our own channel is broken, not "the peer is empty".

#1145 (#1144) correctly stopped scoring a NotFound refusal as Unreachable — a reachable, honest, empty peer is not unreachable, and blaming the peer for our broken channel was the wrong attribution. But that removed an accidental mitigation:

  • Before: exhausted channel → NotFound → scored Unreachable → the EWMA steered the node away from that provider. Wrong reason, but self-limiting.
  • After: exhausted channel → NotFound → no signal at all → the provider stays top-ranked → every miss wastes a round trip on it, forever.

Fetches still succeed (the candidate loop falls through to #2), so this is waste + a dead channel + a stuck deposit rather than a hard break. But it is invisible: it logs at debug! and lands in an undifferentiated node_pull_refused counter whose own docs tell the operator not to worry.

Note the wire code cannot distinguish this: InsufficientDeposit and CacheMiss are both NotFound by design (anti-probing). The buyer must detect it from local state — it knows its own channel's remaining deposit — which is exactly what top_up is for.

Suggested work

Related

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

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions