Conversation
* explicitly duplicate bignumbers on stack * vm: add test to check for internally editing stack items Co-authored-by: Ev <ev@ethereum.org>
cgewecke
commented
Apr 27, 2021
| ) | ||
| } | ||
|
|
||
| message = message.toOvmMessage(this._vm, this._block || new Block()) |
Member
Author
There was a problem hiding this comment.
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.
cgewecke
commented
Apr 27, 2021
| @@ -85,6 +85,10 @@ export default async function runTx(this: VM, opts: RunTxOpts): Promise<RunTxRes | |||
| } | |||
Member
Author
There was a problem hiding this comment.
Hmmm....not sure what to do here with runTx.
cgewecke
commented
Apr 29, 2021
| 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. |
cgewecke
commented
Apr 29, 2021
| to: tx.to.toString('hex') !== '' ? tx.to : undefined, | ||
| value: tx.value, | ||
| data: tx.data, | ||
| data: tx.serialize(), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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