-
Notifications
You must be signed in to change notification settings - Fork 0
ethereumjs-ovm comparison #1
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
base: master
Are you sure you want to change the base?
Conversation
* explicitly duplicate bignumbers on stack * vm: add test to check for internally editing stack items Co-authored-by: Ev <[email protected]>
| ) | ||
| } | ||
|
|
||
| message = message.toOvmMessage(this._vm, this._block || new Block()) |
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.
Could toOvmMessage be a static helper in evm.ts which took the original message as an arg?
This would mean there was no need to extend the message class.
| await state.revert() | ||
| throw e | ||
| } | ||
| } |
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.
Hmmm....not sure what to do here with runTx.
| const message = new Message({ | ||
| caller: tx.getSenderAddress(), | ||
| gasLimit: gasLimit, | ||
| gasLimit: gasLimit.mul(new BN(5)), // TODO: Find a cleaner way to do this, it works for now though. |
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.
What is this?
| to: tx.to.toString('hex') !== '' ? tx.to : undefined, | ||
| value: tx.value, | ||
| data: tx.data, | ||
| data: tx.serialize(), |
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 PR is a diff vs. ethereumjs v4. Most recent commit here is from March 6, 2021.
As things stand, to upgrade their js-vm to V5 & Berlin, Optimism would have to maintain and publish from a fork of the ethereumjs-monorepo.
This entails significant maintenance overhead.
ethereum-js could make itself more configurable and reduce complexity for OVM if
ethereumjs VM
initinitialization hook, initialization optionsOptimism could extend the StateManager EVM and EEI classes
A new VM might look like