forked from ethereum/execution-spec-tests
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(fw): EOF support (ethereum#512)
* feat(all): add EOF fixture format and test spec * feat(tests): add EOF example * feat(fw): EOF library tools/vm: EOF opcode changes tools: CREATE3 helper tox: EOF Keywords post rebase changes: align EOF tests with main. Co-authored-by: spencer-tb <[email protected]> post rebase: tox fixes. Co-authored-by: spencer-tb <[email protected]> Fix existing EOF tests (ethereum#11) Co-authored-by: Hugo <[email protected]> * new(tests): prague: EOF V1 tests tests/eof: move to prague tests/eof: fixes post rebase changes: align EOF tests with main. (tests) Co-authored-by: spencer-tb <[email protected]> post rebase: tox fixes (tests). Co-authored-by: spencer-tb <[email protected]> Fix existing EOF tests (tests) (ethereum#11) Co-authored-by: Hugo <[email protected]> * refactor(fw): EOF container code * fix(fw): vm: re-order JUMPDEST, NOOP * fix(fw): cli tests * fix(tests): refactor fixes * fix(fw): eof: fix raw bytes processing * fix(tests): eof: change `test_code_validation.py` to use `EOFTestFiller` * eof unit tests * fix eof exceptions * refactor(fw): compute_create3_address * fix(tests): tox * refactor(fw): eof_v1: use pydantic * fix(fw): tpx * fix(fw): RJUMPV custom dataportion parser * fix(tests): eofv1: RJUMPI calls * new(fw): RJUMPV unit test * feat(fw): subscriptable opcodes * fix(fw): Opcode add, mul * fix(tests): test hardcoding bytecode of initcode * fix(fw): fix * fix(tests): eof: fix RJUMP*, CALLF data portions * hack(fw): Add str as allowed EOF exception * fix(tests): eof: fix test_execution_function.py * changelog * chore: add unknown words to dictionary * fetch exceptions with evmone lots of TODOs * eof .py test example * fix(fw): add unchecked_stack opcode property (CALLF) * refactor(fw): eof: refactor and add section creation helpers * fix: tox * fix(tests): eof: refactor * refactor(tests): replace Section(kind=, with Section.Code, Section.Data * fix(fw): eof: consistent magic, version, and header terminator types. * fix(fw): eof: proper magic * rm(tests): eof: duplicate prague folder with redundant examples * fix(fw): eof: data-container body order * docs: add EOF * fix(docs): word * fix(tests): eof: file rename --------- Co-authored-by: Mario Vega <[email protected]> Co-authored-by: Hugo <[email protected]> Co-authored-by: danceratopz <[email protected]>
- Loading branch information
1 parent
6820baf
commit e7d677b
Showing
34 changed files
with
5,535 additions
and
34 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# EOF Tests <!-- markdownlint-disable MD051 (MD051=link-fragments "Link fragments should be valid") --> | ||
|
||
The EOF Test fixture format tests are included in the fixtures subdirectory `eof_tests`. | ||
|
||
These are produced by the `EOFTest` test spec. | ||
|
||
## Description | ||
|
||
The EOF test fixture format is used to test the EOF container validation function of the Ethereum Virtual Machine (EVM). | ||
|
||
It simply defines a binary code in hexadecimal format and a boolean value that indicates whether the code is valid or not. | ||
|
||
## Consumption | ||
|
||
TODO: Update this section | ||
|
||
## Structures | ||
|
||
TODO: Update this section |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
""" | ||
EVM Object Format Libary to generate bytecode for testing purposes | ||
""" | ||
from .constants import LATEST_EOF_VERSION | ||
|
||
__all__ = ("LATEST_EOF_VERSION",) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
""" | ||
EVM Object Format generic constants. | ||
Applicable to all EOF versions. | ||
""" | ||
EOF_MAGIC = b"\xef\x00" | ||
""" | ||
The second byte found on every EOF formatted contract, which was chosen to | ||
avoid clashes with three contracts which were deployed on Mainnet. | ||
""" | ||
EOF_HEADER_TERMINATOR = b"\x00" | ||
""" | ||
Byte that terminates the header of the EOF format. | ||
""" | ||
LATEST_EOF_VERSION = 1 | ||
""" | ||
Latest existing EOF version. | ||
""" | ||
VERSION_BYTE_LENGTH = 1 | ||
""" | ||
Length of the version byte. | ||
""" |
Oops, something went wrong.