Repository navigation
Description
Follow-up to #2709. Lands after it merges.
#2709 adds an end-of-tick re-anchor to the settlement sink. reanchor_pools re-reads each snapshot-seeded pool, meaning a pool the admit path seeded from one getPool after a restart, at a pinned block. The path reports its outcomes only through logs:
warn!when the block-number read faults;warn!when agetPoolread faults;debug!when the block number is behind the watcher;debug!when a pool is absent at the pinned block;debug!when aClosedpool is forgotten.
PoolProjection::reanchor skips a stale read (below folded_through, or with a totalRedeemed or deposit below the entry's) with no signal at all. It returns (), so its caller cannot count the skips either.
Several of these states can last indefinitely, and an operator cannot see them:
- An open dropped by a reorg. A seeded pool whose open a reorg dropped reads as absent on every tick. It stays pending, and the admit path keeps serving it from the seed.
- A reorg that lowers
totalRedeemedor the deposit. Every re-read is then skipped as stale until the chain passes the held value again, which may never happen on a quiet pool. A heldtotalRedeemedabove the chain's refuses a funded pool; a held deposit above the chain's serves past the pool's funds. - A persistent read fault, such as ABI drift on
getPool. It shows up only as onewarn!per rotation.
Each of these keeps the pool in pending_rereads() and costs one getPool per rotation.
Proposal
Follow the sibling-counter convention: one unlabeled counter per reason, and no reason label.
- Gauge
decdn_settlement_reanchor_pending_pools, set frompending_rereads().len()every tick. A gauge that never falls is the stuck-pool signal. - Counters for read faults:
decdn_settlement_reanchor_block_read_failures_totaldecdn_settlement_reanchor_pool_read_failures_total
- Counter
decdn_settlement_reanchor_behind_watcher_total, for a block number belowapplied_through. - Counter
decdn_settlement_reanchor_absent_total, for a pool absent at the pinned block. - Skip counters.
reanchorreturns the skipped reads with their reason; the caller counts them and logs awarn!naming the pool and both values:decdn_settlement_reanchor_skipped_below_folded_totaldecdn_settlement_reanchor_skipped_lower_redeemed_totaldecdn_settlement_reanchor_skipped_lower_deposit_total
- Counter
decdn_settlement_reanchor_anchored_total, for successful anchors, as the denominator. - Add every name as a row in
adr/appendix-observability.md(adr_registry_names_are_exportedgates them), and document them inMetricsinmetrics.rs. - decdn/devops: add a panel for the pending gauge and the skip and failure rates, plus an alert when
decdn_settlement_reanchor_pending_poolsstays above 0 for longer than a few rotations. - Consider whether the absent-pool case should forget the entry after N absent reads at blocks above the seed, so that the admit path re-resolves it. A dropped open currently stays served from its seed until the next restart, like the orphaned-
PoolOpenedresidual thechain_eventsmodule documents.
Names are proposals. Check them against the existing decdn_settlement_* family before adding.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Projects
- StatusShow more project fieldsDone
Activity