-
Notifications
You must be signed in to change notification settings - Fork 791
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
EVM runCode/runCall type cleanup #2861
Conversation
Codecov Report
Additional details and impacted files
Flags with carried forward coverage won't be shown. Click here to find out more. |
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
For the So for these kind of options we should really be careful and/or really dig this out again. Normally no one is just introducing options "for fun" and had some argument why to do. 😜 |
On this EVM refactor thing: maybe you want to do another quick round of reflection and estimate here. Is this at the end a rather somewhat small thing to do, in terms of the amount of work? Or is this more extensive? I personally completely can't judge. So if this is rather small, we might even want to consider to just take this in now (but absolutely not the outcome I am pushing here for, totally in the open, just wanted to at least mention the possibility). |
Alright, I will block this PR and re-introduce the Regarding the EVM refactor: this will not be a small task. Nevertheless, I will prioritize this. |
Ah, no, please no big refactorings any more. |
@holgerd77 It's an internal refactor, see discord 😄 |
(and the side-note of this PR 😄 ) |
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
Closes #2860
This PR unifies the types for the
EVMRunCodeOpts
andEVMRunCallOpts
.Discussion item: in order to not create a base class I had to unify the
pc
option fromrunCodeOpts
. I cannot think of a practical reason why someone would want to runCode (which they supply) but they do not want to start at the starting point of the code. I suggest we remove it.Also side-note: this whole runCode and runCall should at some point be merged. We can refactor EVM in such way that we allow the external method call to
runCall
(or maybe we should rename this,runEVM
or something) to provide the complete system state. In these, almost all options are optional, but they provide access to the internal run state. This would extend to providing things like current stack, the current pc, etc. (This is an idea I had a long time ago, and seeing the current state of EVM it is not clean and we should clean it up, it is kind of messy)