You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
node: WatcherConfig::confirmations is wired but never engaged — a reorg guard the code advertises and never applies #1227
WatcherConfig::confirmations exists, is documented, and has a unit test — but every one of the six watcher construction sites passes 0, so scan_upper_bound(head, 0) always returns head and the guard never does anything.
The field's own doc claims a property the code does not deliver:
Confirmation lag: the scan upper bound is head - confirmations, so the live tail never emits logs from the unstable chain tip.
It does emit from the tip. scan_upper_bound_lags_by_confirmations passes because it tests the pure function directly, not any live configuration — so the test provides false assurance that the guard is active.
Additionally, capacity_bond_registry passes reorg_margin: 0and is non-persisting, so that watcher has no reorg protection of any kind: it scans to head, never rewinds, never persists.
Why it matters
Not that this is necessarily wrong — on Arbitrum, with a single sequencer, reorgs past the confirmed head aren't a practical concern, which is presumably why every site passes 0. The problem is that the code claims a guard it doesn't apply, so a future reader (or a future L1/L2 deployment) will believe the live tail is confirmation-lagged when it isn't.
Options
Delete it — drop the field, its doc, and the test; document in chain_events that the design deliberately scans to head and why Arbitrum makes that safe.
Wire it — give it a real non-zero default (or a config knob) and let the doc become true.
(1) is probably right for the current single-chain target, but it's a decision that should be made explicitly rather than left as a dormant field.
Found while doing #1110. Not introduced by it — pre-existing since #1106.
Activity
refactor(node): delete the dormant confirmations knob (#1227)
docs(node): correct the reorg_margin claims this PR got wrong (#1227)
refactor(node): delete the dormant confirmations knob (#1227) (#1235)
refactor(node): split watcher CursorPolicy into CursorStart + owned C…
docs: correct the pool-vocabulary rewrites against the code (#2402)
docs: retire payment-channel vocabulary in node comments (#2404)