Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
2e68908
chore: add grammar check automation files
danceratopz Dec 30, 2025
d16fce3
chore(grammar-check): complete review of tests/prague/**/*.py (#39)
danceratopz Jan 2, 2026
38a5212
chore(docs): fix grammar and spelling in tests/frontier/**/*.py (#40)
danceratopz Jan 2, 2026
d3e3c87
docs: fix grammar in tests/frontier/**/*.py (#41)
danceratopz Jan 2, 2026
5574cd4
chore(tests/cancun): fix grammar in test_tload_calls.py (#42)
danceratopz Jan 2, 2026
a0bc9ca
chore(docs): fix grammar in tests/osaka docstrings (#43)
danceratopz Jan 2, 2026
8fb49d8
chore(docs): fix grammar in tests/benchmark/**/*.py (#44)
danceratopz Jan 2, 2026
4f24599
docs: fix grammar in tests/json_infra (#45)
danceratopz Jan 2, 2026
ec2dcb3
docs: fix grammar in tests/shanghai (#46)
danceratopz Jan 2, 2026
0e9d672
docs: fix grammar in tests/byzantium (#47)
danceratopz Jan 2, 2026
ddfc1cd
docs: fix grammar in tests/istanbul and tests/berlin (#48)
danceratopz Jan 2, 2026
a823bc5
docs: fix grammar in tests/constantinople and tests/amsterdam (#49)
danceratopz Jan 2, 2026
8cbe158
docs: review grammar in tests/london, tests/homestead, tests/paris (#50)
danceratopz Jan 2, 2026
a664090
docs: fix grammar in tests root, common, and evm_tools (#51)
danceratopz Jan 2, 2026
c877002
docs: fix EIP terminology in tests/prague docstrings
danceratopz Jan 5, 2026
3c6ec75
docs: fix missing punctuation in tests/cancun EIP-4844 docstrings
danceratopz Jan 5, 2026
7e3c3f2
docs: remove duplicate word in tests/cancun docstring
danceratopz Jan 5, 2026
8b31413
docs: add missing article in tests/prague/eip7251 comment
danceratopz Jan 5, 2026
5f45c28
docs: move comment to docstring in tests/prague/eip6110
danceratopz Jan 5, 2026
9db47b2
chore: remove files used for llm automation
danceratopz Jan 5, 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
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ def test_bal_self_destruct(
}

# If the account was self-destructed in the same transaction,
# we expect the account to non-existent and its balance to be 0.
# we expect the account to be non-existent and its balance to be 0.
if self_destruct_in_same_tx:
post.update(
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def test_bal_7702_delegation_update(
oracle1 = pre.deploy_contract(code=Op.STOP)
oracle2 = pre.deploy_contract(code=Op.STOP)

## Perhaps create pre existing delegation,
## Perhaps create a pre-existing delegation,
## see `test_bal_7702_delegated_storage_access` since
## `test_bal_7702_delegation_create` already tests creation
tx_create = Transaction(
Expand Down Expand Up @@ -268,7 +268,7 @@ def test_bal_7702_delegation_clear(
oracle = pre.deploy_contract(code=Op.STOP)
abyss = Spec7702.RESET_DELEGATION_ADDRESS

## Perhaps create pre existing delegation,
## Perhaps create a pre-existing delegation,
## see `test_bal_7702_delegated_storage_access` since
## `test_bal_7702_delegation_create` already tests creation
tx_create = Transaction(
Expand Down
2 changes: 1 addition & 1 deletion tests/benchmark/compute/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class TransactionResult:


class ReturnDataStyle(Enum):
"""Helper enum to specify return data is returned to the caller."""
"""Helper enum to specify how return data is returned to the caller."""

RETURN = auto()
REVERT = auto()
Expand Down
2 changes: 1 addition & 1 deletion tests/benchmark/compute/instruction/test_account_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def test_extcode_ops(
gas_benchmark_value: int,
) -> None:
"""
Benchmark a block execution where a single opcode execution.
Benchmark a block execution where a single opcode is executed.
"""
# The attack gas limit is the gas limit which the target tx will use The
# test will scale the block gas limit to setup the contracts accordingly to
Expand Down
2 changes: 1 addition & 1 deletion tests/benchmark/compute/instruction/test_log.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def test_log(
"""Benchmark LOG instructions."""
setup = Bytecode()

# For non-zero data, load into memory.
# For non-zero data, load data into memory.
if non_zero_data:
setup += Op.CODECOPY(dest_offset=0, offset=0, size=Op.CODESIZE)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def test_precompile_warming(
pre: Alloc,
) -> None:
"""
Call BALANCE of a precompile addresses before and after a fork.
Call BALANCE of precompile addresses before and after a fork.

According to EIP-2929, when a transaction begins, accessed_addresses is
initialized to include:
Expand Down
3 changes: 1 addition & 2 deletions tests/byzantium/eip196_ec_add_mul/test_gas.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ def test_gas_costs(
enough_gas: bool,
) -> None:
"""
Tests the constant gas behavior of `ecadd/ecmul/ecpairing` precompiled
contract.
Tests the constant gas behavior of `ecadd/ecmul` precompiled contracts.
"""
gas_costs = fork.gas_costs()
gas = (
Expand Down
3 changes: 1 addition & 2 deletions tests/byzantium/eip197_ec_pairing/test_gas.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ def test_gas_costs(
enough_gas: bool,
) -> None:
"""
Tests the constant gas behavior of `ecadd/ecmul/ecpairing` precompiled
contract.
Tests the constant gas behavior of `ecpairing` precompiled contract.
"""
gas = fork.gas_costs().G_PRECOMPILE_ECPAIRING_BASE
if not enough_gas:
Expand Down
2 changes: 1 addition & 1 deletion tests/cancun/eip1153_tstore/test_tload_calls.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def make_call(call_type: Op, address: Address) -> Bytecode:
post = {
address_to: Account(
storage={
# other calls don't change context, there for tload updated in
# other calls don't change context, therefore tload updated in
# this account
slot_a_tload_after_subcall_result: 10
if call_type == Op.CALL
Expand Down
2 changes: 1 addition & 1 deletion tests/cancun/eip4844_blobs/test_blobhash_opcode.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
Tests `BLOBHASH` opcode in [EIP-4844: Shard Blob Transactions](https://eips.ethereum.org/EIPS/eip-4844).

Note: Adding a new test Add a function that is named `test_<test_name>` and
Note: To add a new test, add a function that is named `test_<test_name>` and
takes at least the following arguments.

Required arguments:
Expand Down
2 changes: 1 addition & 1 deletion tests/cancun/eip4844_blobs/test_excess_blob_gas.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

Tests `excessBlobGas` and `blobGasUsed` block fields for
[EIP-4844: Shard Blob Transactions](https://eips.ethereum.org/EIPS/eip-4844)
Note: Adding a new test Add a function that is named `test_<test_name>` and
Note: To add a new test, add a function that is named `test_<test_name>` and
takes at least the following arguments.

Required arguments:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ def test_invalid_pre_fork_block_with_blob_fields(

Blocks sent by NewPayloadV2 (Shanghai) that contain `excessBlobGas` and
`blobGasUsed` fields must be rejected with the appropriate
`EngineAPIError.InvalidParams` error error.
`EngineAPIError.InvalidParams` error.
"""
header_modifier = Header(
excess_blob_gas=0 if excess_blob_gas_present else None,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
Tests point evaluation precompile for [EIP-4844: Shard Blob Transactions](https://eips.ethereum.org/EIPS/eip-4844).

Note: Adding a new test Add a function that is named `test_<test_name>` and
Note: To add a new test, add a function that is named `test_<test_name>` and
takes at least the following arguments.

Required arguments:
Expand Down
4 changes: 2 additions & 2 deletions tests/common/precompile_fixtures.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
A set of common pytest fixtures for tests executing precompiled contracts.

These can help creating a wrapping contract that calls the precompile and
These can help create a wrapping contract that calls the precompile and
records the results in storage, so that tests can verify the expected behavior.
Also, the gas calculation and transaction setup is handled here.
"""
Expand Down Expand Up @@ -83,7 +83,7 @@ def call_contract_code(
The code calls the precompile and stores the call return code, output size,
and output hash in storage. The information about the call output is
collected with the RETURNDATASIZE and RETURNDATACOPY opcodes.
Therefore, the test contract doesn't work correctly in forks pre Byzantium.
Therefore, the test contract doesn't work correctly in pre-Byzantium forks.

Args:
precompile_address: Address of the precompile to call.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
"""
Return data management around create2 Port
call_outsize_then_create2_successful_then_returndatasizeFiller.json test Port
call_then_create2_successful_then_returndatasizeFiller.json test.
Test CREATE2 return data memory management.

Ported tests for return data management around CREATE2:
- call_outsize_then_create2_successful_then_returndatasizeFiller.json
- call_then_create2_successful_then_returndatasizeFiller.json
"""

import pytest
Expand Down
4 changes: 2 additions & 2 deletions tests/constantinople/eip145_bitwise_shift/spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ class Spec:
https://eips.ethereum.org/EIPS/eip-145.
"""

# Below are GPT o4-mini-high implementation of shift functions It can
# contain bugs, treat it with caution and refer to EVM implementations
# Below is a GPT o4-mini-high implementation of shift functions. It can
# contain bugs, treat it with caution and refer to EVM implementations.
@staticmethod
def sar(shift: int, value: int) -> int:
"""
Expand Down
2 changes: 1 addition & 1 deletion tests/frontier/create/test_create_deposit_oog.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
The test CREATE's behavior when running out of gas for code deposit.
Test CREATE's behavior when running out of gas for code deposit.
"""

import pytest
Expand Down
4 changes: 2 additions & 2 deletions tests/frontier/create/test_create_one_byte.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""
The test calls CREATE in a loop deploying 1-byte contracts with all possible
byte values, records in storage the values that failed to deploy.
Test calling CREATE in a loop to deploy 1-byte contracts with all possible
byte values, recording in storage the values that failed to deploy.
"""

import pytest
Expand Down
2 changes: 1 addition & 1 deletion tests/frontier/create/test_create_suicide_during_init.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Deploy contract that calls selfdestruct in it's initcode."""
"""Deploy contract that calls selfdestruct in its initcode."""

from enum import Enum

Expand Down
8 changes: 4 additions & 4 deletions tests/frontier/create/test_create_suicide_store.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""
Test dynamically created address is still callable and perform storage
operations after being called for self destruct in a call.
Test that a dynamically created address is still callable and can perform
storage operations after being called for selfdestruct.
"""

from enum import IntEnum
Expand Down Expand Up @@ -49,8 +49,8 @@ def test_create_suicide_store(
create_opcode: Op,
) -> None:
"""
Create dynamic contract that suicides, then called to push some storage
and then called to return that storage value.
Create a dynamic contract that self-destructs, then call it to store some
data and then call it again to return that storage value.
"""
tload_support = fork.valid_opcodes().count(Op.TLOAD)
subcall_storage = 0x12
Expand Down
2 changes: 1 addition & 1 deletion tests/frontier/opcodes/test_all_opcodes.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""
Call every possible opcode and test that the subcall is successful if the
opcode is supported by the fork supports and fails otherwise.
opcode is supported by the fork and fails otherwise.
"""

from typing import Dict, Generator, Iterator
Expand Down
2 changes: 1 addition & 1 deletion tests/frontier/opcodes/test_call.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""test `CALL` opcode."""
"""Test `CALL` opcode."""

import pytest
from execution_testing import (
Expand Down
2 changes: 1 addition & 1 deletion tests/frontier/opcodes/test_calldatacopy.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""test `CALLDATACOPY` opcode."""
"""Test `CALLDATACOPY` opcode."""

import pytest
from execution_testing import (
Expand Down
2 changes: 1 addition & 1 deletion tests/frontier/opcodes/test_calldataload.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""test `CALLDATALOAD` opcode."""
"""Test `CALLDATALOAD` opcode."""

import pytest
from execution_testing import (
Expand Down
2 changes: 1 addition & 1 deletion tests/frontier/opcodes/test_calldatasize.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""test `CALLDATASIZE` opcode."""
"""Test `CALLDATASIZE` opcode."""

import pytest
from execution_testing import (
Expand Down
2 changes: 1 addition & 1 deletion tests/frontier/opcodes/test_dup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Test DUP Test the DUP opcodes."""
"""Test the DUP opcodes."""

import pytest
from execution_testing import (
Expand Down
2 changes: 1 addition & 1 deletion tests/frontier/opcodes/test_push.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def test_stack_overflow(
stack_height: int,
) -> None:
"""
A test the stack overflows when the stack limit of 1024 is exceeded.
Test that the stack overflows when the stack limit of 1024 is exceeded.
"""
env = Environment()

Expand Down
4 changes: 2 additions & 2 deletions tests/frontier/opcodes/test_swap.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ def test_stack_underflow(
swap_opcode: Op,
) -> None:
"""
A test to ensure that the stack underflow when there are not enough
elements for the `SWAP*` opcode to operate.
Test that the stack underflows when there are not enough elements for the
`SWAP*` opcode to operate.

For each SWAPn operation, we push exactly (n-1) elements to cause an
underflow when trying to swap with the nth element.
Expand Down
14 changes: 8 additions & 6 deletions tests/frontier/scenarios/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,10 @@ class ScenarioExpectOpcode(Enum):
@dataclass
class ScenarioEnvironment:
"""
Scenario evm environment Each scenario must define an environment on which
program is executed This is so post state verification could check results
of evm opcodes.
Scenario EVM environment.

Each scenario must define an environment on which the program is executed.
This is so post state verification can check the results of EVM opcodes.
"""

code_address: Address # Op.ADDRESS, address scope for program
Expand All @@ -50,7 +51,7 @@ class ScenarioEnvironment:
call_value: int # Op.CALLVALUE of call that is done to the program
call_dataload_0: int # Op.CALLDATALOAD(0) expected result
call_datasize: int # Op.CALLDATASIZE expected result
has_static: bool = False # Weather scenario execution context is static
has_static: bool = False # Whether scenario execution context is static


@dataclass
Expand Down Expand Up @@ -247,8 +248,9 @@ def make_gas_hash_contract(pre: Alloc) -> Address:

def make_invalid_opcode_contract(pre: Alloc, fork: Fork) -> Address:
"""
Deploy a contract that will execute any asked byte as an opcode from
calldataload Deploy 20 empty stack elements. Jump to opcode instruction. if
Deploy a contract that will execute any asked byte as an opcode.

Deploy 20 empty stack elements. Jump to opcode instruction. If it
worked, return 0.
"""
invalid_opcode_caller = pre.deploy_contract(
Expand Down
4 changes: 2 additions & 2 deletions tests/frontier/scenarios/programs/all_frontier_opcodes.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""
Define a program for scenario test that executes all frontier opcodes and
entangles it's result.
verifies its result.
"""

from functools import cached_property
Expand All @@ -17,7 +17,7 @@

def make_all_opcode_program() -> Bytecode:
"""
Make a program that call each Frontier opcode and verifies it's result.
Make a program that calls each Frontier opcode and verifies its result.
"""
code: Bytecode = (
# Test opcode 01 - ADD
Expand Down
10 changes: 5 additions & 5 deletions tests/frontier/scenarios/test_scenarios.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,13 +193,13 @@ def test_scenarios(
scenarios: List[Scenario],
) -> None:
"""
Test given operation in different scenarios Verify that it's return value
equal to expected result on every scenario, that is valid for the given
fork.
Test a given operation in different scenarios. Verify that its return value
is equal to the expected result for every scenario that is valid for the
given fork.

Note: Don't use pytest parametrize for scenario production, because
scenarios will be complex Generate one test file for [each operation] *
[each scenario] to save space As well as operations will be complex too
scenarios will be complex. Generate one test file for [each operation] *
[each scenario] to save space. As well as operations will be complex too.
"""
tx_env = Environment()
tx_origin: Address = pre.fund_eoa()
Expand Down
2 changes: 1 addition & 1 deletion tests/frontier/touch/test_touch.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""test account touch behavior."""
"""Test account touch behavior."""

import pytest
from execution_testing import (
Expand Down
2 changes: 1 addition & 1 deletion tests/frontier/validation/test_header.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def test_gas_limit_below_minimum(
env: Environment,
) -> None:
"""
Tests that a block with a gas limit below limit throws an error.
Tests that a block with a gas limit below the minimum throws an error.
"""
modified_fields = {"gas_limit": gas_limit}
env.gas_limit = ZeroPaddedHexNumber(5000)
Expand Down
6 changes: 3 additions & 3 deletions tests/frontier/validation/test_transaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def test_tx_gas_limit(
env: Environment,
) -> None:
"""
Tests that if a tx gas limit is higher than the block with a gas limit,
Tests that if a tx gas limit is higher than the block gas limit,
an exception is raised.
"""
sender = pre.fund_eoa()
Expand Down Expand Up @@ -72,7 +72,7 @@ def test_tx_nonce(
expected_exception: TransactionException | None,
) -> None:
"""
Tests that if a tx nonce matches the account nonce.
Tests that the tx nonce matches the account nonce.
"""
sender = pre.fund_eoa(nonce=5)
to = pre.fund_eoa()
Expand Down Expand Up @@ -114,7 +114,7 @@ def test_sender_balance(
expected_exception: TransactionException | None,
) -> None:
"""
Tests that if a sender has sufficient balance.
Tests that the sender has sufficient balance.
"""
sender = pre.fund_eoa()
to = pre.fund_eoa()
Expand Down
2 changes: 1 addition & 1 deletion tests/istanbul/eip152_blake2/test_blake2_delegatecall.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
Test delegatecall to Blake2B Precompile before and after added.
Test delegatecall to Blake2B Precompile before and after being added.
"""

import pytest
Expand Down
2 changes: 1 addition & 1 deletion tests/json_infra/helpers/load_blockchain_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def runtest(self) -> None:
# block hash provided in the test is not correct. Or all the
# blocks process correctly but the post state provided is not
# right. Since these tests do not directly have anything to do
# with the state teansition itself, we skip these
# with the state transition itself, we skip these
# See src/BlockchainTestsFiller/InvalidBlocks/bcExpectSection
# in ethereum/tests
if "exceptions" in json_data:
Expand Down
Loading
Loading