ChainSafe / ChainSafe/lodestar

Isolate Fast Confirmation state from core fork-choice store

Open
#9,437 0 comments 0 reactions 1 assignee Claimed by @nazarhussain View on GitHub
Dominant language
TypeScript
Stars
1.4k
Forks
483
Avg merge
1d 16h
Merged PRs (30d)
150

Description

Fast Confirmation currently extends the core fork-choice store contract via `IForkChoiceStore extends IFastConfirmationStore`. This makes FCR-specific fields part of every fork-choice store, mock, and test setup even when chain.fastConfirmation is disabled.

Refactor FCR state into a separately owned optional store.

Proposed direction:

- Introduce `FastConfirmationStore`.
- Instantiate it only when Fast Confirmation is enabled.
- Keep `IForkChoiceStore` focused on canonical fork-choice state.
- Avoid requiring non-FCR fork-choice consumers/tests to model FCR fields.
- Expose only stable public fork-choice methods such as getConfirmedRoot() / getConfirmedBlock().

## Motivation:

- Makes FCR truly optional at the store/interface level.
- Reduces test/mock boilerplate.
- Prevents experimental FCR internals from becoming part of the core fork-choice contract.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.