-
-
Notifications
You must be signed in to change notification settings - Fork 291
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
Run forkChoice to get correct head for proposal #4058
Conversation
Performance Report✔️ no performance regression detected Full benchmark results
|
// Process the queued attestations in the forkchoice for correct head estimation | ||
// forkChoice.updateTime() might have already been called by the onSlot clock | ||
// handler, in which case this should just return. | ||
chain.forkChoice.updateTime(slot); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
calling forkChoice.updateTime()
multiple times would calling processAttestationQueue()
multiple times.
I think we should do early return in forkChoice.updateTime(slot)
if this.fcStore.currentSlot >= slot
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
makes sense, updating! 👍
Motivation
Run forkchoice update pre assembleBlock
Description
Runs updateTime and updateHead to process any queued attestations to find the correct head for the proposal slot.
Context Discussion/specs PR:
ethereum/consensus-specs#2878
ethereum/consensus-specs#2897