Merge upstream changes - #42
Conversation
Add a `FinalDecoratorHygiene` lint rule that flags any leaf dataclass (a `@dataclass` or `@slotted_freezable` class never used as a base) that is missing `@final`. Marking leaf dataclasses `@final` lets `mypyc` bypass the vtable for method calls and property accessors. The rule scans the whole specification once at the first fork position: every fork's modules plus the shared modules such as `ethereum.state` and `ethereum.trace`, including each package's `__init__.py`. Register the rule in `vulture_whitelist.py` since lints are discovered dynamically.
…m#2901) Co-authored-by: Ben Adams <thundercat@illyriad.co.uk> Co-authored-by: felix <felix314159@users.noreply.github.com> Co-authored-by: fselmo <fselmo2@gmail.com> Co-authored-by: Stefan <22667037+qu0b@users.noreply.github.com> Co-authored-by: Mario Vega <marioevz@gmail.com> Co-authored-by: kclowes <kclowes@users.noreply.github.com> Co-authored-by: carsons-eels <carson@ethereum.org> Co-authored-by: Leo Lara <leolara@users.noreply.github.com> Co-authored-by: danceratopz <danceratopz@gmail.com> Co-authored-by: Paweł Bylica <pawel@hepcolgum.band> Co-authored-by: Sam Wilson <57262657+SamWilsn@users.noreply.github.com> Co-authored-by: marioevz <11726710+marioevz@users.noreply.github.com> Co-authored-by: kclowes <6540608+kclowes@users.noreply.github.com>
…thereum#2970) `build_refund_tx` iterated `set(fork.refund_types())`, whose order depends on Python's per-process string-hash randomization (no `PYTHONHASHSEED` is set in this repo). Different `fill` invocations therefore appended the extra `PUSH0` from the `AUTHORIZATION_EXISTING_AUTHORITY` branch either before or after the `STORAGE_CLEAR` SSTOREs, producing two different bytecodes and — via `contract_address_from_hash` — two different deployment addresses for the same test, and hence two different pre-state allocations and state roots. Sort by enum-member name inside the iteration so the bytecode (and therefore the contract address) is deterministic across runs.
* ✨ feat(test): selfdestruct a drity account * nit Co-authored-by: Mario Vega <marioevz@gmail.com> * nit Co-authored-by: Mario Vega <marioevz@gmail.com> * nit Co-authored-by: Mario Vega <marioevz@gmail.com> * nit Co-authored-by: Mario Vega <marioevz@gmail.com> * nit Co-authored-by: Mario Vega <marioevz@gmail.com> * ✨ feat: Parameterise success / revert * 🧹 chore: lint * 🐞 fix: 8037 pricing change; forward all gas --------- Co-authored-by: raxhvl <raxhvl@users.noreply.github.com> Co-authored-by: Mario Vega <marioevz@gmail.com>
…tstrapped (ethereum#2944) * feat(execute): skip the deterministic factory deploy (and dependent tests) when it can't be bootstrapped The deterministic deployment proxy is bootstrapped in an autouse session fixture via a keyless transaction with a fixed gas limit. On chains where the contract-creation intrinsic gas exceeds that limit (so the keyless tx can never be mined), the deploy aborted the entire execute session, blocking even tests that never use the factory. - Pre-flight the deploy with `eth_estimateGas`: if the network requires more gas for the creation than the keyless tx's fixed gas limit, raise instead of attempting it (no funding tx, no doomed send, no inclusion wait). - Make the session fixture best-effort: warn instead of raising, so tests that don't need the factory still run. - Skip a test that requests a deterministic deployment when the factory is unavailable. - Add `EthRPC.estimate_gas` for the pre-flight. * chore: update comment --------- Co-authored-by: LouisTsai <q1030176@gmail.com>
…2977) Co-authored-by: CPerezz <37264926+CPerezz@users.noreply.github.com> Co-authored-by: danceratopz <danceratopz@gmail.com>
Co-authored-by: Leo Lara <leolara@users.noreply.github.com> Co-authored-by: danceratopz <danceratopz@gmail.com> Co-authored-by: spencer-tb <spencer.tb@ethereum.org>
…event bogus sender recovery (ethereum#2983)
…m#2982) * fix(tooling): include namespace packages in coverage reports * fix(ci): lower json-loader minimum coverage --------- Co-authored-by: Sam Wilson <sam@binarycake.ca>
…eum#2987) Co-authored-by: danceratopz <danceratopz@gmail.com>
Remove `ignore=True` from `TangerineWhistle` and `SpuriousDragon` so they
are included in `get_deployed_forks()` and filled. Both have distinct EVM
rulesets (`TANGERINE`/`SPURIOUS`) and full EELS `t8n` support but were
never filled, leaving `valid_from("TangerineWhistle")` tests starting at
Byzantium.
Update the `valid_until` marker test for the two added deployed forks.
Split `Frontier`->`Shanghai` + `Cancun` into `Frontier`->`Paris` + `Shanghai`->`Cancun` so the two newly filled forks do not overload the `pre-cancun` job. Keeps the same runner count in both the `fill` matrix (`test.yaml`) and the release split (`fork-ranges.yaml`).
…s (Pt. 2b) (ethereum#3320) * fix(tests): enhance & un-skip Amsterdam ported static create-OOG tests (Pt. 2b) * refactor(tests): Refactor/update ported static tests * fix(claude): Enhance skill * fix(tests): Restore attributions from the original test comments --------- Co-authored-by: marioevz <marioevz@gmail.com>
* chore(tests): mark memory heavy tests as bigmem Co-authored-by: jsign <6136245+jsign@users.noreply.github.com> * fix(test-plugins): register the bigmem marker --------- Co-authored-by: jsign <6136245+jsign@users.noreply.github.com>
…eum#3353) Co-authored-by: jsign <6136245+jsign@users.noreply.github.com>
…eum#3352) Co-authored-by: jsign <6136245+jsign@users.noreply.github.com>
…nce, add `inclusion_test` marker (ethereum#3337) * chore(test-fill): Rename `not derived_test` to `primary_format` * refactor(test-fill): Move parametrization logic to `BaseTest` * refactor(test-fill): Retain label on parametrization * feat(test-fill): Allow a label to override the t8n cache key A fixture format's transition tool cache key is shared by every label of that format, and cache entries are looked up by call order, so two labels that ask the transition tool for different things would feed each other stale output. Let a label declare its own key, or an empty string to opt out of caching. * refactor(test-fill): Retain label in `discard_fixture_format_by_marks` The hook received the format with its label stripped, so a spec type that labels one format more than once could not discard a single label. Pass the labeled format through; comparisons against a plain format are unaffected since a labeled format compares equal to the format it wraps. * feat(tests): Add `inclusion_test` marker Marks tests whose purpose is to verify whether a transaction can be included in a block, where the transaction under test is the last one of the last block. Applied to the withdrawal funding, block gas limit and post-authorization nonce tests. * feat(tests): Apply `inclusion_test` marker to transaction validity tests Marks the hand-written tests that verify a transaction is rejected, where the transaction under test is the last one of the last block: 82 tests across 38 files, covering 27 distinct transaction exceptions. Excluded: `ported_static` tests, which resolve their expectation at runtime and repeat the same exceptions across thousands of cases, except one cherry-pick for an exception no hand-written test covers; `TransactionTest` based tests, which produce no block; and tests whose block is rejected for a block-level reason. * feat(tests): Mark transaction validity tests as inclusion tests A standalone invalid transaction can never be appended to a block, so these are the simplest inclusion tests there are: an empty block, the transaction offered to the client, and no way to include it. Adds `TYPE_4_INVALID_AUTHORITY_SIGNATURE`, `TYPE_4_INVALID_AUTHORITY_SIGNATURE_S_TOO_HIGH`, `TYPE_4_INVALID_AUTHORIZATION_FORMAT` and `NONCE_OVERFLOW` to the set of covered rejection reasons. * feat(tests): Mark transaction validity tests missed by the first pass The first pass looked for a transaction error in the test body, which misses the tests that take their transaction from a conftest fixture. The three `test_transaction_validity.py` files are marked whole, since every test in them asks whether a transaction is valid, and the ones that expect a valid transaction are the positive case. * feat(test-fill): Let a label veto itself by fork or marker `supports_fork` and `discard_fixture_format_by_marks` were called on the format with its label stripped, so a label could not exclude itself. Both are now methods on `LabeledFixtureFormat` that defer to the wrapped format by default, letting a subclass restrict a single label to the forks whose fixture it makes sense for, without affecting the sibling labels. * refactor(test-execute): Fix divergence between fill and execute * fix(tooling): Update stale `derived_test` selectors in `Justfile` to `primary_format` * chore(tests): Remove `inclusion_test` marker duplicated by the module `pytestmark` * feat(test-specs): Add unit test for the duplicate t8n cache key * fix(test-fill): Enforce inclusion_test template * fix(tests): Remove inclusion_test marker from mislabeled tests * fix(test-specs): Refactor to make re-labeling work * feat(tests): Add more markers * feat(docs): Add `inclusion_test` marker to docs * Review comment --------- Co-authored-by: danceratopz <danceratopz@gmail.com>
…ereum#3307) * feat(ci): smoke-test the built wheel in a clean environment * refactor(spec-tools,testing): move evm_tools into the testing package * docs(spec-tools,testing): document the new home of ethereum-spec-evm * post review updates * post review updates: round 2 - add `just build-wheels`/`test-packaging`; the packaging CI job now delegates to it and the import walk lives in `.github/scripts/` - add `just check-testing-imports`: grep `src/` for execution_testing references, catching the function-scoped imports that a module-level import walk cannot see - move the t8n_build fixtures into the testing package's tests/fixtures - rename `tests/evm_tools` to `tests/spec_tools` - repoint the stale import-cycle comment pointers in `t8n/cli.py` at the surviving note in `result.py` - drop the broken `whitelist` entry point; `just whitelist` now runs the module via `python -m` - extend `just deadcode` to the moved evm_tools code and refresh the vulture whitelist accordingly - SHA-pin the `ethereum-spec-evm` docs link; drop the archived-EEST reference from the testing README - exclude `packages/testing/build/` from mypy: local wheel builds leave a setuptools tree there that shadows `execution_testing` * fix(test-evm-tools): Fix test_count_opcodes.py --------- Co-authored-by: marioevz <marioevz@gmail.com>
…ges (ethereum#3371) * fix(consume): map reth BAL account-miss and item-cost rejection messages * map reth SYSTEM_CONTRACT_EMPTY message
…getBlockReceipts` (ethereum#3345) * perf(fill): fetch a block's receipts with one eth_getBlockReceipts * refactor: block receipt fetching logic --------- Co-authored-by: LouisTsai <q1030176@gmail.com>
* perf(test-forks): memoize per-fork gas costs * chore: deduce docstring --------- Co-authored-by: LouisTsai <q1030176@gmail.com>
…thereum#3367) * fix(client-clis): bound the opcode-count trace explicitly `extract_block_opcode_count` calls `debug_traceBlockByHash` without a `timeout`, so the client applies its own default -- 5s per transaction on geth. That is far below what a benchmark block needs. * refactor: request timeout logic --------- Co-authored-by: LouisTsai <q1030176@gmail.com>
|
Too many files changed for review (2095 files, 500 file limit). |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Port Monad senders_authorities and MIP-8 paged state root onto the relocated evm_tools and the new StateCommitment abstraction. Co-Authored-By: Claude <claude-opus-5[1m]>
Drop the tag-push workflow in favour of dispatching release_fixtures.yaml. Co-Authored-By: Claude <claude-opus-5[1m]>
Phase 1 allows NO_TESTS_COLLECTED and build-fixtures already tolerates exit 5. Co-Authored-By: Claude <claude-opus-5[1m]>
| @@ -171,12 +175,13 @@ def execute_required_contracts( | |||
| gas_price=sender_funding_transactions_gas_price, | |||
| ) | |||
| except Exception as e: | |||
| raise RuntimeError( | |||
| f"Error deploying deterministic deployment contract:\n{e}" | |||
| "\nTry deploying the contract manually using a different " | |||
| "RPC endpoint with the following command:\n" | |||
| "uv run execute deploy-required-contracts" | |||
| ) from e | |||
| logger.warning( | |||
| "Could not deploy the deterministic deployment proxy; " | |||
| "tests that require it will be skipped. To deploy it " | |||
| "manually against a different RPC endpoint run " | |||
| "`uv run execute deploy-required-contracts`. " | |||
| f"Reason: {e}" | |||
| ) | |||
There was a problem hiding this comment.
Medium severity and reachable issue identified in your code:
Line 161 has a vulnerable usage of filelock, introducing a medium severity vulnerability.
ℹ️ Why this is reachable
A reachable issue is a real security risk because your project actually executes the vulnerable code. This issue is reachable because your code uses a certain version of filelock.
Affected versions of filelock are vulnerable to Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition') / Improper Link Resolution Before File Access ('Link Following') / Time-of-check Time-of-use (TOCTOU) Race Condition. filelock is vulnerable to a TOCTOU race condition in its hard file-lock implementation. Because lock acquisition checks for the lock file and then opens it with O_TRUNC without O_NOFOLLOW (Unix) or reparse-point detection (Windows), a local attacker can plant a symlink in the gap between the check and the open, causing filelock to follow the symlink and truncate/corrupt an arbitrary victim-owned file. SoftFileLock is not affected because it opens with O_CREAT | O_EXCL and does not truncate.
References: GHSA
To resolve this comment:
Upgrade this dependency to at least version 3.20.1 at uv.lock.
💬 Ignore this finding
To ignore this, reply with:
/fp <comment>for false positive/ar <comment>for acceptable risk/other <comment>for all other reasons
You can view more details on this finding in the Semgrep AppSec Platform here.
| @@ -171,12 +175,13 @@ def execute_required_contracts( | |||
| gas_price=sender_funding_transactions_gas_price, | |||
| ) | |||
| except Exception as e: | |||
| raise RuntimeError( | |||
| f"Error deploying deterministic deployment contract:\n{e}" | |||
| "\nTry deploying the contract manually using a different " | |||
| "RPC endpoint with the following command:\n" | |||
| "uv run execute deploy-required-contracts" | |||
| ) from e | |||
| logger.warning( | |||
| "Could not deploy the deterministic deployment proxy; " | |||
| "tests that require it will be skipped. To deploy it " | |||
| "manually against a different RPC endpoint run " | |||
| "`uv run execute deploy-required-contracts`. " | |||
| f"Reason: {e}" | |||
| ) | |||
There was a problem hiding this comment.
Medium severity and reachable issue identified in your code:
Line 161 has a vulnerable usage of filelock, introducing a medium severity vulnerability.
ℹ️ Why this is reachable
A reachable issue is a real security risk because your project actually executes the vulnerable code. This issue is reachable because your code uses a certain version of filelock.
Affected versions of filelock are vulnerable to Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition') / Improper Link Resolution Before File Access ('Link Following') / Time-of-check Time-of-use (TOCTOU) Race Condition. filelock's SoftFileLock acquires locks by creating the lock file after a separate writability check, with no protection against symlinks. A local attacker who can write to the lock-file directory can plant a symlink in the window between the check and os.open(), redirecting the lock operation to an attacker-controlled file. This causes silent lock-acquisition failures, denial of service, or writes to unintended files. The soft lock is used directly, as the FileLock fallback when fcntl is unavailable, and on platforms lacking os.O_NOFOLLOW.
To resolve this comment:
Upgrade this dependency to at least version 3.20.3 at uv.lock.
💬 Ignore this finding
To ignore this, reply with:
/fp <comment>for false positive/ar <comment>for acceptable risk/other <comment>for all other reasons
You can view more details on this finding in the Semgrep AppSec Platform here.
IMPORTANT: Merge with MERGE COMMIT!
Also important: upstream changed the way fixtures are released, and I'm intending to follow along - instead of a tag push there is a manual workflow to trigger