-
Notifications
You must be signed in to change notification settings - Fork 782
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
client: improve new payload and fcu block executions #2880
Conversation
fa4ec69
to
a43e389
Compare
Codecov Report
Additional details and impacted files
Flags with carried forward coverage won't be shown. Click here to find out more. |
9fddecb
to
862cb75
Compare
6b4ed8f
to
7c8b858
Compare
542904c
to
91f2f2f
Compare
|
||
const result = await this.vm.runBlock({ clearCache, ...opts }) |
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.
the diff here and below is because of the putting the code inside try catch
@@ -271,168 +279,170 @@ export class VMExecution extends Execution { | |||
if (this.running || !this.started || this.config.shutdown) return 0 | |||
this.running = true | |||
|
|||
// run inside a lock so as to not be entangle with runWithoutSetHead or setHead | |||
return this.runWithLock<number>(async () => { |
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.
the diff here is because of the try catch added so that this.running
can be turned to false
in the finally
section
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.
👍
Wanted to review, is this ready? 🙂 |
(and could we merge on positive review?) |
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.
Did a somewhat rough review commit-by-commit, I think this is very much the type of work though which strongly „proves itself“ just by using it in practical scenarios without too much side effects.
Will approve and merge.
fix and optimize the block execution for engine's new payload and fcUs, supersedes #2787
vmHead
instead of the actualvm
headexecutedBlocks
)vmHead
hash should have been used as its used to find parents tillvmHead
executedBlocks
map in engine for easy figuring out what has been executed (rather than checkingstateRoot
in state manager because a bad block can be formed with previously executedstateRoot
which would of course be declared valid) ,executedBlocks
andremoteBlocks
based onfinalized
andvm
headVmExecution
s already busy - and return optimisticSYNCING
response which would be resolved later to valids or invalidsrunning
flag is switched to false even ifrun(..)
ofVmExecution
failsA branch of this (devnet 7 compatible) seems to be working fine on devnet-7