From 2bd2fc1f653bd748a246f55d05ead0ef58673031 Mon Sep 17 00:00:00 2001 From: fselmo Date: Thu, 21 Aug 2025 15:43:19 -0600 Subject: [PATCH 1/2] feat(fork): Add basic Amsterdam fork support --- docs/CHANGELOG.md | 1 + src/ethereum_test_forks/__init__.py | 2 ++ src/ethereum_test_forks/forks/forks.py | 9 +++++++++ src/pytest_plugins/eels_resolutions.json | 5 +++++ tests/amsterdam/__init__.py | 1 + 5 files changed, 18 insertions(+) create mode 100644 tests/amsterdam/__init__.py diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index a6d9e2f2df2..a37da4a0b4d 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -137,6 +137,7 @@ Users can select any of the artifacts depending on their testing needs for their - ✨ All commands (`fill`, `consume`, `execute`) now work without having to clone the repository, e.g. `uv run --with git+https://github.com/ethereum/execution-spec-tests.git consume` now works from any folder ([#1863](https://github.com/ethereum/execution-spec-tests/pull/1863)). - 🔀 Move Prague to stable and Osaka to develop ([#1573](https://github.com/ethereum/execution-spec-tests/pull/1573)). - ✨ Add a `pytest.mark.with_all_typed_transactions` marker that creates default typed transactions for each `tx_type` supported by the current `fork` ([#1890](https://github.com/ethereum/execution-spec-tests/pull/1890)). +- ✨ Add basic support for ``Amsterdam`` fork in order to begin testing Glamsterdam ([#2069](https://github.com/ethereum/execution-spec-tests/pull/2069)). ### 🧪 Test Cases diff --git a/src/ethereum_test_forks/__init__.py b/src/ethereum_test_forks/__init__.py index 6e362467c1b..09780635906 100644 --- a/src/ethereum_test_forks/__init__.py +++ b/src/ethereum_test_forks/__init__.py @@ -6,6 +6,7 @@ BPO2, BPO3, BPO4, + Amsterdam, ArrowGlacier, Berlin, Byzantium, @@ -83,6 +84,7 @@ "TransitionForkAdapter", "TransitionForkOrNoneAdapter", "ForkAttribute", + "Amsterdam", "ArrowGlacier", "Berlin", "BerlinToLondonAt5", diff --git a/src/ethereum_test_forks/forks/forks.py b/src/ethereum_test_forks/forks/forks.py index 207d4c623df..8c3d1f7c47e 100644 --- a/src/ethereum_test_forks/forks/forks.py +++ b/src/ethereum_test_forks/forks/forks.py @@ -1560,6 +1560,15 @@ def blob_base_cost(cls, block_number: int = 0, timestamp: int = 0) -> int: return 2**13 # EIP-7918 new parameter +class Amsterdam(Osaka): + """Amsterdam fork.""" + + @classmethod + def is_deployed(cls) -> bool: + """Return True if this fork is deployed.""" + return False + + class BPO1(Osaka, bpo_fork=True): """BPO1 fork - Blob Parameter Only fork 1.""" diff --git a/src/pytest_plugins/eels_resolutions.json b/src/pytest_plugins/eels_resolutions.json index 1e3c8f56c60..96e5416e9cc 100644 --- a/src/pytest_plugins/eels_resolutions.json +++ b/src/pytest_plugins/eels_resolutions.json @@ -51,5 +51,10 @@ }, "BPO4": { "same_as": "EELSMaster" + }, + "Amsterdam": { + "git_url": "https://github.com/fselmo/execution-specs.git", + "branch": "feat/amsterdam-fork-and-block-access-lists", + "commit": "59ff2946ca30879079b2ef2b601ae09106ca08f7" } } diff --git a/tests/amsterdam/__init__.py b/tests/amsterdam/__init__.py new file mode 100644 index 00000000000..b4d638e152d --- /dev/null +++ b/tests/amsterdam/__init__.py @@ -0,0 +1 @@ +"""Test cases for EVM functionality introduced in Amsterdam, [EIP-7773: Hardfork Meta - Glamsterdam](https://eip.directory/eips/eip-7773).""" # noqa: E501 From 99df46cbb6eeb96c2554c6eab465b6a47c73d5b9 Mon Sep 17 00:00:00 2001 From: fselmo Date: Fri, 22 Aug 2025 08:15:41 -0600 Subject: [PATCH 2/2] refactor(fork): Move Amsterdam below BPO forks in forks.py --- src/ethereum_test_forks/forks/forks.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/ethereum_test_forks/forks/forks.py b/src/ethereum_test_forks/forks/forks.py index 8c3d1f7c47e..a9f2df8e345 100644 --- a/src/ethereum_test_forks/forks/forks.py +++ b/src/ethereum_test_forks/forks/forks.py @@ -1560,15 +1560,6 @@ def blob_base_cost(cls, block_number: int = 0, timestamp: int = 0) -> int: return 2**13 # EIP-7918 new parameter -class Amsterdam(Osaka): - """Amsterdam fork.""" - - @classmethod - def is_deployed(cls) -> bool: - """Return True if this fork is deployed.""" - return False - - class BPO1(Osaka, bpo_fork=True): """BPO1 fork - Blob Parameter Only fork 1.""" @@ -1674,3 +1665,12 @@ def is_deployed(cls) -> bool: development. """ return False + + +class Amsterdam(Osaka): + """Amsterdam fork.""" + + @classmethod + def is_deployed(cls) -> bool: + """Return True if this fork is deployed.""" + return False