Skip to content

node: bound the remaining sink-internal RPC reads (getOrigins, getChannel) — a stalled provider still wedges a watcher tick #1228

Closed

Description

@thiras

What

chain_events::timed bounds only the calls it wraps: the loop's own eth_getLogs, shared_head's eth_blockNumber, and any sink read that wraps itself. A follow-up RPC issued from inside LogSink::apply is otherwise unbounded — the alloy HTTP provider has no request timeout of its own, so a provider that holds the connection open and never responds wedges the tick forever, silently stopping event processing and blocking graceful shutdown.

timed's own doc has called this out since #1106.

Current state

Self-bounding (done):

Still unbounded:

  • chain_origin_directory — getOrigins re-read in on_tick_complete
  • payment_settlement — getChannel via reconcile_closing_channel (ChannelCloseInitiated arm)
  • reputation_indexer — nodeIdOf, 1–2 per ChannelSettled (provider + client legs)

The settlement one is on the payment-critical path.

Suggested shape

timed now accepts IntoFuture, so an alloy .call() wraps directly with no .into_future() at the call site:

let ch = timed(None, "getChannel", contract.getChannel(id).call()).await?;

Each site needs its own decision on what a timeout means there — for nodeIdOf in the registry it degrades to the existing counted-and-skipped path; for getChannel it should probably be retryable (fail the tick, back off).

Alternative worth considering

Rather than N self-bounding call sites, give LogSink a bounded provider handle so sink reads are timed by construction. That removes the "unless the sink wraps itself" footgun entirely, at the cost of a wider refactor.

Follow-up from #1110 / #1226.

Activity

  1. added
    prio:medium
    rust
    on Jul 16, 2026
  2. self-assigned this
    on Jul 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

prio:mediumrust

Type

No type

Fields

Priority

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions