Skip to content
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

VM: Implement EVM Object Format (EOF) (EIP-3540) #1704

Closed
holgerd77 opened this issue Feb 9, 2022 · 3 comments · Fixed by #1719
Closed

VM: Implement EVM Object Format (EOF) (EIP-3540) #1704

holgerd77 opened this issue Feb 9, 2022 · 3 comments · Fixed by #1719

Comments

@holgerd77
Copy link
Member

EIP-3540 is long in the making and moved to CFI (Considered-for-Inclusion) for the Shanghai HF with strong developer backing in ACD 131 (February 4, 2022), so this should be safe to implement on our side as well.

The EIP introduces a container format for EVM bytecode which allows for validation of this code at the time of deployment (pros and cons of deployment vs. runtime validation in the EIP). This will allow to more easily add new features to the EVM and deprecate existing feature and/or bytecodes.

For the VM we need to implement the switches from the Code Validation section from the EIP for contract creation txs and CREATE or CREATE2 instructions, likely to happen somewhere in/around the evm._executeCreate() method.

For EOF(1) identified bytcode the validation rules need to be applied. There are also some changes to the VM execution semantics which needs to be considered, e.g. things need to run on code (e.g. "JUMPDEST analysis is only run on the code.") and not the whole container thing.

Test for this EIP are in the works here: ethereum/tests#847

Two additional implementation notes:

  1. Work should very likely be done towards master, do not expect anything breaking here
  2. Please do not introduce a new HF shanghai here yet (or assign this functionality) - too early in the process - but limit to an EIP which can be activated or not
@cbrzn
Copy link
Contributor

cbrzn commented Feb 9, 2022

I would love to eventually do this :-) (If there's no rush :P)

@holgerd77
Copy link
Member Author

I would love to eventually do this :-) (If there's no rush :P)

Sorry, I've already assigned Andrew. 🙂

@acolytec3
Copy link
Contributor

I'm going to also implement EIP3670 as a companion to this since it is intended to go in at the same time as 3540 and build a PR on top of #1719.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants