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

Merged
merged 9 commits into from
Jan 23, 2025
Merged

change StateSelector logic #8985

merged 9 commits into from
Jan 23, 2025

Conversation

rolfyone
Copy link
Contributor

@rolfyone rolfyone commented Jan 13, 2025

fixes #7955

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
Copy link
Member

@lucassaldanha lucassaldanha left a comment

Choose a reason for hiding this comment

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

LGTM

@rolfyone rolfyone enabled auto-merge (squash) January 23, 2025 07:58
@rolfyone rolfyone merged commit 3b29505 into Consensys:master Jan 23, 2025
16 checks passed
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
2 participants