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

Shanghai EVM EIPs Tests: EIP-3651, EIP-3855, EIP-3860 #13

Merged
merged 12 commits into from
Dec 12, 2022

Conversation

marioevz
Copy link
Member

@marioevz marioevz commented Dec 9, 2022

Tests Included

  • EIP-3651
  • EIP-3855
  • EIP-3860

ethereum_test_tools Changes

  • Added generators.py under the code module, which shall include all code-generating classes and functions
  • Relocated CodeGasMeasure to this new file
  • Added Initcode class, which generates a legacy initcode for a given code to deploy
  • Adds helper functions:
    • ceiling_division: Calculates the division of two integers and returns the ceiling, without using floating point.
    • compute_create_address, compute_create2_address: Computes the address of a created contract when using create or create2 opcodes.
    • eip_2028_transaction_data_cost: Calculates the gas cost of a transaction's data after EIP-2028.
    • is_fork: Checks whether a fork is equal or greater than the specified fork.
  • Adds Shanghai fork
  • Print extra debugging information for better clarity when a test case fails

ToDos

Rebase withdrawals on top of this branch for release.

@marioevz marioevz mentioned this pull request Dec 9, 2022
Copy link
Member

@lightclient lightclient left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mainly a few nits; overall looks good though. Nice work.

fillers/eips/eip3651.py Show resolved Hide resolved
fillers/eips/eip3855.py Outdated Show resolved Hide resolved
fillers/eips/eip3855.py Outdated Show resolved Hide resolved
fillers/eips/eip3855.py Outdated Show resolved Hide resolved
fillers/eips/eip3860.py Outdated Show resolved Hide resolved
fillers/eips/eip3860.py Outdated Show resolved Hide resolved
fillers/eips/eip3860.py Outdated Show resolved Hide resolved
fillers/eips/eip3860.py Outdated Show resolved Hide resolved
@lightclient lightclient merged commit 33f75a9 into ethereum:main Dec 12, 2022
@marioevz marioevz deleted the shanghai-evm-tests-port branch December 12, 2022 17:02
marioevz referenced this pull request in marioevz/execution-spec-tests May 17, 2023
…pytest-format-mark-2

fillers: convert eip-3860 fillers to pytest format
marioevz added a commit that referenced this pull request Dec 13, 2023
…xture formats; Per-format sub-folder output (#358)

* tools: Move fixture collector to spec

* refactor: Fixtures collector

* all: remove `BaseTestConfig`

* fix: all filler tests

* docs: update

* tox: spelling

* feat: Parametrize the supported fixture types for each test type

* fix: many tests

* fix: remaining tests

* fix: fixture name case

* fix: Indirect parametrize using fixture format

* feat: Dynamic generation of spec test fixtures

* fix: type-checking

* fix: imports

* feat(pytest): allow filtering by fixture format via pytest mark (#12)

* feat(pytest): allow filtering by fixture format via pytest mark

* feat(fw): give unset fixture format a more verbose name

* feat(pytest): only paramatrize post-merge forks with hive format (#13)

* feat(pytest): remove items which are pre-merge and have hive format

* chore: make exception string clearer; fix whitespace

* fix(pytest): test_filler: remove `enable_hive` completely

* fix: Remove unused `STATE_TEST_HIVE`

---------

Co-authored-by: danceratopz <danceratopz@gmail.com>
marioevz added a commit that referenced this pull request Dec 22, 2023
…xture formats; Per-format sub-folder output (#358)

* tools: Move fixture collector to spec

* refactor: Fixtures collector

* all: remove `BaseTestConfig`

* fix: all filler tests

* docs: update

* tox: spelling

* feat: Parametrize the supported fixture types for each test type

* fix: many tests

* fix: remaining tests

* fix: fixture name case

* fix: Indirect parametrize using fixture format

* feat: Dynamic generation of spec test fixtures

* fix: type-checking

* fix: imports

* feat(pytest): allow filtering by fixture format via pytest mark (#12)

* feat(pytest): allow filtering by fixture format via pytest mark

* feat(fw): give unset fixture format a more verbose name

* feat(pytest): only paramatrize post-merge forks with hive format (#13)

* feat(pytest): remove items which are pre-merge and have hive format

* chore: make exception string clearer; fix whitespace

* fix(pytest): test_filler: remove `enable_hive` completely

* fix: Remove unused `STATE_TEST_HIVE`

---------

Co-authored-by: danceratopz <danceratopz@gmail.com>
marioevz added a commit that referenced this pull request Jan 6, 2024
…xture formats; Per-format sub-folder output (#358)

* tools: Move fixture collector to spec

* refactor: Fixtures collector

* all: remove `BaseTestConfig`

* fix: all filler tests

* docs: update

* tox: spelling

* feat: Parametrize the supported fixture types for each test type

* fix: many tests

* fix: remaining tests

* fix: fixture name case

* fix: Indirect parametrize using fixture format

* feat: Dynamic generation of spec test fixtures

* fix: type-checking

* fix: imports

* feat(pytest): allow filtering by fixture format via pytest mark (#12)

* feat(pytest): allow filtering by fixture format via pytest mark

* feat(fw): give unset fixture format a more verbose name

* feat(pytest): only paramatrize post-merge forks with hive format (#13)

* feat(pytest): remove items which are pre-merge and have hive format

* chore: make exception string clearer; fix whitespace

* fix(pytest): test_filler: remove `enable_hive` completely

* fix: Remove unused `STATE_TEST_HIVE`

---------

Co-authored-by: danceratopz <danceratopz@gmail.com>
marioevz added a commit that referenced this pull request Jan 10, 2024
…xture formats; Per-format sub-folder output (#358)

* tools: Move fixture collector to spec

* refactor: Fixtures collector

* all: remove `BaseTestConfig`

* fix: all filler tests

* docs: update

* tox: spelling

* feat: Parametrize the supported fixture types for each test type

* fix: many tests

* fix: remaining tests

* fix: fixture name case

* fix: Indirect parametrize using fixture format

* feat: Dynamic generation of spec test fixtures

* fix: type-checking

* fix: imports

* feat(pytest): allow filtering by fixture format via pytest mark (#12)

* feat(pytest): allow filtering by fixture format via pytest mark

* feat(fw): give unset fixture format a more verbose name

* feat(pytest): only paramatrize post-merge forks with hive format (#13)

* feat(pytest): remove items which are pre-merge and have hive format

* chore: make exception string clearer; fix whitespace

* fix(pytest): test_filler: remove `enable_hive` completely

* fix: Remove unused `STATE_TEST_HIVE`

---------

Co-authored-by: danceratopz <danceratopz@gmail.com>
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.

None yet

2 participants