Skip to content

node: the capacity-bond registry resync has no failure counter or liveness gauge #1810

Closed

Description

@thiras

Surfaced by the review of #1806 (issue #1561).

RegistrySink::on_tick_complete (crates/node/src/dht/capacity_bond_registry.rs) is the only systematic repair for a drifted active-staker set. When its full_snapshot read fails it logs and returns Ok:

warn!(%err, "capacity-bond registry resync failed; keeping current projections");

That is the sole occurrence of the string in the crate — there is no counter and no gauge. Returning Ok is deliberate and correct (an Err would mark the route errored and stall event pickup), but it means a persistently failing resync moves no metric at all. This is exactly the argument the same file uses ~130 lines above to justify staker_set_watcher_resolve_failure().

Two compounding behaviours make the silence worse, and both are correlated with the RPC fault that caused the drift in the first place:

  1. The resync is skipped entirely while the route is errored. reconcile_routes (crates/node/src/chain_events/multiplexed_poller.rs) does if r.errored { continue; }. During the outage that drops a nodeIdOf, the repair does not run. A skipped reconcile emits nothing — not even the warn.
  2. A failed resync defers itself another full interval. last_resync is stamped before the read, so each failure buys another REGISTRY_RESYNC_INTERVAL of drift, unboundedly.

#1806 corrected the prose in chain_staker_set.rs, capacity_bond_registry.rs and metrics.rs to say the resync shortens the drift window rather than bounding it. This issue closes the observability half.

Suggested fix

  • decdn_capacity_bond_registry_resync_failures_total at the warn!.
  • decdn_capacity_bond_registry_last_resync_timestamp_seconds, stamped on the success path. The crate already uses this shape for *_last_tick_timestamp_seconds liveness gauges (node: chain watcher task panics are invisible (detached JoinHandle + zero-valued downtime gauge) #1316). A gauge is what actually catches case 1, since a skipped reconcile is otherwise indistinguishable from a healthy quiet loop.
  • Registry rows in adr/appendix-observability.md, plus alert thresholds alongside the existing staker-set rows.

Activity

  1. added
    prio:medium
    rust
    on Aug 24, 2026
  2. self-assigned this
    on Aug 24, 2026
  3. moved this from Backlog to In progress in deCDNon Aug 24, 2026
  4. moved this from In progress to Done in deCDNon Aug 25, 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

  • Status
    Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions