Skip to content

Fast Confirmation Rule - #4747

Merged
jtraglia merged 110 commits into
ethereum:masterfrom
mkalinin:fast-conf-rule
Apr 16, 2026
Merged

Fast Confirmation Rule#4747
jtraglia merged 110 commits into
ethereum:masterfrom
mkalinin:fast-conf-rule

Conversation

@mkalinin

@mkalinin mkalinin commented Nov 18, 2025

Copy link
Copy Markdown
Contributor

Introduction

This PR introduces a modified version of the Fast Confirmation Rule algorithm introduced in #3339.

Modified algorithm starts its confirmed chain from a safe checkpoint and attempts to advance a confirmed block
at the beginning of each slot by finding the most recent confirmed block in the canonical chain. Then the confirmed_root is kept in the Store and is used as the starting point of the algorithm run during the next slot. This iterative approach is one of the main differences comparing to the original version.

A new version also have a few modifications improving the algorithm performance, i.e. reducing distance to the most recent confirmed block in e.g. empty slot case.

There is A Short Explainer covering the logic and rationale of the modified version of the algorithm.

Performance

Screenshot 2025-11-18 at 17 28 55

Changeset

  • Store is extended with three fields, one of them is confirmed_root and the other two are required for the algorithm needs. Alternatively, there can be a separate FCRStore class, however, it reduces readability of the spec.
  • get_latest_message_epoch is introduced, because Gloas replaces epoch with slot, but the algorithm needs access to LatestMessage.epoch
  • New on_slot_after_attestations_applied handler that basically does two things:
    • calls get_latest_confirmed function and updates store.confirmed_root
    • updates other algorithm variables in the store
  • A bunch of helper functions to make reads from the Store more convenient
  • Algorithm logic encapsulated into get_latest_confirmed function which does several underlying calls
  • safe block is switched from store.justified_checkpoint.root to store.confirmed_root

Dependencies

Comparing to the Fork Choice implementation the algorithm has the following dependencies:

  • Uses committee shuffling for the previous and the current epoch
  • Uses Checkpoint state of the previous and current epoch checkpoints
  • Needs access to each vote separately and computes an LMD-GHOST score based on the state of the previous or current epoch checkpoint
  • Discounts proposer boost weight when computing an LMD-GHOST score in FCR

Testing

Tests are planned to be a part of a separate PR. The main idea behind tests is to extend the Fork Choice test format with on_slot_after_attestations_applied handler and confirmed_root property check and defined a separate FCR generator.

ToDo

tersec pushed a commit to status-im/nimbus-eth2 that referenced this pull request Apr 13, 2026
get_safe_beacon_block_root was renamed to retrieve_fast_confirmed_root
in the specs:

- ethereum/consensus-specs#4747
@mkalinin
mkalinin requested a review from 0xMushow April 14, 2026 05:45
Comment thread specs/phase0/fast-confirmation.md Outdated

@0xMushow 0xMushow left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Left a couple more nits, and inconsistencies in using !=, ==, vs is not and is in .py file.

Comment thread specs/phase0/fast-confirmation.md Outdated
Comment thread specs/phase0/fast-confirmation.md Outdated
Comment thread specs/phase0/fast-confirmation.md Outdated
Comment thread specs/phase0/fast-confirmation.md Outdated
Comment thread specs/phase0/fast-confirmation.md
Comment thread tests/core/pyspec/eth_consensus_specs/test/helpers/fast_confirmation.py Outdated
Comment thread tests/core/pyspec/eth_consensus_specs/test/helpers/fast_confirmation.py Outdated
Comment thread specs/phase0/fast-confirmation.md Outdated
Comment thread specs/phase0/fast-confirmation.md Outdated
Comment thread tests/formats/fork_choice/README.md

@jtraglia jtraglia left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, great work everyone! 🙂

I would appreciate reviews from clients that have worked on implementing this.

cc @etan-status @dapplion @terencechain @nazarhussain

@nazarhussain

Copy link
Copy Markdown
Contributor

LGTM. Amazing addition to Ethereum network feature set.

@jtraglia

Copy link
Copy Markdown
Member

All, I believe this PR is ready to be merged. I know some clients have already implemented this and I can confirm that at least one client passes all of the FCR tests from the latest version of this PR. If for whatever reason there is an issue, we can always follow up with a fix. Great work everyone!

@jtraglia
jtraglia merged commit 6deb93b into ethereum:master Apr 16, 2026
15 checks passed
@saltiniroberto saltiniroberto mentioned this pull request Apr 17, 2026
12 tasks
GrapeBaBa added a commit to ChainSafe/lodestar-z that referenced this pull request May 1, 2026
Add empty FastConfirmation module skeleton with struct fields, init/deinit,
and CONFIRMATION_BYZANTINE_THRESHOLD config constant. Spec helpers and
algorithm follow in subsequent commits.

Spec: ethereum/consensus-specs#4747
Reference: Lighthouse PR sigp/lighthouse#8951
nflaig pushed a commit to ethereum/beacon-APIs that referenced this pull request May 11, 2026
Introduces `fast_confirmation` event with the following fields:
* `block`: A beacon block root output by the Fast confirmation rule.
* `slot`: A slot of the confirmed beacon block.

This event is supposed to be triggered after each execution of the Fast
confirmation rule which should happen once per slot.

Fast confirmation rule is an algorithm that runs on top of the beacon
chain consensus protocol and outputs a beacon block that won’t be
reorged if network synchrony and adversarial threshold assumptions hold.
Introduced by ethereum/consensus-specs#4747

### Rationale
Fast confirmed block is a property of the beacon chain consensus
protocol similar to finalized block and head which might be useful for
consumers of the beacon chain data e.g. L2s. For JSON-RPC API consumers
there is a “safe” block tag that denotes block hash of the most recent
confirmed payload.
nflaig pushed a commit to ChainSafe/lodestar that referenced this pull request Jun 7, 2026
**Motivation**

Introduce assumption based fast confirmation rule. 

**Description**

Specs: ethereum/consensus-specs#4747
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

eip7805 FOCIL gloas phase0 testing CI, actions, tests, testing infra

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants