Skip to content

fCU early notification of finalized hash to FC. #3204

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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jangko
Copy link
Contributor

@jangko jangko commented Apr 9, 2025

Before fCU actually call FC.forkchoice, it will go through a series of validation, and the finalized hash may never arrive at FC.forkChoice at all although the finalized hash is valid. e.g. head, finalized, or safe block are being downloaded by the syncer.

Before fCU actually call FC.forkchoice, it will go through
a series of validation, and the finalized hash may never
arrive at FC.forkChoice at all although the finalized hash is valid.
e.g. head, finalized, or safe block are being downloaded by the syncer.
@@ -109,6 +108,7 @@ proc forkchoiceUpdated*(ben: BeaconEngineRef,
hash = headHash.short

# Inform the header cache (used by the syncer)
chain.notifyFinalizedHash(update.finalizedBlockHash)
Copy link
Member

Choose a reason for hiding this comment

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

should also update latestFinalizedBlockNumber with max(latestFinalizedBlockNumber, newNumber) ..

also, should set latestFCU even if we can't find the number

@arnetheduck
Copy link
Member

while this PR fixes the urgent base update issue, many of the checks and updates performed in api_forkChoice should probably move into forkChoice proper

@jangko jangko marked this pull request as draft April 15, 2025 01:48
@jangko jangko mentioned this pull request Apr 15, 2025
3 tasks
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.

2 participants