Skip to content

Avoid duplicate metric events in FCR - #11198

Open
zilm13 wants to merge 1 commit into
Consensys-Incorporated:masterfrom
zilm13:fcr-fix-metrics
Open

Avoid duplicate metric events in FCR#11198
zilm13 wants to merge 1 commit into
Consensys-Incorporated:masterfrom
zilm13:fcr-fix-metrics

Conversation

@zilm13

@zilm13 zilm13 commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

PR Description

Was in backlog for FCR, see #10994
Fixing it according to the spec

Fixed Issue(s)

Documentation

  • I thought about documentation and added the doc-change-required label to this PR if updates are required.

Changelog

  • I thought about adding a changelog entry, and added one if I deemed necessary.

Note

Low Risk
Observability-only changes to fast confirmation counters and reorg classification; core confirmation logic is unchanged aside from not double-counting metrics.

Overview
Fast confirmation reorgs, fallbacks, and restarts counters now increment once per episode instead of on every slot where the condition holds. Episode state uses lastConfirmationOutcome (fallback vs restart vs advanced, with restart keyed by observed justified root) and a separate previousSlotWasReorg flag so chain switches and outcome types can be counted independently.

Warm-up after init/reinit no longer counts as a fallback when confirmed_root stays on finality. Slots that skip or abandon confirmation leave episode state unchanged. Reorg detection treats roots missing from fork choice (e.g. pruned previous confirmed root) as not a reorg. Metric help text documents episode semantics; tests cover consecutive slots, advancing finalization, checkpoint rotation, abandoned slots, and Fulu/Gloas.

Reviewed by Cursor Bugbot for commit 0958ee2. Bugbot is set up for automated code reviews on this repo. Configure here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant