Skip to content

refactor: Intermediate opcodes#3

Closed
Carsons-Eels wants to merge 37 commits intoforks/amsterdamfrom
intermediate_opcodes
Closed

refactor: Intermediate opcodes#3
Carsons-Eels wants to merge 37 commits intoforks/amsterdamfrom
intermediate_opcodes

Conversation

@Carsons-Eels
Copy link
Copy Markdown
Owner

🗒️ Description

Adds import fixes for all the other gas constants

🔗 Related Issues or PRs

✅ Checklist

Cute Animal Picture

Put a link to a cute animal picture inside the parenthesis-->

Bengal Tiger by Prakash Aryal Pexel's Free to Use License

kamilchodola and others added 30 commits March 5, 2026 15:08
…arison (ethereum#2407)

* feat: split code for easier testing + add unit test

* test(test-execute): add JSONRPCError fallback path test for nonce sync. (#2)

- Cover the try/except branch in sync_worker_key_nonce() where
  get_account with block_number="latest" raises JSONRPCError and
  the function falls back to "pending".
- The existing parametrized tests only exercise the happy path;
  this completes branch coverage for the extracted function.
- Not parametrized because the nonce-sync logic is already proven
  by the existing cases — this test's concern is the recovery path.

---------

Co-authored-by: danceratopz <[email protected]>
…DEPOSIT_EVENT_LAYOUT (ethereum#2419)

In Amsterdam, blocks with invalid deposit event layouts may trigger BAL
validation errors before reaching deposit validation, since the deposit
contract is modified but absent from the BAL. Map "BAL validation failed"
to INVALID_DEPOSIT_EVENT_LAYOUT alongside the existing direct match.
Add test_ecmul.py with valid and invalid input test cases for the
BN254 ecmul (0x07) precompile, following the same pattern as
test_ecadd.py. Remove 6 ported static ecmul tests.

Valid cases: generator/inf/P1 with various scalars, empty input,
truncated input, extra trailing data.

Invalid cases: not-on-curve points, coordinates >= field modulus.
Add group order N to Spec and test ECMUL with scalars between the
group order and field modulus, and larger than the field modulus,
as required by EIP-196 test case list.
feat(tests-static): Port rest of ecmul tests in stZeroKnowledge2

feat(tests-static): Refactor

# Conflicts:
#	tests/byzantium/eip196_ec_add_mul/test_ecmul.py

Co-authored-by: marioevz <[email protected]>
* feat(tests): port EXTCODECOPY bounds test to frontier

* refactor(tests): add SHA3 check for full zero range per review

Verify the full 5000-byte EXTCODECOPY result is all zeros by hashing
it and comparing against the known keccak256 of 5000 zero bytes.
…ll (ethereum#2428)

Port extCodeHashCreatedAndDeletedAccountRecheckInOuterCallFiller.json.
Two-level call frame where outer re-checks EXTCODEHASH/EXTCODESIZE of
a CREATE2'd-then-selfdestructed contract after inner returns.
…ereum#2438)

* feat(tests): add ecpairing coordinate validation tests for BN254

Add test cases for coordinates >= P in ecpairing precompile inputs,
covering both G1 (2 coordinates) and G2 (4 coordinates). Each is
tested with both exact P and valid-mod-P values. Addresses ecpairing
part of ethereum#1587.

* chore(tests): Remove covered static tests

---------

Co-authored-by: marioevz <[email protected]>
…thereum#2440)

Add test cases where both r and s are invalid simultaneously:
r == 0 with s == N, r == N with s == 0, and r == N with s == N.
Also fix duplicate test ID and rename gte_order to eq_N to reflect
the actual test values. Closes ethereum#1533.
…#2443)

* chore(tests-static): Port more ecpairing tests

* chore(tests-static): Port more ecpairing tests

* chore(tests-static): Port more ecpairing_inputsFiller.yml

---------

Co-authored-by: marioevz <[email protected]>
…um#2445)

Add a 1-second delay before calling client.stop() when a test has
failed, giving the client container time to flush its logs. Applied
to both the main client fixture and the sync client fixture.
…thereum#2300)

* docs: fixed comments with values related to gas limits

* docs: updated text explaining transaction gas limit and fixed incorrect value of 120 million

* docs: clarified comment related to gas_limit
…#2369)

* feat(tests): identify and mark json_infra tests for same coverage

* refactor(json_infra): fill-then-consume pipeline with 3-mode fixture source

Replace the download-only json_infra CI flow with a fill-then-consume
pipeline. The new default fills the json_infra-marked tests locally
and runs the generated fixtures through the json_infra consumer. The
old download behaviour is preserved via --fixture-source=download, and
a --fixture-source=local mode allows re-running against fixtures already
on disk without any setup step.

- conftest: add --fixture-source={fill,download,local} option;
  fill mode runs `fill -m "json_infra and not slow and not benchmark
  and not derived_test"` into tests/json_infra/fixtures/locally_filled/
  before collection; download mode reproduces the old behaviour;
  local mode skips setup and warns if no fixtures are present
- tox.ini: add dependency_groups = test to json_infra env so fill is
  available
- test.yaml: simplify json_infra job (drop fetch-depth, changed-files
  step, and --file-list posarg); keep setup-env for the t8n tool
- test_rlp, test_trie, test_transaction, test_ethash: skip entire
  module when the ethereum_tests fixture set is absent so fill mode
  does not produce FileNotFoundError/collection errors

* refactor(json_infra): simplify to fill-then-run via tox

Move the fill step from a subprocess call inside pytest_sessionstart
to an explicit command in tox.ini, making the pipeline transparent
and removing hidden configuration (fork name, CPU count, marker
expression) from conftest.py.

- tox.ini: run `fill` then `pytest` as two explicit commands
- conftest.py: remove _FixturesDownloader, --fixture-source option,
  subprocess fill logic, fixture_lock, and all associated imports
- Remove test_trie, test_rlp, test_transaction, test_ethash and their
  helpers — these depended on the downloaded ethereum/tests fixtures
  which are no longer fetched
- Remove TEST_FIXTURES / _FixtureSource from __init__.py
- Remove fixture_lock from stash_keys.py

* rename json_infra to json_loader across the codebase

Rename the test directory, tox environment, pytest marker, and all
references from json_infra to json_loader.

* chore(json_loader): add coverage gate to catch stale test set

Add --cov=ethereum and --cov-fail-under=80 so CI fails if coverage
drops, signaling the minimal test set needs regeneration.

* ci(json_loader): set fail coverage at 70 percent

* ci(json_loader): move coverage gate to fill step

Measure coverage during fill (same as py3) rather than during pytest
consumption. This ensures apples-to-apples comparison: both envs
discover the same source files, avoiding inflated denominators from
passthrough forks that pytest --cov=ethereum force-discovers.
chfast and others added 7 commits March 9, 2026 23:42
…unt() (ethereum#2461)

* fix(testing): stop inserting empty Account in execute empty_account()

The execute backend's `_empty_account()` was inserting
`Account(nonce=0, balance=0)` into the pre-state, creating an
EIP-161 "empty account" on-chain. This is inconsistent with the
filler backend, which returns a bare address without adding it
to the pre-state (truly nonexistent).

The method's purpose is to return an unused address for a
nonexistent account. Remove the unnecessary insertion so both
backends behave identically. Update docstrings to clarify that
the returned address refers to a nonexistent account, not an
empty one.

* test(testing): verify empty_account() does not insert into pre-state
…more clearly differentiate between intermediate constants and existing ones
Add 39 GAS_OPCODE_* fields to the GasCosts dataclass and update
opcode_gas_map() in all forks to reference per-opcode fields
instead of shared tier constants.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.