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

EOF "1.0" #563

Merged
merged 7 commits into from
Mar 21, 2023
Merged

EOF "1.0" #563

merged 7 commits into from
Mar 21, 2023

Conversation

gumb0
Copy link
Member

@gumb0 gumb0 commented Feb 14, 2023

Adds implementation of EVM Object Format (EOF) version "1.0". Which is a collection of 5 EIPs originally proposed for Shanghai Ethereum upgrade:

test/eofparse/eofparse.cpp Outdated Show resolved Hide resolved
lib/evmone/baseline.hpp Outdated Show resolved Hide resolved
lib/evmone/eof.cpp Outdated Show resolved Hide resolved
test/state/state.cpp Outdated Show resolved Hide resolved
test/unittests/eof_test.cpp Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
test/eofparse/eofparse.cpp Outdated Show resolved Hide resolved
lib/evmone/eips.hpp Outdated Show resolved Hide resolved
test/statetest/CMakeLists.txt Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Feb 17, 2023

Codecov Report

Merging #563 (4c03243) into master (fc8b038) will decrease coverage by 0.65%.
The diff coverage is 92.17%.

❗ Current head 4c03243 differs from pull request most recent head 8891cbc. Consider uploading reports for the commit 8891cbc to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #563      +/-   ##
==========================================
- Coverage   97.09%   96.45%   -0.65%     
==========================================
  Files          70       74       +4     
  Lines        6548     7311     +763     
==========================================
+ Hits         6358     7052     +694     
- Misses        190      259      +69     
Flag Coverage Δ
blockchaintests 63.65% <1.59%> (-12.18%) ⬇️
statetests 63.12% <3.11%> (-6.43%) ⬇️
unittests 93.65% <91.98%> (+0.14%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
lib/evmone/advanced_instructions.cpp 100.00% <ø> (ø)
lib/evmone/execution_state.hpp 94.54% <ø> (ø)
lib/evmone/instructions_calls.cpp 100.00% <ø> (ø)
test/unittests/evm_eof_test.cpp 77.69% <62.16%> (-22.31%) ⬇️
test/state/host.cpp 90.57% <75.00%> (+0.90%) ⬆️
lib/evmone/eof.cpp 80.99% <82.35%> (+0.57%) ⬆️
test/utils/bytecode.hpp 96.09% <95.23%> (-0.24%) ⬇️
lib/evmone/advanced_execution.cpp 100.00% <100.00%> (ø)
lib/evmone/baseline.cpp 100.00% <100.00%> (ø)
lib/evmone/baseline.hpp 100.00% <100.00%> (ø)
... and 11 more

... and 1 file with indirect coverage changes

@axic axic force-pushed the eof branch 8 times, most recently from ef67a30 to deb2f41 Compare February 19, 2023 14:09
@axic axic force-pushed the eof branch 2 times, most recently from 0cd15b0 to 8b9d270 Compare February 20, 2023 14:14
lib/evmone/eof.cpp Outdated Show resolved Hide resolved
lib/evmone/eof.cpp Outdated Show resolved Hide resolved
lib/evmone/eof.cpp Outdated Show resolved Hide resolved
lib/evmone/eof.cpp Outdated Show resolved Hide resolved
lib/evmone/eof.cpp Outdated Show resolved Hide resolved
@chfast chfast force-pushed the eof branch 2 times, most recently from 47a6b75 to 003f92a Compare March 16, 2023 16:24
lib/evmone/baseline.hpp Outdated Show resolved Hide resolved
lib/evmone/eof.cpp Outdated Show resolved Hide resolved
rodiazet and others added 6 commits March 20, 2023 12:49
This changes the implementation of the EOF container format
and EOF validation based on updated spec of:
- EIP-3540 "EVM Object Format v1" (https://eips.ethereum.org/EIPS/eip-3540)
- EIP-3670 "EOF - Code Validation" (https://eips.ethereum.org/EIPS/eip-3670)

Co-authored-by: Alex Beregszaszi <alex@rtfs.hu>
Co-authored-by: Andrei Maiboroda <andrei@ethereum.org>
Co-authored-by: Pawel Bylica <pawel@ethereum.org>
Co-authored-by: Pawel Bylica <pawel@ethereum.org>
EIP-3670 "EOF Code Validation" forbids usage of these legacy EVM
instructions: JUMP, JUMPI, PC, CALLCODE, SELFDESTRUCT.

Co-authored-by: Pawel Bylica <pawel@ethereum.org>
Add two out of tree new control-flow instructions specified by
EIP-4200 (https://eips.ethereum.org/EIPS/eip-4200).
RJUMP (unconditional) and RJUMPI (conditional) are jump instructions
which encode destinations as signed immediate values.

Co-authored-by: Andrei Maiboroda <andrei@ethereum.org>
Co-authored-by: Paweł Bylica <pawel@ethereum.org>
The implementation of the third instruction RJUMPV (jump table)
from EIP-4200 "EOF - Static relative jumps"
https://eips.ethereum.org/EIPS/eip-4200

Co-authored-by: Pawel Bylica <pawel@ethereum.org>
Implement CALLF and RETF EOF instructions specified by
EIP-4750 EOF Functions (https://eips.ethereum.org/EIPS/eip-4750).

Co-authored-by: Andrei Maiboroda <andrei@ethereum.org>
lib/evmone/eof.cpp Outdated Show resolved Hide resolved
@chfast chfast changed the title EOFv1 EOF "1.0" Mar 20, 2023
Specified by EIP-5450 "EOF - Stack Validation"
https://eips.ethereum.org/EIPS/eip-5450.

Co-authored-by: Pawel Bylica <pawel@ethereum.org>
Co-authored-by: Alex Beregszaszi <alex@rtfs.hu>
@chfast chfast merged commit 05e923f into master Mar 21, 2023
@chfast chfast deleted the eof branch March 21, 2023 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants