Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
dcd274d
fix(fw): Less restrictive TransactionTraces CamelModel (#2081)
pdobacz Feb 9, 2026
402b3d0
fix(test-fill): silence prints to debug logs; turn on for releases; d…
fselmo Feb 9, 2026
720caf4
refactor(tests): Add fork parameter to Initcode generator (#2176)
pdobacz Feb 10, 2026
c0ad9d7
chore: add execute remote skip marker (#2178)
LouisTsai-Csie Feb 10, 2026
feaad6c
fix(tests): EIP-7883 minor fixes (#2082)
pdobacz Feb 10, 2026
ece90f4
refactor(bloatnet): split stubs into mainnet and bloatnet files (#2182)
CPerezz Feb 10, 2026
658e388
feat(testing/fill): Account-hash-based deploy addresses (#2139)
marioevz Feb 10, 2026
114eaf5
feat(benchmarking): Optimize `IteratingBytecode` (#2184)
marioevz Feb 11, 2026
a82b1f6
fix(test): Revert module-level cache to instance (#2185)
fselmo Feb 11, 2026
353c388
refactor(test-tests): migrate frontier to shanghai gas costs to `byte…
spencer-tb Feb 11, 2026
44b328d
chore: update style guidelines (#2158)
SamWilsn Feb 11, 2026
a8025c6
refactor(test-tests): migrate amsterdam gas costs to use `bytecode.ga…
spencer-tb Feb 11, 2026
be3678d
refactor(test-tests): migrate cancun to osaka gas costs to `bytecode.…
spencer-tb Feb 11, 2026
ed47360
fix(tests): add BAL related mappings to ethrex exception mapper (#2193)
edg-l Feb 11, 2026
0c1cdc4
refactor(test-tests): migrate precompile gas costs to `fork.gas_costs…
spencer-tb Feb 12, 2026
8e276dc
chore(tooling,ci): throttle py3 xdist workers locally, use all cores …
danceratopz Feb 12, 2026
07fb9c1
Merge branch 'forks/amsterdam' into upstream
pdobacz Feb 12, 2026
cf34412
Post-merge fixes
pdobacz Feb 13, 2026
73657d7
Fix TX_MAX_GAS_LIMIT for monad forks
pdobacz Feb 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/actions/build-fixtures/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ runs:
shell: bash
run: |
if [ "${{ steps.evm-builder.outputs.impl }}" = "eels" ]; then
uv run fill -n ${{ steps.evm-builder.outputs.x-dist }} ${{ steps.properties.outputs.fill-params }} --output=fixtures_${{ inputs.release_name }}.tar.gz --build-name ${{ inputs.release_name }}
uv run fill -n ${{ steps.evm-builder.outputs.x-dist }} ${{ steps.properties.outputs.fill-params }} --output=fixtures_${{ inputs.release_name }}.tar.gz --build-name ${{ inputs.release_name }} --no-html --durations=100 --log-level=DEBUG
else
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 }}
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 }} --no-html --durations=100 --log-level=DEBUG
fi
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
with:
Expand Down
6 changes: 3 additions & 3 deletions .github/configs/feature.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# Unless filling for special features, all features should fill for previous forks (starting from Frontier) too
stable:
evm-type: stable
fill-params: --until=Prague --fill-static-tests --ignore=tests/static/state_tests/stQuadraticComplexityTest --no-html --durations=50
fill-params: --until=Prague --fill-static-tests --ignore=tests/static/state_tests/stQuadraticComplexityTest

develop:
evm-type: develop
fill-params: --until=BPO4 --fill-static-tests --ignore=tests/static/state_tests/stQuadraticComplexityTest --no-html --durations=50
fill-params: --until=BPO4 --fill-static-tests --ignore=tests/static/state_tests/stQuadraticComplexityTest

monad:
evm-type: develop
# --suppress-no-test-exit-code works around a problem where multi-phase fill
# (triggered by tarball output) fails to proceed on no tests processed
# in 1st phase (exit code 5)
fill-params: --suppress-no-test-exit-code -m blockchain_test --from=MONAD_EIGHT --until=MONAD_NEXT --chain-id=143 -k "not eip4844 and not eip7002 and not eip7251 and not eip7685 and not eip6110 and not eip7594 and not eip7918 and not eip7610 and not eip7934 and not invalid_header" --no-html --durations=50
fill-params: --suppress-no-test-exit-code -m blockchain_test --from=MONAD_EIGHT --until=MONAD_NEXT --chain-id=143 -k "not eip4844 and not eip7002 and not eip7251 and not eip7685 and not eip6110 and not eip7594 and not eip7918 and not eip7610 and not eip7934 and not invalid_header"
8 changes: 8 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,14 @@ jobs:
# - uses: ./.github/actions/setup-env
# - name: Run py3 tests
# run: tox -e py3
# env:
# PYTEST_XDIST_AUTO_NUM_WORKERS: auto
# - name: Upload coverage reports to Codecov
# uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7
# with:
# files: .tox/coverage.xml
# flags: unittests
# token: ${{ secrets.CODECOV_TOKEN }}

# pypy3:
# runs-on: ubuntu-24.04
Expand Down
70 changes: 67 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,79 @@ This specification aims to be:
2. **Complete** - Capture the entirety of _consensus critical_ parts of Ethereum.
3. **Accessible** - Prioritize readability, clarity, and plain language over performance and brevity.

### Spelling and Naming
### Style

#### Spelling and Naming

- Attempt to use descriptive English words (or _very common_ abbreviations) in documentation and identifiers.
- Avoid using EIP numbers in identifiers.
- Avoid using EIP numbers in identifiers, and prefer descriptive text instead (eg. `FeeMarketTransaction` instead of `Eip1559Transaction`).
- If necessary, there is a custom dictionary `whitelist.txt`.

#### Comments

- Don't repeat what is obvious from the code.
- <details>
<summary><em>(expand)</em> Consider how future changes will interleave with yours, especially when creating semantic blocks.</summary>

<br>Consider:
<table valign="top">

<tr valign="top">
<th>Fork T</th>
<th>Fork T+1</th>
</tr>

<tr valign="top">

<td>

<!--
Note that the trailing whitespace is necessary to move the copy button
in the github UI over so it doesn't obscure the text.
-->

```python
# EIP-1234: The dingus is the rate of fleep
dingus = a + b
dingus += c ^ d
dingus /= fleep(e)
```

</td>

<td>

```python
# EIP-1234: The dingus is the rate of fleep
dingus = a + b

# EIP-4567: Frobulate the dingus
dingus = frobulate(dingus)

dingus += c ^ d # <-
dingus /= fleep(e) # <-
```

</td>

</tr>

</table>

The marked lines (`<-`) are now incorrectly attributed to EIP-4567 in Fork+1. Instead, omit the EIP identifier in the comments, and describe the changes introduced by the EIP in the function's docstrings. The rendered diffs will make it pretty obvious what's changed.
</details>

#### Docstrings

- Don't include the function's signature.
- Format using markdown.
- Don't begin with an article ("the"/"a") or a pronoun ("it", "they", etc.).
- Write in complete sentences, providing background and context for the associated code.
- Link to relevant standards/EIPs.

### Changes across various Forks

Many contributions require changes across multiple forks, organized under `src/ethereum/*`. When making such changes, please ensure that differences between the forks are minimal and consist only of necessary differences. This will help with getting cleaner [diff outputs](https://ethereum.github.io/execution-specs/diffs/index.html).
Many contributions require changes across multiple forks, organized under `src/ethereum/forks/*`. When making such changes, please ensure that differences between the forks are minimal and consist only of necessary differences. This will help with getting cleaner [diff outputs](https://ethereum.github.io/execution-specs/diffs/index.html).

When creating pull requests affecting multiple forks, we recommended submitting your PR in two steps:

Expand Down
1 change: 1 addition & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Test fixtures for use by clients are available for each release on the [Github r
### 🛠️ Framework

- 🐞 Remove `Op.CLZ` from `UndefinedOpcodes` list ([#1970](https://github.com/ethereum/execution-specs/pull/1970)).
- 🐞 Make `TransactionTraces` `CamelModel` less lestrictive ([#2081](https://github.com/ethereum/execution-specs/pull/2081)).

#### `fill`

Expand Down
8 changes: 6 additions & 2 deletions docs/writing_tests/test_markers.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def type_4_default_transaction(sender: Account, pre: Alloc):
@pytest.mark.with_all_typed_transactions
@pytest.mark.valid_from("Prague")
def test_something_with_all_tx_types(
state_test: StateTestFiller,
state_test: StateTestFiller,
pre: Alloc,
typed_transaction: Transaction
):
Expand Down Expand Up @@ -327,14 +327,18 @@ In this example, the test will be marked as expected to fail when it is being ex

This marker is used to mark tests that are slow to run. These tests are not run during [`tox` checks](./verifying_changes.md), and are only run when a release is being prepared.

### `@pytest.mark.pre_alloc_modify`
### `@pytest.mark.pre_alloc_mutable`

This marker is used to mark tests that modify the pre-alloc in a way that would be impractical to reproduce in a real-world scenario.

Examples of this include:

- Modifying the pre-alloc to have a balance of 2^256 - 1.
- Address collisions that would require hash collisions.
- EOA accounts containing code
- EOA accounts with a hard-coded nonce
- Contracts having zero-nonce
- Deploying a contract to a hard-coded address

### `@pytest.mark.skip()`

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
"""Base composite types for Ethereum test cases."""

import hashlib
import json
from dataclasses import dataclass
from typing import (
Any,
Expand Down Expand Up @@ -367,6 +369,11 @@ class Account(CamelModel):
state.
"""

model_config = {
**CamelModel.model_config,
"frozen": True,
}

@dataclass(kw_only=True)
class NonceMismatchError(Exception):
"""
Expand Down Expand Up @@ -514,6 +521,16 @@ def __bool__(self: "Account") -> bool:
"""Return True on a non-empty account."""
return any((self.nonce, self.balance, self.code, self.storage))

def hash(self) -> Hash:
"""Return the hash of the account given its properties."""
data = self.model_dump(mode="json")
blob = json.dumps(
data,
sort_keys=True,
separators=(",", ":"),
).encode("utf-8")
return Hash(hashlib.sha256(blob).digest())

@classmethod
def with_code(cls: Type, code: BytesConvertible) -> "Account":
"""Create account with provided `code` and nonce of `1`."""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

from ..base_types import Address, Hash, Wei
from ..base_types_json import to_json
from ..composite_types import AccessList
from ..composite_types import AccessList, Account


@pytest.mark.parametrize(
Expand Down Expand Up @@ -290,3 +290,57 @@ def test_json_deserialization(
)
model_type = type(model_instance)
assert model_type(**json) == model_instance


@pytest.mark.parametrize(
"account_1, account_2, equal",
[
(Account(), Account(), True),
(Account(nonce=1), Account(nonce=2), False),
(Account(nonce=1), Account(nonce=1), True),
(Account(nonce=1), Account(nonce=1, code="0x1234"), False),
(Account(nonce=1, code="0x1234"), Account(nonce=1), False),
(
Account(nonce=1, code="0x1234"),
Account(nonce=1, code="0x1234"),
True,
),
(
Account(nonce=1, code="0x1234"),
Account(nonce=1, code="0x5678"),
False,
),
(
Account(nonce=1, code="0x1234"),
Account(nonce=2, code="0x5678"),
False,
),
(
Account(nonce=1, code="0x1234"),
Account(nonce=2, code="0x1234"),
False,
),
(
Account(nonce=1, code="0x1234"),
Account(nonce=1, code="0x1234", storage={0: 0, 1: 1}),
False,
),
(
Account(nonce=1, code="0x1234", storage={1: 1, 0: 0}),
Account(nonce=1, code="0x1234", storage={0: 0, 1: 1}),
True,
),
],
)
def test_account_hash(
account_1: Account, account_2: Account, equal: bool
) -> None:
"""Test two different accounts to return the same hash."""
if equal:
assert account_1.hash() == account_2.hash(), (
f"Account 1: {account_1.hash()}, Account 2: {account_2.hash()}"
)
else:
assert account_1.hash() != account_2.hash(), (
f"Account 1: {account_1.hash()}, Account 2: {account_2.hash()}"
)
Original file line number Diff line number Diff line change
Expand Up @@ -812,7 +812,7 @@ def pytest_collection_modifyitems(
elif marker.name == "valid_at_transition_to":
items_for_removal.append(i)
continue
elif marker.name == "pre_alloc_modify":
elif marker.name == "pre_alloc_mutable":
item.add_marker(
pytest.mark.skip(
reason="Pre-alloc modification not supported"
Expand Down
Loading