Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
1929b39
chore: add grammar check automation files
danceratopz Dec 30, 2025
54fcd85
docs: fix grammar in src/ethereum/forks/*/vm/instructions (arithmetic…
danceratopz Dec 30, 2025
c99c021
docs: fix grammar in src/ethereum/forks/*/vm/instructions (block, env…
danceratopz Dec 30, 2025
c44c5c5
docs: fix grammar in src/ethereum/forks/*/vm/instructions (keccak, lo…
danceratopz Dec 30, 2025
67266a0
docs: fix grammar in src/ethereum/forks/*/vm/__init__.py (#5)
danceratopz Dec 30, 2025
2f0647e
docs: fix grammar in src/ethereum/forks/*/vm/instructions/system.py (#6)
danceratopz Dec 30, 2025
e33b83f
docs: fix grammar in src/ethereum/forks/*/vm (interpreter, runtime) (#7)
danceratopz Dec 30, 2025
bc8ab81
docs: fix grammar in src/ethereum/forks/*/vm/gas.py (#8)
danceratopz Dec 30, 2025
4f7346a
docs: fix grammar in src/ethereum/forks/*/vm/precompiled_contracts (_…
danceratopz Dec 30, 2025
3352a9b
docs: add backticks to `ECRECOVER` in module docstrings (#10)
danceratopz Dec 30, 2025
f85e9fa
docs: fix grammar in precompiled_contracts (modexp, alt_bn128) (#11)
danceratopz Dec 30, 2025
879f1c3
docs: fix grammar in point_evaluation.py and p256verify.py (#12)
danceratopz Dec 30, 2025
62b7538
docs: fix grammar in BLS12-381 precompiled contracts (#13)
danceratopz Dec 31, 2025
b0edeeb
docs: fix grammar in src/ethereum/forks/*/utils/*.py, trie.py, state.…
danceratopz Dec 31, 2025
ff2a99d
docs: fix grammar in blocks.py and bloom.py across all forks (#15)
danceratopz Dec 31, 2025
d9df8ef
docs: fix grammar in src/ethereum/forks/__init__.py, fork.py, fork_ty…
danceratopz Dec 31, 2025
07cbd0a
docs: fix grammar in src/ethereum/forks (exceptions, requests, eoa_de…
danceratopz Dec 31, 2025
c12ee8e
docs: fix grammar in src/ethereum (non-forks) (#18)
danceratopz Dec 31, 2025
d41ec01
chore(docs): fix spelling and grammar errors in ethereum_spec_tools (…
danceratopz Dec 31, 2025
8408c1c
docs: add missing preposition "to" following final audit
danceratopz Jan 2, 2026
48bc768
chore: remove grammar-fix files used for llm automation
danceratopz Jan 2, 2026
1929bf3
docs: remove non-existent `env` parameter from docstring
danceratopz Jan 5, 2026
0576b1e
docs: fix grammar in src/ethereum_spec_tools
danceratopz Jan 14, 2026
139efb2
chore(docs): further fixes following review
danceratopz Jan 16, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions src/ethereum/ethash.py
Original file line number Diff line number Diff line change
Expand Up @@ -398,8 +398,8 @@ def hashimoto_light(
dataset_size: Uint,
) -> Tuple[Bytes, Hash32]:
"""
Run the [`hashimoto`] algorithm by generating dataset item using the cache
instead of loading the full dataset into main memory.
Run the [`hashimoto`] algorithm by generating a dataset item using the
cache instead of loading the full dataset into main memory.

#### Parameters

Expand Down
2 changes: 1 addition & 1 deletion src/ethereum/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class InvalidBlock(EthereumException):

class StateWithEmptyAccount(EthereumException):
"""
Thrown when the state has empty account.
Thrown when the state has an empty account.
"""


Expand Down
4 changes: 2 additions & 2 deletions src/ethereum/forks/amsterdam/blocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ class Header:

number: Uint
"""
Block number, (height) in the chain.
Block number (height) in the chain.
"""

gas_limit: Uint
Expand Down Expand Up @@ -272,7 +272,7 @@ class Block:
header: Header
"""
The block header containing metadata and cryptographic commitments. Refer
[headers] for more details on the fields included in the header.
to [headers] for more details on the fields included in the header.

[headers]: ref:ethereum.forks.amsterdam.blocks.Header
"""
Expand Down
2 changes: 1 addition & 1 deletion src/ethereum/forks/amsterdam/bloom.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
Introduction
------------

This modules defines functions for calculating bloom filters of logs. For the
This module defines functions for calculating bloom filters of logs. For the
general theory of bloom filters see e.g. `Wikipedia
<https://en.wikipedia.org/wiki/Bloom_filter>`_. Bloom filters are used to allow
for efficient searching of logs by address and/or topic, by rapidly
Expand Down
2 changes: 1 addition & 1 deletion src/ethereum/forks/amsterdam/requests.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
Requests were introduced in EIP-7685 as a a general purpose framework for
Requests were introduced in EIP-7685 as a general purpose framework for
storing contract-triggered requests. It extends the execution header and
body with a single field each to store the request information.
This inherently exposes the requests to the consensus layer, which can
Expand Down
8 changes: 4 additions & 4 deletions src/ethereum/forks/amsterdam/state.py
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ def account_exists(state: State, address: Address) -> bool:

def account_has_code_or_nonce(state: State, address: Address) -> bool:
"""
Checks if an account has non zero nonce or non empty code.
Checks if an account has non-zero nonce or non-empty code.

Parameters
----------
Expand All @@ -412,7 +412,7 @@ def account_has_code_or_nonce(state: State, address: Address) -> bool:
Returns
-------
has_code_or_nonce : `bool`
True if the account has non zero nonce or non empty code,
True if the account has non-zero nonce or non-empty code,
False otherwise.

"""
Expand Down Expand Up @@ -517,7 +517,7 @@ def set_account_balance(state: State, address: Address, amount: U256) -> None:
Address of the account whose nonce needs to be incremented.

amount:
The amount that needs to set in balance.
The amount that needs to be set in the balance.

"""

Expand Down Expand Up @@ -557,7 +557,7 @@ def set_code(state: State, address: Address, code: Bytes) -> None:
The current state.

address:
Address of the account whose code needs to be update.
Address of the account whose code needs to be updated.

code:
The bytecode that needs to be set.
Expand Down
2 changes: 1 addition & 1 deletion src/ethereum/forks/amsterdam/trie.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ class BranchNode:
def encode_internal_node(node: Optional[InternalNode]) -> Extended:
"""
Encodes a Merkle Trie node into its RLP form. The RLP will then be
serialized into a `Bytes` and hashed unless it is less that 32 bytes
serialized into a `Bytes` object and hashed unless it is less than 32 bytes
when serialized.

This function also accepts `None`, representing the absence of a node,
Expand Down
2 changes: 1 addition & 1 deletion src/ethereum/forks/amsterdam/vm/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class BlockOutput:
receipts_trie : `ethereum.fork_types.Root`
Trie root of all the receipts in the block.
receipt_keys :
Key of all the receipts in the block.
Keys of all the receipts in the block.
block_logs : `Bloom`
Logs bloom of all the logs included in all the transactions of the
block.
Expand Down
2 changes: 0 additions & 2 deletions src/ethereum/forks/amsterdam/vm/eoa_delegation.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,6 @@ def set_delegation(message: Message) -> U256:
----------
message :
Transaction specific items.
env :
External items required for EVM execution.

Returns
-------
Expand Down
4 changes: 2 additions & 2 deletions src/ethereum/forks/amsterdam/vm/gas.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ def calculate_message_call_gas(
account inside a message call.
call_stipend :
The amount of stipend provided to a message call to execute code while
transferring value(ETH).
transferring value (ETH).

Returns
-------
Expand Down Expand Up @@ -288,7 +288,7 @@ def init_code_cost(init_code_length: Uint) -> Uint:

def calculate_excess_blob_gas(parent_header: Header) -> U64:
"""
Calculated the excess blob gas for the current block based
Calculates the excess blob gas for the current block based
on the gas used in the parent block.

Parameters
Expand Down
4 changes: 2 additions & 2 deletions src/ethereum/forks/amsterdam/vm/instructions/arithmetic.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def sub(evm: Evm) -> None:

def mul(evm: Evm) -> None:
"""
Multiply the top two elements of the stack, and pushes the result back
Multiplies the top two elements of the stack, and pushes the result back
on the stack.

Parameters
Expand Down Expand Up @@ -353,7 +353,7 @@ def signextend(evm: Evm) -> None:
# Can't extend any further
result = value
else:
# U256(0).to_be_bytes() gives b'' instead b'\x00'.
# U256(0).to_be_bytes() gives b'' instead of b'\x00'.
value_bytes = Bytes(value.to_be_bytes32())
# Now among the obtained value bytes, consider only
# N `least significant bytes`, where N is `byte_num + 1`.
Expand Down
2 changes: 1 addition & 1 deletion src/ethereum/forks/amsterdam/vm/instructions/block.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def coinbase(evm: Evm) -> None:
def timestamp(evm: Evm) -> None:
"""
Push the current block's timestamp onto the stack. Here the timestamp
being referred is actually the unix timestamp in seconds.
being referred to is actually the unix timestamp in seconds.

Here the current block refers to the block in which the currently
executing transaction/call resides.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ def returndatasize(evm: Evm) -> None:

def returndatacopy(evm: Evm) -> None:
"""
Copies data from the return data buffer code to memory.
Copies data from the return data buffer to memory.

Parameters
----------
Expand Down
6 changes: 3 additions & 3 deletions src/ethereum/forks/amsterdam/vm/instructions/memory.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def mstore8(evm: Evm) -> None:

def mload(evm: Evm) -> None:
"""
Load word from memory.
Loads a word from memory.

Parameters
----------
Expand Down Expand Up @@ -123,7 +123,7 @@ def mload(evm: Evm) -> None:

def msize(evm: Evm) -> None:
"""
Push the size of active memory in bytes onto the stack.
Pushes the size of active memory in bytes onto the stack.

Parameters
----------
Expand All @@ -146,7 +146,7 @@ def msize(evm: Evm) -> None:

def mcopy(evm: Evm) -> None:
"""
Copy the bytes in memory from one location to another.
Copies the bytes in memory from one location to another.

Parameters
----------
Expand Down
8 changes: 4 additions & 4 deletions src/ethereum/forks/amsterdam/vm/instructions/stack.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

def pop(evm: Evm) -> None:
"""
Remove item from stack.
Removes an item from the stack.

Parameters
----------
Expand All @@ -46,7 +46,7 @@ def pop(evm: Evm) -> None:

def push_n(evm: Evm, num_bytes: int) -> None:
"""
Pushes a N-byte immediate onto the stack. Push zero if num_bytes is zero.
Pushes an N-byte immediate onto the stack. Push zero if num_bytes is zero.

Parameters
----------
Expand Down Expand Up @@ -79,7 +79,7 @@ def push_n(evm: Evm, num_bytes: int) -> None:

def dup_n(evm: Evm, item_number: int) -> None:
"""
Duplicate the Nth stack item (from top of the stack) to the top of stack.
Duplicates the Nth stack item (from top of the stack) to the top of stack.

Parameters
----------
Expand Down Expand Up @@ -107,7 +107,7 @@ def dup_n(evm: Evm, item_number: int) -> None:

def swap_n(evm: Evm, item_number: int) -> None:
"""
Swap the top and the `item_number` element of the stack, where
Swaps the top and the `item_number` element of the stack, where
the top of the stack is position zero.

If `item_number` is zero, this function does nothing (which should not be
Expand Down
4 changes: 2 additions & 2 deletions src/ethereum/forks/amsterdam/vm/instructions/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,8 @@ def create2(evm: Evm) -> None:
"""
Creates a new account with associated code.

It's similar to CREATE opcode except that the address of new account
depends on the init_code instead of the nonce of sender.
It's similar to the CREATE opcode except that the address of the new
account depends on the init_code instead of the nonce of sender.

Parameters
----------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def bls12_pairing(evm: Evm) -> None:
Raises
------
InvalidParameter
If the input length is invalid or if sub-group check fails.
If the input length is invalid or if the subgroup check fails.

"""
data = evm.message.data
Expand All @@ -54,12 +54,12 @@ def bls12_pairing(evm: Evm) -> None:
g1_slice = data[g1_start : g1_start + Uint(128)]
g1_point = bytes_to_g1(bytes(g1_slice))
if not is_inf(bls12_multiply(g1_point, curve_order)):
raise InvalidParameter("Sub-group check failed for G1 point.")
raise InvalidParameter("Subgroup check failed for G1 point.")

g2_slice = data[g2_start : g2_start + Uint(256)]
g2_point = bytes_to_g2(bytes(g2_slice))
if not is_inf(bls12_multiply(g2_point, curve_order)):
raise InvalidParameter("Sub-group check failed for G2 point.")
raise InvalidParameter("Subgroup check failed for G2 point.")

result *= pairing(g2_point, g1_point)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
Introduction
------------

Implementation of the ECRECOVER precompiled contract.
Implementation of the `ECRECOVER` precompiled contract.
"""

from ethereum_types.numeric import U256
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
Introduction
------------

Mapping of precompiled contracts their implementations.
Mapping of precompiled contracts to their implementations.
"""

from typing import Callable, Dict
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

def modexp(evm: Evm) -> None:
"""
Calculates `(base**exp) % modulus` for arbitrary sized `base`, `exp` and.
Calculates `(base**exp) % modulus` for arbitrary sized `base`, `exp` and
`modulus`. The return value is the same length as the modulus.
"""
data = evm.message.data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@
:backlinks: none
:local:

Introduction.
Introduction
------------
Implementation of the P256VERIFY precompiled contract.

Implementation of the `P256VERIFY` precompiled contract.
"""

from ethereum_types.numeric import U256
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
Introduction
------------

Implementation of the POINT EVALUATION precompiled contract.
Implementation of the `POINT EVALUATION` precompiled contract.
"""

from ethereum_types.bytes import Bytes, Bytes32, Bytes48
Expand Down
2 changes: 1 addition & 1 deletion src/ethereum/forks/amsterdam/vm/runtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

def get_valid_jump_destinations(code: Bytes) -> Set[Uint]:
"""
Analyze the evm code to obtain the set of valid jump destinations.
Analyze the EVM code to obtain the set of valid jump destinations.

Valid jump destinations are defined as follows:
* The jump destination is less than the length of the code.
Expand Down
4 changes: 2 additions & 2 deletions src/ethereum/forks/arrow_glacier/blocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ class Header:

number: Uint
"""
Block number, (height) in the chain.
Block number (height) in the chain.
"""

gas_limit: Uint
Expand Down Expand Up @@ -207,7 +207,7 @@ class Block:
header: Header
"""
The block header containing metadata and cryptographic commitments. Refer
[headers] for more details on the fields included in the header.
to [headers] for more details on the fields included in the header.

[headers]: ref:ethereum.forks.arrow_glacier.blocks.Header
"""
Expand Down
2 changes: 1 addition & 1 deletion src/ethereum/forks/arrow_glacier/bloom.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
Introduction
------------

This modules defines functions for calculating bloom filters of logs. For the
This module defines functions for calculating bloom filters of logs. For the
general theory of bloom filters see e.g. `Wikipedia
<https://en.wikipedia.org/wiki/Bloom_filter>`_. Bloom filters are used to allow
for efficient searching of logs by address and/or topic, by rapidly
Expand Down
10 changes: 5 additions & 5 deletions src/ethereum/forks/arrow_glacier/state.py
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ def account_exists(state: State, address: Address) -> bool:

def account_has_code_or_nonce(state: State, address: Address) -> bool:
"""
Checks if an account has non zero nonce or non empty code.
Checks if an account has non-zero nonce or non-empty code.

Parameters
----------
Expand All @@ -379,7 +379,7 @@ def account_has_code_or_nonce(state: State, address: Address) -> bool:
Returns
-------
has_code_or_nonce : `bool`
True if the account has non zero nonce or non empty code,
True if the account has non-zero nonce or non-empty code,
False otherwise.

"""
Expand Down Expand Up @@ -500,7 +500,7 @@ def set_account_balance(state: State, address: Address, amount: U256) -> None:
Address of the account whose nonce needs to be incremented.

amount:
The amount that needs to set in balance.
The amount that needs to be set in the balance.

"""

Expand All @@ -520,7 +520,7 @@ def touch_account(state: State, address: Address) -> None:
The current state.

address:
The address of the account that need to initialised.
The address of the account that needs to be initialized.

"""
if not account_exists(state, address):
Expand Down Expand Up @@ -557,7 +557,7 @@ def set_code(state: State, address: Address, code: Bytes) -> None:
The current state.

address:
Address of the account whose code needs to be update.
Address of the account whose code needs to be updated.

code:
The bytecode that needs to be set.
Expand Down
Loading
Loading