Add current_slot to fast_confirmation event - #616
Merged
Conversation
nflaig
reviewed
Jun 5, 2026
Co-authored-by: Nico Flaig <nflaig@protonmail.com>
nflaig
reviewed
Jun 8, 2026
Co-authored-by: Nico Flaig <nflaig@protonmail.com>
mkalinin
approved these changes
Jun 8, 2026
nflaig
pushed a commit
to ChainSafe/lodestar
that referenced
this pull request
Jun 9, 2026
- Wires the new `fast_confirmation` Server-Sent Event from beacon-APIs PR [#598](ethereum/beacon-APIs#598). The event fires once per slot whenever the Fast Confirmation Rule executes and carries `{block, slot}`, where `slot` is the slot of the confirmed beacon block. - Crosses the fork-choice ↔ beacon-node boundary via a new optional `onFastConfirmation` callback on `ForkChoiceStore`, mirroring the existing `onJustified` / `onFinalized` plumbing. The emit is invoked from `ForkChoice.runFastConfirmation()` after the rule succeeds. - Removes the now-redundant Lodestar-namespace endpoint `GET /eth/v1/lodestar/fast_confirmation_info` (and its `getConfirmedBlock` helper) — the standard SSE event supersedes it, and the head/checkpoint fields it bundled are already available via standard beacon-API endpoints. This PR is aligned with the changes proposed in ethereum/beacon-APIs#616 ### Architecture ``` Chain.onClockSlot → forkChoice.updateTime └── (per tick) runFastConfirmation └── fcStore.notifyFastConfirmation({block, slot}) └── ChainEventEmitter.emit(EventType.fastConfirmation, {block, slot}) └── SSE subscribers via /eth/v1/events?topics=fast_confirmation ``` `ApiEvents` in `ChainEventEmitter` is derived from `routes.events.EventType`, so adding the new variant flows through automatically — no per-event boilerplate in the chain or events API layers. ### Edge cases | Scenario | Behavior | |---|---| | `--chain.fastConfirmation` disabled (default) | No emit (FCR doesn't run) | | FCR rule throws | No emit; existing warn-and-continue catch is unchanged | | Confirmed root not in `protoArray` (defensive) | Warn log with `slot`+`confirmedRoot`, skip emit | | `updateTime` advances multiple slots | One emit per tick |
dapplion
approved these changes
Jun 9, 2026
barnabasbusa
added a commit
to ethpandaops/dora
that referenced
this pull request
Jul 8, 2026
Subscribe to the fast_confirmation beacon event stream topic (fast confirmation rule, see ethereum/beacon-APIs#616) as an optional ancillary SSE stream. Nodes that don't support the topic reject the subscription with a 4xx response, in which case the stream silently gives up, so the feature auto-activates only on FCR-enabled nodes. The most recent fast confirmed (safe) block is tracked per client and network-wide in the chain state, and visualized in the frontend: - index page: safe slot next to the current slot in the network overview, and a shield marker on fast confirmed slots in the recent slots list - consensus clients page: sortable "Safe Slot" column (only shown when at least one node reports fast confirmations) - /v1/clients/consensus API: fcr_enabled, safe_slot and safe_root fields
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
current_slot(wall-clock slot at execution time) to thefast_confirmationevent payload, alongside the existingblockandslotof the most recent confirmed block.Motivation
Without
current_slot, consumers cannot distinguish a fresh FCR run that re-confirmed the same block from a stale or missed emission. Making the emission cadence explicit in the spec removes ambiguity about whether implementations may suppress unchanged results.