-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
new(tests): EIP-4200: EOF - Static relative jumps (#581)
* new(tests) EIP-4200 relative jumps Port over ethereum/tests EIP-4200 tests, both validation and execution. Some duplicate tests were dropped, and some new immediate tests were added. Signed-off-by: Danno Ferrin <[email protected]> * accidental commit Signed-off-by: Danno Ferrin <[email protected]> * fix(tests): EIP-4200: rebase fixes * fix(fw): Add missing TRUNCATED_INSTRUCTION EOF exception * new(tests): EOF: EIP-4200: more tests * fix(tests): tox fixes * docs: Changelog --------- Signed-off-by: Danno Ferrin <[email protected]> Co-authored-by: Mario Vega <[email protected]>
- Loading branch information
Showing
8 changed files
with
2,580 additions
and
2 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
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
3 changes: 3 additions & 0 deletions
3
tests/prague/eip7692_eof_v1/eip4200_relative_jumps/__init__.py
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,3 @@ | ||
""" | ||
EOF tests for EIP-4200 relative jumps | ||
""" |
26 changes: 26 additions & 0 deletions
26
tests/prague/eip7692_eof_v1/eip4200_relative_jumps/helpers.py
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,26 @@ | ||
""" | ||
EOF RJump tests helpers | ||
""" | ||
import itertools | ||
from enum import Enum | ||
|
||
"""Storage addresses for common testing fields""" | ||
_slot = itertools.count() | ||
next(_slot) # don't use slot 0 | ||
slot_code_worked = next(_slot) | ||
slot_conditional_result = next(_slot) | ||
slot_last_slot = next(_slot) | ||
|
||
"""Storage values for common testing fields""" | ||
value_code_worked = 0x2015 | ||
value_calldata_true = 10 | ||
value_calldata_false = 11 | ||
|
||
|
||
class JumpDirection(Enum): | ||
""" | ||
Enum for the direction of the jump | ||
""" | ||
|
||
FORWARD = 1 | ||
BACKWARD = -1 |
Oops, something went wrong.