ChainSafe / ChainSafe/lodestar
Isolate Fast Confirmation state from core fork-choice store
- 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
Assessment
This issue has not been assessed yet.