Skip to content

Commit 28d1069

Browse files
Merge branch 'ethereum:main' into souradeep/custom_exc
2 parents b07ce60 + 8f2a856 commit 28d1069

File tree

1,812 files changed

+21554
-18418
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,812 files changed

+21554
-18418
lines changed

.github/actions/build-fixtures/action.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ runs:
3434
- name: Generate fixtures using fill
3535
shell: bash
3636
run: |
37-
uv run fill -n ${{ steps.evm-builder.outputs.x-dist }} --evm-bin=${{ steps.evm-builder.outputs.evm-bin }} --solc-version=${{ steps.properties.outputs.solc }} ${{ steps.properties.outputs.fill-params }} --output=fixtures_${{ inputs.release_name }}.tar.gz --build-name ${{ inputs.release_name }}
37+
uv run fill -n ${{ steps.evm-builder.outputs.x-dist }} --evm-bin=${{ steps.evm-builder.outputs.evm-bin }} ${{ steps.properties.outputs.fill-params }} --output=fixtures_${{ inputs.release_name }}.tar.gz --build-name ${{ inputs.release_name }}
3838
- name: Wrap ethereum/tests fixtures with eofwrap tool
3939
shell: bash
4040
if: ${{ steps.properties.outputs.eofwrap }}

.github/configs/feature.yaml

Lines changed: 2 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -2,49 +2,19 @@
22
stable:
33
evm-type: stable
44
fill-params: --until=Prague
5-
solc: 0.8.21
65
develop:
76
evm-type: develop
87
fill-params: --until=Osaka
9-
solc: 0.8.21
108
static:
119
evm-type: static
1210
fill-params: --until=Osaka --fill-static-tests ./tests/static
13-
solc: 0.8.21
14-
benchmark_1M:
11+
benchmark_test:
1512
evm-type: benchmark
16-
fill-params: --from=Cancun --until=Prague --block-gas-limit 1000000 -m benchmark ./tests
17-
solc: 0.8.21
18-
feature_only: true
19-
benchmark_10M:
20-
evm-type: benchmark
21-
fill-params: --from=Cancun --until=Prague --block-gas-limit 10000000 -m benchmark ./tests
22-
solc: 0.8.21
23-
feature_only: true
24-
benchmark_30M:
25-
evm-type: benchmark
26-
fill-params: --from=Cancun --until=Prague --block-gas-limit 30000000 -m benchmark ./tests
27-
solc: 0.8.21
28-
feature_only: true
29-
benchmark_60M:
30-
evm-type: benchmark
31-
fill-params: --from=Cancun --until=Prague --block-gas-limit 60000000 -m benchmark ./tests
32-
solc: 0.8.21
33-
feature_only: true
34-
benchmark_90M:
35-
evm-type: benchmark
36-
fill-params: --from=Cancun --until=Prague --block-gas-limit 90000000 -m benchmark ./tests
37-
solc: 0.8.21
38-
feature_only: true
39-
benchmark_120M:
40-
evm-type: benchmark
41-
fill-params: --from=Cancun --until=Prague --block-gas-limit 120000000 -m benchmark ./tests
42-
solc: 0.8.21
13+
fill-params: --from=Cancun --until=Prague --gas-benchmark-values 1,10,30,45,60,90,120 -m benchmark --generate-all-formats ./tests
4314
feature_only: true
4415
eip7692:
4516
evm-type: eip7692
4617
fill-params: --fork=EOFv1 ./tests/unscheduled
47-
solc: 0.8.21
4818
eofwrap: true
4919
feature_only: true
5020
fusaka-devnet-2:

.github/workflows/tox_verify.yaml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,10 @@ jobs:
111111
strategy:
112112
matrix:
113113
include:
114-
- os: macos-latest
114+
- os: macos-15
115115
python: "3.11"
116+
- os: macos-15
117+
python: "pypy3.11"
116118
- os: ubuntu-latest
117119
python: "3.12"
118120
steps:
@@ -155,8 +157,8 @@ jobs:
155157
- os: [self-hosted-ghr, size-xl-x64]
156158
name: self-hosted-ghr-xl-x64
157159
python: "3.11"
158-
- os: macos-latest
159-
name: macos-latest
160+
- os: macos-15
161+
name: macos-15
160162
python: "3.12"
161163
steps:
162164
- name: Checkout ethereum/execution-spec-tests
@@ -190,8 +192,10 @@ jobs:
190192
include:
191193
- os: ubuntu-latest
192194
python: "3.11"
193-
- os: macos-latest
195+
- os: macos-15
194196
python: "3.12"
197+
- os: ubuntu-latest
198+
python: "pypy3.11"
195199
steps:
196200
- name: Checkout ethereum/execution-spec-tests
197201
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683

docs/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ Users can select any of the artifacts depending on their testing needs for their
7272
- ✨ Field `postStateHash` is now added to all `blockchain_test` and `blockchain_test_engine` tests that use `exclude_full_post_state_in_output` in place of `postState`. Fixes `evmone-blockchaintest` test consumption and indirectly fixes coverage runs for these tests ([#1667](https://github.com/ethereum/execution-spec-tests/pull/1667)).
7373
- 🔀 Changed INVALID_DEPOSIT_EVENT_LAYOUT to a BlockException instead of a TransactionException ([#1773](https://github.com/ethereum/execution-spec-tests/pull/1773)).
7474
- 🔀 Disabled writing debugging information to the EVM "dump directory" to improve performance. To obtain debug output, the `--evm-dump-dir` flag must now be explicitly set. As a consequence, the now redundant `--skip-evm-dump` option was removed ([#1874](https://github.com/ethereum/execution-spec-tests/pull/1874)).
75+
- ✨ Generate unique addresses with Python for compatible static tests, instead of using hard-coded addresses from legacy static test fillers ([#1781](https://github.com/ethereum/execution-spec-tests/pull/1781)).
76+
- ✨ Added support for the `--benchmark-gas-values` flag in the `fill` command, allowing a single genesis file to be used across different gas limit settings when generating fixtures. ([#1895](https://github.com/ethereum/execution-spec-tests/pull/1895)).
7577

7678
#### `consume`
7779

@@ -88,7 +90,9 @@ Users can select any of the artifacts depending on their testing needs for their
8890

8991
### 📋 Misc
9092

93+
- ✨ Add pypy3.11 support ([#1854](https://github.com/ethereum/execution-spec-tests/pull/1854)).
9194
- 🔀 Use only relative imports in `tests/` directory ([#1848](https://github.com/ethereum/execution-spec-tests/pull/1848)).
95+
- 🔀 Convert absolute imports to relative imports in `src/` directory for better code maintainability ([#1907](https://github.com/ethereum/execution-spec-tests/pull/1907)).
9296
- 🔀 Misc. doc updates, including a navigation footer ([#1846](https://github.com/ethereum/execution-spec-tests/pull/1846)).
9397
- 🔀 Remove Python 3.10 support ([#1808](https://github.com/ethereum/execution-spec-tests/pull/1808)).
9498
- 🔀 Modernize codebase with Python 3.11 language features ([#1812](https://github.com/ethereum/execution-spec-tests/pull/1812)).
@@ -114,6 +118,7 @@ Users can select any of the artifacts depending on their testing needs for their
114118
- ✨ Opcode classes now validate keyword arguments and raise `ValueError` with clear error messages ([#1739](https://github.com/ethereum/execution-spec-tests/pull/1739), [#1856](https://github.com/ethereum/execution-spec-tests/pull/1856)).
115119
- ✨ 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)).
116120
- 🔀 Move Prague to stable and Osaka to develop ([#1573](https://github.com/ethereum/execution-spec-tests/pull/1573)).
121+
- ✨ 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)).
117122

118123
### 🧪 Test Cases
119124

@@ -128,6 +133,7 @@ Users can select any of the artifacts depending on their testing needs for their
128133
-[EIP-7934](https://eips.ethereum.org/EIPS/eip-7934): Add test cases for the block RLP max limit of 10MiB ([#1730](https://github.com/ethereum/execution-spec-tests/pull/1730)).
129134
-[EIP-7939](https://eips.ethereum.org/EIPS/eip-7939) Add count leading zeros (CLZ) opcode tests for Osaka ([#1733](https://github.com/ethereum/execution-spec-tests/pull/1733)).
130135
-[EIP-7918](https://eips.ethereum.org/EIPS/eip-7918): Blob base fee bounded by execution cost test cases (initial), includes some adjustments to [EIP-4844](https://eips.ethereum.org/EIPS/eip-4844) tests ([#1685](https://github.com/ethereum/execution-spec-tests/pull/1685)). Update the blob_base_cost ([#1915](https://github.com/ethereum/EIPs/pull/1915)).
136+
-[EIP-7934](https://eips.ethereum.org/EIPS/eip-7934): Add additional test cases for block RLP max limit with all typed transactions and for a log-creating transactions ([#1890](https://github.com/ethereum/execution-spec-tests/pull/1890)).
131137

132138
## [v4.5.0](https://github.com/ethereum/execution-spec-tests/releases/tag/v4.5.0) - 2025-05-14
133139

docs/running_tests/releases.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ These releases are tagged using the format `<pre_release_name>@vX.Y.Z`.
5454
Examples:
5555

5656
- [`[email protected]`](https://github.com/ethereum/execution-spec-tests/releases/tag/fusaka-devnet-1%40v1.0.0) - this fixture release contains tests adhering to the [Fusaka Devnet 1 spec](https://notes.ethereum.org/@ethpandaops/fusaka-devnet-1).
57-
- [`benchmark@v1.0.0`](https://github.com/ethereum/execution-spec-tests/releases/tag/benchmark%40v1.0.0) - this fixture release contains tests specifically aimed at benchmarking EVMs.
57+
- [`benchmark@v0.0.3`](https://github.com/ethereum/execution-spec-tests/releases/tag/benchmark%40v0.0.3) - this fixture release contains tests specifically aimed at benchmarking EVMs.
5858

5959
Devnet releases should be treated as WIP and may not yet contain full test coverage (or even coverage for all EIPs). The coverage provided by these releases is detailed in the corresponding release notes.
6060

docs/writing_tests/test_markers.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,59 @@ This marker is used to automatically parameterize a test with all contract creat
5555

5656
This marker only differs from `pytest.mark.with_all_tx_types` in that it does not include transaction type 3 (Blob Transaction type) on fork Cancun and after.
5757

58+
### `@pytest.mark.with_all_typed_transactions`
59+
60+
This marker is used to automatically parameterize a test with all typed transactions, including `type=0` (legacy transaction), that are valid for the fork being tested.
61+
This marker is an indirect marker that utilizes the `tx_type` values from the `pytest.mark.with_all_tx_types` marker to build default typed transactions for each `tx_type`.
62+
63+
Optional: Default typed transactions used as values for `typed_transaction` exist in `src/pytest_plugins/shared/transaction_fixtures.py` and can be overridden for the scope of
64+
the test by re-defining the appropriate `pytest.fixture` for that transaction type.
65+
66+
```python
67+
import pytest
68+
69+
from ethereum_test_tools import Account, Alloc, StateTestFiller
70+
from ethereum_test_types import Transaction
71+
72+
# Optional override for type 2 transaction
73+
@pytest.fixture
74+
def type_2_default_transaction(sender: Account):
75+
return Transaction(
76+
ty=2,
77+
sender=sender,
78+
max_fee_per_gas=0x1337,
79+
max_priority_fee_per_gas=0x1337,
80+
...
81+
)
82+
83+
# Optional override for type 4 transaction
84+
@pytest.fixture
85+
def type_4_default_transaction(sender: Account, pre: Alloc):
86+
return Transaction(
87+
ty=4,
88+
sender=sender,
89+
...,
90+
authorization_list=[
91+
AuthorizationTuple(
92+
address=Address(1234),
93+
nonce=0,
94+
chain_id=1,
95+
signer=pre.fund_eoa(),
96+
)
97+
]
98+
)
99+
100+
101+
@pytest.mark.with_all_typed_transactions
102+
@pytest.mark.valid_from("Prague")
103+
def test_something_with_all_tx_types(
104+
state_test: StateTestFiller,
105+
pre: Alloc,
106+
typed_transaction: Transaction
107+
):
108+
pass
109+
```
110+
58111
### `@pytest.mark.with_all_precompiles`
59112

60113
This marker is used to automatically parameterize a test with all precompiles that are valid for the fork being tested.

pyproject.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ dependencies = [
3636
"coincurve>=20.0.0,<21",
3737
"trie>=3.1.0,<4",
3838
"semver>=3.0.1,<4",
39-
"pydantic>=2.10.0,<3",
39+
"pydantic>=2.11.0,<3",
4040
"rich>=13.7.0,<14",
4141
"filelock>=3.15.1,<4",
4242
"ethereum-types>=0.2.1,<0.3",
@@ -79,6 +79,7 @@ docs = [
7979
"mkdocstrings-python>=1.0.0,<2",
8080
"pillow>=10.0.1,<11",
8181
"pyspelling>=2.8.2,<3",
82+
"lxml>=6.0.0,<7", # needs to be >= 6.0 for pypy
8283
"setuptools==78.0.2",
8384
]
8485

@@ -131,6 +132,7 @@ fixable = ["I", "B", "E", "F", "W", "D", "C"]
131132
ignore = ["D205", "D203", "D212", "D415", "C901", "A005", "C420"]
132133

133134
[tool.mypy]
135+
disable_error_code = ["import-untyped"]
134136
mypy_path = ["src", "$MYPY_CONFIG_FILE_DIR/stubs"]
135137
files = ["src", "tests"]
136138
exclude = [

0 commit comments

Comments
 (0)