-
-
Notifications
You must be signed in to change notification settings - Fork 311
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
PrepareNextSlot scheduler #4209
Conversation
Performance Report✔️ no performance regression detected Full benchmark results
|
// At 1/3 slot time before the next slot, we either prepare payload or precompute epoch transition | ||
await sleep(slotMs - slotMs / SCHEDULER_LOOKAHEAD_FACTOR, this.signal); | ||
|
||
const {slot: headSlot, blockRoot: headRoot} = this.chain.forkChoice.getHead(); |
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.
should we try optimizing head for next slot, i.e. process attestations of this clockSlot
as well and call updateHead. it would reduce any reorgs possibility immensely.
LGTM @tuyennhv looks amazing! just a small optimization point if we want to do it. |
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.
LGTM, file conflict tho
bbc79e0
to
272fc60
Compare
272fc60
to
eadb139
Compare
Motivation
importBlock()
Description
prepareEpoch === headEpoch
butprocessSlot()
is cheap enough, we'll need the next state to prepare payload anyway. IfprepareEpoch === headEpoch+1
, we need to do epoch transition first anyway to know the proposersprocessSlot()
call inimportBlock()
Closes #4054