-
Notifications
You must be signed in to change notification settings - Fork 771
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/VM refactor #1892
EVM/VM refactor #1892
Conversation
…supported HFs to EVM
Codecov Report
Flags with carried forward coverage won't be shown. Click here to find out more. |
b99a766
to
afac4b3
Compare
overall looks great, really nice refactoring, thanks for sticking through with this massive PR @gabrocheleau! just a few last nits then all good from me! some more review from holger and jochem would be great |
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.
Wow, this looks hyper-insanely-great 🎉 🚀 😀 ❤️, thanks so much for sticking through with this Gabriel!
From my side this can be approved and merged once the review comments are addressed.
packages/vm/src/evm/evm.ts
Outdated
/** | ||
* A {@link StateManager} instance to use as the state store | ||
*/ | ||
stateManager: StateManager |
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.
Just a note: this should rather be an in-between-step, after the EEI extraction (where external things like state access is encapsulated), a state manager dependency in the EVM itself should not be necessary any 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.
Yes, good point. In general I think that VM
will instantiate EEI
, StateManager
and EVM
. EEI
will have a EVM
dependency since EVM
will introduce the EEI
interface. EEI
will depend upon StateManager
- here StateManager
is also used to export the interface. In "default" mode, VM
instantiates EEI(StateManager)
and EVM(EEI)
. EEI
will function as the bridge between VM
/StateManager
, so also stuff like loading storage should move to the EEI
(which calls into StateManager
)
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.
Yes, that describes it well.
3a0edf9
to
d4af503
Compare
…cated files, top-level EVM instantiation in VM
…e, afterMessage, newContract, step events to EVM
… options to EVM, removed EVM/Precompiles VM dependency
d4af503
to
bc73342
Compare
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! holger can give final approval and merge :) really nice work!
…n runBlock receipt ternary
bc73342
to
08c647b
Compare
Hey :) Just tagging @holgerd77 for final approval & merge |
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!
Thanks a lot Gabriel! 🙂
* VM -> EVM/VM Refactor: new EVMOpts EVM options dict, move common and supported HFs to EVM * VM -> EVM/VM Refactor: standalone DEBUG property in EVM and Interpreter * VM -> EVM/VM Refactor: standalone EVM stateManager option and property * VM -> EVM/VM Refactor: moved runCall()/runCode() to EVM, deleted dedicated files, top-level EVM instantiation in VM * VM -> EVM/VM Refactor: made EVM AsyncEventEmitter, moved beforeMessage, afterMessage, newContract, step events to EVM * VM -> EVM/VM Refactor: moved allowUnlimitedContractSize option to EVM * VM -> EVM/VM Refactor: moved opcode and gas handler functionality and options to EVM, removed EVM/Precompiles VM dependency * Client: fix cliqueActiveSigners method assignments * VM: refactor TxContext to an interface * VM: improve Message class types and defaults handling * VM: refactor runCall and executeMessage into unified runCall * VM: fix gas refund reset to 0 after tx finishes and fix parenthesis in runBlock receipt ternary * VM: reimplement transient storage clear method * VM: use VM async create method instead of constructor * VM: unify interpreter and evm DEBUG property Co-authored-by: Holger Drewes <Holger.Drewes@gmail.com>
* VM -> EVM/VM Refactor: new EVMOpts EVM options dict, move common and supported HFs to EVM * VM -> EVM/VM Refactor: standalone DEBUG property in EVM and Interpreter * VM -> EVM/VM Refactor: standalone EVM stateManager option and property * VM -> EVM/VM Refactor: moved runCall()/runCode() to EVM, deleted dedicated files, top-level EVM instantiation in VM * VM -> EVM/VM Refactor: made EVM AsyncEventEmitter, moved beforeMessage, afterMessage, newContract, step events to EVM * VM -> EVM/VM Refactor: moved allowUnlimitedContractSize option to EVM * VM -> EVM/VM Refactor: moved opcode and gas handler functionality and options to EVM, removed EVM/Precompiles VM dependency * Client: fix cliqueActiveSigners method assignments * VM: refactor TxContext to an interface * VM: improve Message class types and defaults handling * VM: refactor runCall and executeMessage into unified runCall * VM: fix gas refund reset to 0 after tx finishes and fix parenthesis in runBlock receipt ternary * VM: reimplement transient storage clear method * VM: use VM async create method instead of constructor * VM: unify interpreter and evm DEBUG property Co-authored-by: Holger Drewes <Holger.Drewes@gmail.com>
* VM -> EVM/VM Refactor: new EVMOpts EVM options dict, move common and supported HFs to EVM * VM -> EVM/VM Refactor: standalone DEBUG property in EVM and Interpreter * VM -> EVM/VM Refactor: standalone EVM stateManager option and property * VM -> EVM/VM Refactor: moved runCall()/runCode() to EVM, deleted dedicated files, top-level EVM instantiation in VM * VM -> EVM/VM Refactor: made EVM AsyncEventEmitter, moved beforeMessage, afterMessage, newContract, step events to EVM * VM -> EVM/VM Refactor: moved allowUnlimitedContractSize option to EVM * VM -> EVM/VM Refactor: moved opcode and gas handler functionality and options to EVM, removed EVM/Precompiles VM dependency * Client: fix cliqueActiveSigners method assignments * VM: refactor TxContext to an interface * VM: improve Message class types and defaults handling * VM: refactor runCall and executeMessage into unified runCall * VM: fix gas refund reset to 0 after tx finishes and fix parenthesis in runBlock receipt ternary * VM: reimplement transient storage clear method * VM: use VM async create method instead of constructor * VM: unify interpreter and evm DEBUG property Co-authored-by: Holger Drewes <Holger.Drewes@gmail.com>
* VM -> EVM/VM Refactor: new EVMOpts EVM options dict, move common and supported HFs to EVM * VM -> EVM/VM Refactor: standalone DEBUG property in EVM and Interpreter * VM -> EVM/VM Refactor: standalone EVM stateManager option and property * VM -> EVM/VM Refactor: moved runCall()/runCode() to EVM, deleted dedicated files, top-level EVM instantiation in VM * VM -> EVM/VM Refactor: made EVM AsyncEventEmitter, moved beforeMessage, afterMessage, newContract, step events to EVM * VM -> EVM/VM Refactor: moved allowUnlimitedContractSize option to EVM * VM -> EVM/VM Refactor: moved opcode and gas handler functionality and options to EVM, removed EVM/Precompiles VM dependency * Client: fix cliqueActiveSigners method assignments * VM: refactor TxContext to an interface * VM: improve Message class types and defaults handling * VM: refactor runCall and executeMessage into unified runCall * VM: fix gas refund reset to 0 after tx finishes and fix parenthesis in runBlock receipt ternary * VM: reimplement transient storage clear method * VM: use VM async create method instead of constructor * VM: unify interpreter and evm DEBUG property Co-authored-by: Holger Drewes <Holger.Drewes@gmail.com>
* VM -> EVM/VM Refactor: new EVMOpts EVM options dict, move common and supported HFs to EVM * VM -> EVM/VM Refactor: standalone DEBUG property in EVM and Interpreter * VM -> EVM/VM Refactor: standalone EVM stateManager option and property * VM -> EVM/VM Refactor: moved runCall()/runCode() to EVM, deleted dedicated files, top-level EVM instantiation in VM * VM -> EVM/VM Refactor: made EVM AsyncEventEmitter, moved beforeMessage, afterMessage, newContract, step events to EVM * VM -> EVM/VM Refactor: moved allowUnlimitedContractSize option to EVM * VM -> EVM/VM Refactor: moved opcode and gas handler functionality and options to EVM, removed EVM/Precompiles VM dependency * Client: fix cliqueActiveSigners method assignments * VM: refactor TxContext to an interface * VM: improve Message class types and defaults handling * VM: refactor runCall and executeMessage into unified runCall * VM: fix gas refund reset to 0 after tx finishes and fix parenthesis in runBlock receipt ternary * VM: reimplement transient storage clear method * VM: use VM async create method instead of constructor * VM: unify interpreter and evm DEBUG property Co-authored-by: Holger Drewes <Holger.Drewes@gmail.com>
Cleanup of #1862
Resolves #528