Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change StateSelector logic #8985

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

change StateSelector logic #8985

wants to merge 6 commits into from

Conversation

rolfyone
Copy link
Contributor

fixes #7955

needs more testing, need to see how AT goes initially.

alternative solution to #8782

Documentation

  • I thought about documentation and added the doc-change-required label to this PR if updates are required.

Changelog

  • I thought about adding a changelog entry, and added one if I deemed necessary.

fixes Consensys#7955

needs more testing, need to see how AT goes initially.

Signed-off-by: Paul Harris <[email protected]>
@rolfyone
Copy link
Contributor Author

also moved some private functions to the bottom (breaks my own rule of not refactoring). The new functionality was a finalized selector similar to teh justified flow in CombinedChainDataClient, and a getBestFinalizedState which essentially determines the finalized slot to refer to in the same way on_block does.

Comment on lines -90 to -92
// The finalized checkpoint may change because of optimistically
// imported blocks at the head and if the head isn't optimistic, the
// finalized block can't be optimistic.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

there was nothing testing this.

i went with the on_block implementation of the finalized state where we base it off of the checkpoint.

@rolfyone rolfyone marked this pull request as ready for review January 17, 2025 01:28
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.

Finalized state from debug/state API is incorrect on epochs with empty slots in the end
1 participant