-
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: Fix double runs of the block execution #2730
Conversation
Codecov Report
Additional details and impacted files
Flags with carried forward coverage won't be shown. Click here to find out more. |
29ce5e7
to
ddae95f
Compare
a lot of diff is because of the formatting changes by moving runWithLock a bit out, but the real PR work is till this commit: 810aa54 |
616f29f
to
879cbad
Compare
Rebased this via UI |
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.
Lot of great smallish additions/clean-ups and nice partial VM execution refactoring, this is still very much needed to have improvements there!
Code looks good, and I guess execution-flow-code can also best be tested by the test cases we have + continued client runs, where I am at right now anyhow.
So will approve and merge. 🙂
* @param tag - The tag to save the headHash to | ||
* @param headHash - The head hash to save | ||
*/ | ||
setIteratorHead(tag: string, headHash: Uint8Array): Promise<void> |
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.
👍 🙏
|
||
closeRPC(server) | ||
t.end() | ||
}) |
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.
Nice new test case, VM set iterator head execution tests very much needed, great! 👍
On the 4844 devnet5 a weird error was noticed:
vmExecution.runWithoutSetBlock
first andvmExecution.run
which runs block in an iterator loopRun on 1. gives
VALID
execution while 2nd fails withinvalid state root
This PR aims to solve it:
Synopsis of the issue: the vmExecution's
run
andrunWithoutSetHead
can end up running the same block one after another leading to state manager's incorrect cachesThis PR updates
clearCache
flag in runBlock if such a scenario comes up during client execution.PS:
the issue is resolved with this diff which might give an idea about where the problem could be i.e. by running the block again in the
vm
copy of vmexecution