Skip to content

WIP move store into fork-choice#53

Draft
dapplion wants to merge 1 commit into
unstablefrom
move-store-into-forkchoice
Draft

WIP move store into fork-choice#53
dapplion wants to merge 1 commit into
unstablefrom
move-store-into-forkchoice

Conversation

@dapplion
Copy link
Copy Markdown
Owner

Converting an anchor into ForkChoiceStore is very sensitive logic since you decide what you set the justified and finalized checkpoints to. It's odd that this piece of critical logic is left to the implementors of the trait ForkChoiceStore. This trait was meant originally to not add store complexity into the fork-choice crate.

This PR introduces a BalancesGetter trait to still leave to consumers the responsability to deal with the store but move the ForkChoiceStore initialization logic to the fork-choice crate.

It's a bit lengthy as the persistance of the fork-choice store has to move to the other crate and all setters and getters of the fc_store can be simplified.

TODO:

  • How to make it explicit what the justified balances are set to

@dapplion dapplion force-pushed the move-store-into-forkchoice branch from 28a3f9d to 3d50605 Compare November 1, 2025 09:51
@dapplion dapplion changed the base branch from fork-choice-optimistic-mode to unstable November 5, 2025 00:35
@dapplion dapplion force-pushed the move-store-into-forkchoice branch from b3bac1e to 791dbd3 Compare November 5, 2025 00:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant