-
Notifications
You must be signed in to change notification settings - Fork 773
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: refactor execution #1068
Conversation
Codecov Report
Flags with carried forward coverage won't be shown. Click here to find out more. |
72e6fb2
to
ed3f007
Compare
Ok, ready. 😄 Some summary on this PR: this work here was initially triggered when I wanted to add some additional HF logic to the execution logic in I have therefore in a first step along 3351298, 7633061 and (later) c437c28 extracted the execution code parts from Note that the current structure of the execution classes is rather meant to be some start, so feel free to evolve on this along future work. On a second step I have then integrated the execution code from With these changes from above the current On a4683e6 and 87bc662 I've finally added HF switch logic for both the chain download and the execution. There are now two common instances Ok. Open for review. 😄 |
Phew, the fight along a5421b8 can't be seen in this commit. 😜 (actually a whole morning) |
this.config.chainCommon.setHardforkByBlockNumber(first.toNumber()) | ||
this.hardfork = this.config.chainCommon.hardfork() | ||
} | ||
} |
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.
👍
Does the vm's execCommon need a similar reset here?
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.
No, not here since the HF switches on block download and block execution occur independently. A HF change for execution is handled along the VMExecution.run() method.
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.
This all looks excellent to me! Great. 💯
Just one question about how common works in FullSync's nextBlockFork
section...
I think the fromBlocksData
name makes sense / is correct.
2537502
to
19c92f3
Compare
…on abstract base class and dedicated VMExecution class, moved over execution logic from FullSynchronizer
…ode for the client runBlocks() logic
…cksData(), added test
…ion, reactivated VM execution test
…run() method in Execution class
…on and execCommon to decouple on HF states
…gic along initialization and processing, new Common getHardforkByBlockNumber() function
…tIteratorHead() functions, deprecated getHead(), setHead() functions, reactivated VM execution tests
ccb11d7
to
6d9d632
Compare
Rebased this on top of the clique PR #1032 - needed to add a small typing fix. I will also merge this one in (with admin merge), feel the very strong need to streamline things a bit due to the current extra constraints and PR has been reviewed by @cgewecke, let me nevertheless know if you think this is inappropriately deviating from the protocol. Then we have both of the large PRs out of the way and can concentrate on doing "normally" scoped work again 😄 and @jochem-brouwer (and eventually others) has (have) a solid and stable base for further work on #1048. Let me nevertheless know though if you have final comments on this PR, happily doing follow-up PRs on this doing latest fixes or changes. |
Ready for review, see description below.