Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
165 commits
Select commit Hold shift + click to select a range
645d820
chore(forks): update Osaka and BPO fork deployment status (#2013)
spencer-tb Jan 13, 2026
8cdef0c
refactor(test-benchmark): relabel repricing marker (#2015)
LouisTsai-Csie Jan 13, 2026
36b4720
chore(ci): reduce docker hub rate limit usage in hive-consume workflo…
spencer-tb Jan 13, 2026
180dcec
fix(test-types): log `Transaction` values as readable hex-strings ins…
felix314159 Jan 13, 2026
7ed5f38
fix(test-types): strip extra fields from geth receipts (#2014)
danceratopz Jan 14, 2026
2c83b84
feat(benchmark): support tx gas limit cap in stateful benchmarks (#1962)
CPerezz Jan 14, 2026
5eb4e7b
feat(testing/forks): Implement `bytecode.gas_cost(fork)` (#2002)
marioevz Jan 15, 2026
7282b64
feat(specs): Implement EIP-7928: Block-Level Access Lists
fselmo Nov 11, 2025
6de5318
fix(specs): Fix zero value withdrawals BAL tracking (#29)
fselmo Oct 30, 2025
69e182e
fix(specs): static upfront check for create + selfdestruct (#22)
nerolation Oct 30, 2025
ab9cf9f
feat(tests): Implement more EIP-7928 tests
raxhvl Oct 29, 2025
786fdbb
fix(specs): Ensure tracking before first access (#1722)
nerolation Oct 31, 2025
0642045
fix(spec-specs): duplicate storage writes in state tracker (#1743)
fselmo Nov 4, 2025
68e1714
fix(test-specs): validate t8n BAL independent of expectation existenc…
fselmo Nov 13, 2025
5e7249d
feat(specs): EIP-7928 refactoring
nerolation Nov 5, 2025
e87d13a
fix(spec-specs): require and use blockenv for state tracking
fselmo Nov 5, 2025
873710c
refactor(spec-specs): track BAL changes via frames
fselmo Nov 6, 2025
2ec75b2
fix(spec-specs): Mark original addr warm before delegation
fselmo Nov 11, 2025
18472bf
fix(spec-specs): Make sure we account for no changes
fselmo Nov 11, 2025
0f8bc3b
fix(spec-specs): Better tracking for code changes; ensure with BAL test
fselmo Nov 12, 2025
ab4f8f7
fix(spec-specs): Use child frame for create message
fselmo Nov 12, 2025
1c119fb
fix(spec-specs): Normalize transaction before merging to block frame
fselmo Nov 12, 2025
4e8cbcc
fix(spec-specs): Early static check for SSTORE before any reads
fselmo Nov 12, 2025
eb3ac57
fix(spec-specs): Track storage writes more appropriately wrt index
fselmo Nov 13, 2025
e668cc3
fix(spec-specs): Use functions, not methods; fix create revert
fselmo Nov 13, 2025
37edacd
fix(spec-specs): Default code to b"" in tracker, skip empty setting
fselmo Nov 14, 2025
f9c58f3
fix(spec-specs): Fix BAL cross-transaction tracking and nonce dedup
fselmo Nov 14, 2025
54b574f
fix(spec-specs): Move destroy_account before BAL normalization
fselmo Nov 14, 2025
7c39948
fix(spec-specs): Check delegation access gas before reading
fselmo Nov 14, 2025
ad4c8ee
fix(spec-specs): Track code per auth; filter pre at tx frame
fselmo Nov 15, 2025
0bf53c6
fix(spec-specs): Use proper frames for system transactions
fselmo Nov 16, 2025
20321c8
fix(spec-specs): Track address at init collision
fselmo Nov 21, 2025
771ad19
chore(spec-specs): Add Amsterdam docstring; update prepare msg
fselmo Nov 21, 2025
080df16
chore: Add pre-amsterdam BAL tests to doc for tracking
fselmo Nov 21, 2025
325b338
fix(spec-specs): Calculate all gas we can before accessing state
fselmo Nov 24, 2025
09b1524
fix(test-tools): Remove named forks from blobSchedule; turn off BPOs
fselmo Nov 25, 2025
4d36e86
fix(cli): add bal exception for erigon (#1809)
felix314159 Nov 26, 2025
05ca48f
feat(test): Better describe the BAL for selfdestruct revert
fselmo Nov 26, 2025
b5d922e
test(eip7928): add EXTCODECOPY OOG memory expansion BAL test
qu0b Nov 30, 2025
854ee19
refactor(test-tests): parametrize existing test oog case instead
fselmo Dec 1, 2025
355c575
test(eip7928): add cross-block precompile state leak test
qu0b Dec 1, 2025
6606aff
refactor(test-tests): Add BAL expectation to state leak test; fix lint
fselmo Dec 1, 2025
0f9ef2d
feat(test): add SELFDESTRUCT OOG BAL test
qu0b Dec 4, 2025
89232f2
refactor(tests): move selfdestruct bal tests to oog file; add gas bou…
fselmo Dec 4, 2025
09ec902
feat(tests): Port oog create refund test; add BAL >= Amsterdam
fselmo Dec 1, 2025
c40db83
refactor(spec-specs): Refactor state changes and frame hierarchy (#1841)
fselmo Dec 8, 2025
cfa66a2
fix(spec,tests): Change BAL to List[AccountChange] (#1844)
gurukamath Dec 8, 2025
a6745fa
fix(spec-specs): Fix issues after rebasing with forks/osaka
fselmo Dec 8, 2025
2eb8a61
feat(test): add more bal test cases (#1812)
qu0b Dec 8, 2025
f6d51e8
feat(test-tests): BAL test for nested storage write reset same tx (#1…
fselmo Dec 8, 2025
acaca8d
fix(spec-specs): post-exec net-zero filtering post specs refactor
fselmo Dec 9, 2025
7eb798b
feat(test-tests): Expand BAL CALL opcode OOG boundary test cases (#1882)
fselmo Dec 12, 2025
28ef367
feat(spec): update eip7928 to latest rlp specs wrt storage; rename tx…
fselmo Dec 12, 2025
632044a
fix(test-tests): Avoid hard-coding precompile range for lexicographic…
fselmo Dec 12, 2025
35a4bb5
feat(specs): EIP-7928 move bal from payload (#1917)
nerolation Dec 17, 2025
7339217
fix(test-tests): Use `ZeroPaddedHexNumber` instead of `HexNumber` for…
fselmo Dec 30, 2025
bd0f217
refactor(spec-specs): Refactor specs to be more coherent wrt gas acco…
fselmo Dec 30, 2025
368ac87
feat(tests): add more 7928 test descriptions (#1815)
nerolation Dec 31, 2025
ad7be9e
feat(tests): EIP-7928 tests targeting EIP-4788 (#1887)
raxhvl Jan 7, 2026
19a3960
feat(tests): add invalid BAL tests for spurious block_access_index (#…
nerolation Jan 7, 2026
059f38d
feat(tests): EIP-7928 tests targeting EIP-7002 (#1918)
raxhvl Jan 7, 2026
ba6e884
feat(tests): Test extraneous entries for BAL (#1992)
raxhvl Jan 8, 2026
1075f15
refactor(eip7928): refactor net zero filtering in BALs (#1899)
gurukamath Jan 12, 2026
9f2237a
feat(test): OOG and success selfdestruct tests to all precompiles
fselmo Dec 29, 2025
dcca0f4
refactor(test): `Tangerine` -> `TangerineWhistle`; comments on PR #1954
fselmo Dec 30, 2025
6e74073
fix(tool): Fix EvmOneTransitionTool parsing for TangerineWhistle (add…
fselmo Dec 31, 2025
c288a16
feat(test): Extend selfdestruct tests to all Amsterdam gas boundaries
fselmo Jan 6, 2026
c2c020b
refactor(test): fork.supports_protected_txs() instead of direct compa…
fselmo Jan 8, 2026
a21221e
refactor: address comments from PR #1954
fselmo Jan 8, 2026
d7324de
feat(test): Add selfdestruct to system contracts + to self from initcode
fselmo Jan 9, 2026
a0ae1db
feat(test-commands): Allow pytest valid fork markers as params; add u…
fselmo Jan 9, 2026
fe25717
refactor(spec): Remove `check_gas` where unnecessary for instructions
fselmo Jan 12, 2026
aa9f253
fix(test-fill): organize alloc groups by pytest param (enginex)
fselmo Jan 12, 2026
4f6006c
fix(tests): remove bal from block body (#2017)
gurukamath Jan 13, 2026
a378636
feat(spec-tests): Update json_infra tests version (#1939)
fselmo Jan 15, 2026
0313063
chore: clean up based on comments on PR #1719
fselmo Jan 15, 2026
1d11d8d
tests(eip-7928): generalize eip-7934 tests (#2022)
gurukamath Jan 16, 2026
05117e5
chore(spec-specs): fix typos in `src/ethereum/` (#1965)
danceratopz Jan 19, 2026
acd8d6c
chore(ci): add all EL clients to hive master config (#2034)
danceratopz Jan 19, 2026
dbbb75f
chore: fix PR template links to execution-specs (#2035)
danceratopz Jan 19, 2026
eeb65f7
fix(docs): replace `master` with `mainnet` branch (#2037)
danceratopz Jan 19, 2026
b84b68a
feat(benchmarks): fix bytecode attack for EXT-like opcodes to work in…
jsign Jan 19, 2026
40a25f0
chore(tests,test-*,doc): remove eof from eest (#1873)
spencer-tb Jan 19, 2026
e0c64f0
fix(tests-execute): relax pydantic checks on `GetPayloadResponse`
danceratopz Jan 19, 2026
89b3e8a
chore(ci): skip redundant checks in workflows (#2038)
spencer-tb Jan 19, 2026
4ef381a
chore(testing/vm): Remove UndefinedOpcodes (#2044)
marioevz Jan 20, 2026
d3c4047
chore(tooling): do not gitignore source files in `fixtures` packages …
felix314159 Jan 20, 2026
77c2b9c
fix(tooling,test-*): enable project ruff config for packages/testing …
danceratopz Jan 20, 2026
c14e9c9
fix(tools): fix remaining lint checks after large ruff refactor (#2050)
fselmo Jan 20, 2026
7b9fc7d
feat(ci): Create Devnet Workflows (#2053)
marioevz Jan 21, 2026
f1ba2b1
feat(test): port static context static tests to python (#1960)
fselmo Jan 21, 2026
3b9b018
feat(tests): turn on EIP-7934 tests with BALs (fill all for amsterdam…
fselmo Jan 22, 2026
31defc8
refactor(spec): refactor `execute_code` into `process_message` (#2061)
fselmo Jan 22, 2026
f9ae69d
chore(docs): bump docs fork to amsterdam (#2064)
spencer-tb Jan 22, 2026
6e5f1f8
bugfix(tests): Put BAL back into test fixtures for next bal release (…
fselmo Jan 23, 2026
16316e2
chore(test-specs): fix fork transition tests (#2065)
spencer-tb Jan 23, 2026
a554634
fix(tests): Remove bad opcode test; opt for test_all_opcodes coverage…
fselmo Jan 23, 2026
fd9789f
feat(ci): Run static checks on all generated branches (#2071)
marioevz Jan 23, 2026
c3813a5
feat(test-benchmark): Introduce create2 helper for address computatio…
LouisTsai-Csie Jan 23, 2026
58b4bb0
refactor(test-tests): Port create collision tests (#2031)
chfast Jan 26, 2026
c6c380a
feat(tests): add BAL tests that dequeue consolidations (#2076)
gurukamath Jan 26, 2026
9325a81
fix(tests): fix EIP-7934 tests logic accuracy (#2078)
fselmo Jan 27, 2026
7c8ec4f
feat(test-cli): add `hasher compare` subcommand (#2080)
danceratopz Jan 27, 2026
590bc9f
fix(tests): update nethermind exceptions (#2098)
flcl42 Jan 29, 2026
b68a532
feat(test-fill): speed up filling (#2079)
fselmo Jan 29, 2026
1b266ab
fix(test-benchmark): support `blobhash` benchmark (#2067)
LouisTsai-Csie Jan 29, 2026
2c549ce
feat(testing/fixtures): Add logs to state fixtures (#2091)
marioevz Jan 29, 2026
438bac1
refactor(test-benchmark): update benchmark fork to Osaka (#2104)
LouisTsai-Csie Feb 2, 2026
5cb915f
doc(test-benchmark): framework description and developer guideline (#…
LouisTsai-Csie Feb 2, 2026
3821cb4
feat(test-benchmark): add EIP-7825 tx splitting and fix & include stu…
CPerezz Feb 2, 2026
1872234
fix(test,hive): Add hive ruleset BPO2ToAmsterdamAtTime15k (#2111)
fselmo Feb 2, 2026
2e0c8c6
chore(pyproject): declare Python 3.12 support in package metadata (#1…
talhaaktss Feb 2, 2026
0c65695
chore(test-benchmark): skip rlp size limit check (#2118)
LouisTsai-Csie Feb 3, 2026
d0fd339
fix(fixtures): stream fixture JSON writes to reduce peak memory. (#2124)
danceratopz Feb 3, 2026
2c1a10d
fix(test-fill): improve memory buildup for fill; merge on `SIGINT` / …
fselmo Feb 3, 2026
0d5a00b
Add BlockException.GAS_USED_OVERFLOW to BesuExceptionMapper (#2126)
daniellehrner Feb 3, 2026
72af492
fix(test): lint (#2128)
fselmo Feb 3, 2026
72addb2
chore(tests): use representative blob combos in high blob count forks…
danceratopz Feb 4, 2026
554c353
feat(benchmark/tests): Extra sstore benchmark tests (#2130)
marioevz Feb 4, 2026
b808aa2
fix(test-fill): use k-way merge for fixture json to reduce memory foo…
fselmo Feb 4, 2026
28eb3d5
feat(tools): retry rpc calls on server-side error (#2056)
SamWilsn Feb 4, 2026
26918e5
feat(test-fill): performance improvements for release processes and f…
fselmo Feb 5, 2026
a9df61a
feat(test-benchmark): add gas limit check for BLS12_G2_MSM benchmark …
LouisTsai-Csie Feb 5, 2026
0a07c00
fix(test-ci): Fix benchmark artifact expectation for new builder prea…
fselmo Feb 5, 2026
1140c0e
refactor(testing): Implement IteratingBytecode, FixedIterationsByteco…
marioevz Feb 5, 2026
7ab5c83
feat(test-benchmark): updates and fixes for fixed opcode count (#1985)
spencer-tb Feb 5, 2026
ea028c9
fix(docs): add missing lines code coverage field to eip checklist (#2…
felix314159 Feb 5, 2026
f74aa1c
test(benchmark): skip test_blockhash pending investigation (#2145)
spencer-tb Feb 5, 2026
e7d8ccf
chore(ci): only fill native test formats in tox's `pypy3` env (#2116)
danceratopz Feb 5, 2026
35f83db
fix(tests/benchmark): Max size contract deployment execution (#2149)
marioevz Feb 5, 2026
b206688
fix(test-ci): fix issues with recent changes to checklist (#2151)
fselmo Feb 5, 2026
8a5a2d5
feat(tests): BAL tests for 7702 delegation reset, create and access (…
gurukamath Feb 6, 2026
cad8b90
feat(tests): add warm and cold account query benchmark (#2138)
LouisTsai-Csie Feb 6, 2026
a321481
fix(benchmark): reduce stateful stubs to 4 representative tokens (#2141)
CPerezz Feb 6, 2026
c5f1dc7
docs: Update package names from ethereum_test_* to execution_testing.…
aryanpatil2703 Feb 6, 2026
e1b871b
feat(benchmarks): add keccak benchmark with updated memory (#1849)
jochem-brouwer Feb 6, 2026
02456f2
feat(tests): add test case for create2 selfdestruct and recreate (#2121)
nerolation Feb 6, 2026
551c8f8
refactor(spec-tool): remove unused fields (#2105)
Galoretka Feb 7, 2026
342c7bc
chore(tooling): add initial claude config and skills (#2024)
danceratopz Feb 8, 2026
7f584cd
chore(test-client-clis): add Nethermind exception for `BlockException…
benaadams Feb 9, 2026
09ac716
fix(testing/execute): Phase not being correctly passed as tx request …
marioevz Feb 9, 2026
eb62025
refactor(test-benchmark): failing `sstore` / `sload` benchmark cases …
LouisTsai-Csie Feb 9, 2026
87a414f
feat: enhance keccak benchmark (#2152)
LouisTsai-Csie Feb 9, 2026
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
2fc0504
Merge branch 'forks/amsterdam' into upstream
pdobacz Feb 10, 2026
720caf4
refactor(tests): Add fork parameter to Initcode generator (#2176)
pdobacz Feb 10, 2026
c114704
Port upstream grammar fixes and interpreter refactoring to monad forks
pdobacz Feb 10, 2026
597a1da
Revert adding new gh actions & workflows
pdobacz Feb 10, 2026
7e3acf1
Fix mypy error from shadowed except variable
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
a166b2f
Merge branch 'test-pr-from-upstream' into upstream3
pdobacz Feb 12, 2026
0060c42
Merge branch 'forks/amsterdam' into upstream3
pdobacz Feb 12, 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"
12 changes: 10 additions & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
# TODO: tests have been updated without paying attention to filling in pre-monad
# forks. Need to circle back and do proper `if fork >= ...` thing
# py3:
# runs-on: ubuntu-24.04
# runs-on: [self-hosted-ghr, size-xl-x64]
# needs: static
# steps:
# - uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955
Expand All @@ -78,9 +78,17 @@ 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
# runs-on: [self-hosted-ghr, size-xl-x64]
# needs: static
# steps:
# - uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955
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