Skip to content

Add safe block visualization from fast_confirmation event stream - #792

Merged
barnabasbusa merged 11 commits into
masterfrom
bbusa/fcr
Jul 8, 2026
Merged

Add safe block visualization from fast_confirmation event stream#792
barnabasbusa merged 11 commits into
masterfrom
bbusa/fcr

Conversation

@barnabasbusa

@barnabasbusa barnabasbusa commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

Summary

Screenshot 2026-07-07 at 14 42 13 image

Config to test with:

participants_matrix:
  el:
    - el_type: geth

  cl:
    - cl_type: lodestar
      cl_extra_params:
        - --chain.fastConfirmation=true
    - cl_type: nimbus
    - cl_type: grandine
      cl_image: ethpandaops/grandine:bomanaps-feature-fcr-minimal
      cl_extra_params:
        - --fast-confirmation-rule
    - cl_type: prysm
  count: 2
global_log_level: debug
network_params:
  preset: minimal

additional_services:
  - dora

Adds support for the fast_confirmation beacon event stream topic (fast confirmation rule, see ethereum/beacon-APIs#616) and visualizes the resulting safe block in the UI.

Backend

  • Subscribes to the fast_confirmation topic as an optional ancillary SSE stream per beacon node. 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, with no config needed.
  • Parses the event payload (block, slot, and the optional current_slot added by beacon-APIs#616) with a local type, since the pinned go-eth2-client doesn't carry current_slot yet.
  • Tracks the most recent fast confirmed (safe) block per client (Client.GetLastFastConfirmation()) and network-wide in the chain state (ChainState.GetFastConfirmedBlock(), monotonic by slot), plus a per-client SubscribeFastConfirmationEvent() dispatcher for future consumers.

Frontend

  • Index page: the network overview shows the safe slot next to the current slot (with a shield indicator), and canonical slots at/below the safe slot get a shield marker in the recent slots list. Both update live via the existing /index/data polling.
  • Consensus clients page: new sortable "Safe Slot" column showing each node's last fast confirmed block (linked to the slot page). The column only appears when at least one node reports fast confirmations; nodes without FCR show a dash.
  • API: /v1/clients/consensus now includes fcr_enabled, safe_slot and safe_root per client, and a new dedicated /api/v1/network/fast_confirmation endpoint returns the network-wide safe block (slot, root, epoch, last confirmation time) plus per-client fast confirmation status.

The UI additions are hidden entirely on networks where no node emits fast confirmation events.

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
@barnabasbusa barnabasbusa added the build-docker-image Automatically build docker image for PR branch label Jul 7, 2026
Dedicated API method returning the network-wide safe block (slot, root,
epoch, last confirmation time) plus the per-client fast confirmation
status.
Comment thread clients/consensus/clientlogic.go
barnabasbusa and others added 6 commits July 7, 2026 15:19
Iteration 1 of the safe block visualization: the block dot in the chain
fork graph (index, slots and blocks pages) turns green for canonical
blocks at or below the network-wide safe slot.
Iteration 2 of the safe block visualization: fast confirmed blocks get a
shield icon next to the status pill on the slots and blocks pages,
matching the index page recent slots list.
Iteration 3 of the safe block visualization: canonical blocks at or below
the safe slot get a teal "Proposed" pill instead of the default green,
on the index, slots and blocks pages.
Settle on the shield icon in the status column as the single safe block
visualization: drop the green fork graph dot and the teal status pill
variants again, and add the shield to the filtered slots and filtered
(EL) blocks views.
@barnabasbusa
barnabasbusa enabled auto-merge July 7, 2026 14:03
@barnabasbusa
barnabasbusa merged commit 3eae175 into master Jul 8, 2026
11 checks passed
@barnabasbusa
barnabasbusa deleted the bbusa/fcr branch July 8, 2026 09:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build-docker-image Automatically build docker image for PR branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants