From aaa1c13800d64a037ca93997e14a17dc3eb339ff Mon Sep 17 00:00:00 2001 From: Barnabas Busa Date: Fri, 9 Feb 2024 11:05:41 +0100 Subject: [PATCH 1/6] Update cancun mainnet fork date --- network-upgrades/mainnet-upgrades/cancun.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/network-upgrades/mainnet-upgrades/cancun.md b/network-upgrades/mainnet-upgrades/cancun.md index a1188edefb..42a91475da 100644 --- a/network-upgrades/mainnet-upgrades/cancun.md +++ b/network-upgrades/mainnet-upgrades/cancun.md @@ -16,8 +16,8 @@ Execution layer changes included in the Network Upgrade. |---------|--------------|-------------------------|--------------| ------------------ | | Goerli | `1705473120` | 2024-01-17 06:32:00 | `0x70cc14e2` | 231680 | Sepolia | `1706655072` | 2024-01-30 22:51:12 | `0x88cf81d9` | 132608 -| Holesky | `1707305664` | 2024-02-07 11:34:24. | `0x9b192ad0` | 29696 -| Mainnet | | | | +| Holesky | `1707305664` | 2024-02-07 11:34:24 | `0x9b192ad0` | 29696 +| Mainnet | `1710338135` | 2024-03-13 13:55:35 | `0x9f3d2254` | 269568 ### Readiness Checklist @@ -28,7 +28,7 @@ Execution layer changes included in the Network Upgrade. - [x] [Devnets](https://github.com/ethpandaops/dencun-testnet) - [x] [Testing suites](https://notes.ethereum.org/@ethpandaops/dencun-testing-overview) - [x] Select Testnet Fork Blocks - - [ ] Select Mainnet Fork Block + - [x] Select Mainnet Fork Block - [ ] Release Mainnet Compatible Clients - [ ] Geth - [ ] Besu From ed6087d88eb3a260321a60b6fa4862084c2a51d7 Mon Sep 17 00:00:00 2001 From: Richard Gregory Date: Fri, 9 Feb 2024 14:26:12 +0100 Subject: [PATCH 2/6] Refactor make_receipt's control flow to be more coherent Fixes: #874 --- src/ethereum/arrow_glacier/fork.py | 2 +- src/ethereum/gray_glacier/fork.py | 2 +- src/ethereum/london/fork.py | 2 +- src/ethereum/paris/fork.py | 2 +- src/ethereum/shanghai/fork.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/ethereum/arrow_glacier/fork.py b/src/ethereum/arrow_glacier/fork.py index f333662a26..8fb6c78703 100644 --- a/src/ethereum/arrow_glacier/fork.py +++ b/src/ethereum/arrow_glacier/fork.py @@ -475,7 +475,7 @@ def make_receipt( if isinstance(tx, AccessListTransaction): return b"\x01" + rlp.encode(receipt) - if isinstance(tx, FeeMarketTransaction): + elif isinstance(tx, FeeMarketTransaction): return b"\x02" + rlp.encode(receipt) else: return receipt diff --git a/src/ethereum/gray_glacier/fork.py b/src/ethereum/gray_glacier/fork.py index 948938597a..066542c574 100644 --- a/src/ethereum/gray_glacier/fork.py +++ b/src/ethereum/gray_glacier/fork.py @@ -475,7 +475,7 @@ def make_receipt( if isinstance(tx, AccessListTransaction): return b"\x01" + rlp.encode(receipt) - if isinstance(tx, FeeMarketTransaction): + elif isinstance(tx, FeeMarketTransaction): return b"\x02" + rlp.encode(receipt) else: return receipt diff --git a/src/ethereum/london/fork.py b/src/ethereum/london/fork.py index 0a99bc0a9e..48abc49b3b 100644 --- a/src/ethereum/london/fork.py +++ b/src/ethereum/london/fork.py @@ -483,7 +483,7 @@ def make_receipt( if isinstance(tx, AccessListTransaction): return b"\x01" + rlp.encode(receipt) - if isinstance(tx, FeeMarketTransaction): + elif isinstance(tx, FeeMarketTransaction): return b"\x02" + rlp.encode(receipt) else: return receipt diff --git a/src/ethereum/paris/fork.py b/src/ethereum/paris/fork.py index 96e0865827..1c076cb173 100644 --- a/src/ethereum/paris/fork.py +++ b/src/ethereum/paris/fork.py @@ -387,7 +387,7 @@ def make_receipt( if isinstance(tx, AccessListTransaction): return b"\x01" + rlp.encode(receipt) - if isinstance(tx, FeeMarketTransaction): + elif isinstance(tx, FeeMarketTransaction): return b"\x02" + rlp.encode(receipt) else: return receipt diff --git a/src/ethereum/shanghai/fork.py b/src/ethereum/shanghai/fork.py index 98719869f8..053e6c6abd 100644 --- a/src/ethereum/shanghai/fork.py +++ b/src/ethereum/shanghai/fork.py @@ -393,7 +393,7 @@ def make_receipt( if isinstance(tx, AccessListTransaction): return b"\x01" + rlp.encode(receipt) - if isinstance(tx, FeeMarketTransaction): + elif isinstance(tx, FeeMarketTransaction): return b"\x02" + rlp.encode(receipt) else: return receipt From 3090f8cc1f5c985af18dd9c55ed62d7120397d83 Mon Sep 17 00:00:00 2001 From: Guruprasad Kamath Date: Tue, 20 Feb 2024 09:11:11 +0100 Subject: [PATCH 3/6] rename gas_fee to max_gas_fee --- src/ethereum/arrow_glacier/fork.py | 6 +++--- src/ethereum/gray_glacier/fork.py | 6 +++--- src/ethereum/london/fork.py | 6 +++--- src/ethereum/paris/fork.py | 6 +++--- src/ethereum/shanghai/fork.py | 6 +++--- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/ethereum/arrow_glacier/fork.py b/src/ethereum/arrow_glacier/fork.py index 8fb6c78703..3f393726f8 100644 --- a/src/ethereum/arrow_glacier/fork.py +++ b/src/ethereum/arrow_glacier/fork.py @@ -765,12 +765,12 @@ def process_transaction( sender_account = get_account(env.state, sender) if isinstance(tx, FeeMarketTransaction): - gas_fee = tx.gas * tx.max_fee_per_gas + max_gas_fee = tx.gas * tx.max_fee_per_gas else: - gas_fee = tx.gas * tx.gas_price + max_gas_fee = tx.gas * tx.gas_price ensure(sender_account.nonce == tx.nonce, InvalidBlock) - ensure(sender_account.balance >= gas_fee + tx.value, InvalidBlock) + ensure(sender_account.balance >= max_gas_fee + tx.value, InvalidBlock) ensure(sender_account.code == bytearray(), InvalidBlock) effective_gas_fee = tx.gas * env.gas_price diff --git a/src/ethereum/gray_glacier/fork.py b/src/ethereum/gray_glacier/fork.py index 066542c574..effe505275 100644 --- a/src/ethereum/gray_glacier/fork.py +++ b/src/ethereum/gray_glacier/fork.py @@ -765,12 +765,12 @@ def process_transaction( sender_account = get_account(env.state, sender) if isinstance(tx, FeeMarketTransaction): - gas_fee = tx.gas * tx.max_fee_per_gas + max_gas_fee = tx.gas * tx.max_fee_per_gas else: - gas_fee = tx.gas * tx.gas_price + max_gas_fee = tx.gas * tx.gas_price ensure(sender_account.nonce == tx.nonce, InvalidBlock) - ensure(sender_account.balance >= gas_fee + tx.value, InvalidBlock) + ensure(sender_account.balance >= max_gas_fee + tx.value, InvalidBlock) ensure(sender_account.code == bytearray(), InvalidBlock) effective_gas_fee = tx.gas * env.gas_price diff --git a/src/ethereum/london/fork.py b/src/ethereum/london/fork.py index 48abc49b3b..e87e47205b 100644 --- a/src/ethereum/london/fork.py +++ b/src/ethereum/london/fork.py @@ -773,12 +773,12 @@ def process_transaction( sender_account = get_account(env.state, sender) if isinstance(tx, FeeMarketTransaction): - gas_fee = tx.gas * tx.max_fee_per_gas + max_gas_fee = tx.gas * tx.max_fee_per_gas else: - gas_fee = tx.gas * tx.gas_price + max_gas_fee = tx.gas * tx.gas_price ensure(sender_account.nonce == tx.nonce, InvalidBlock) - ensure(sender_account.balance >= gas_fee + tx.value, InvalidBlock) + ensure(sender_account.balance >= max_gas_fee + tx.value, InvalidBlock) ensure(sender_account.code == bytearray(), InvalidBlock) effective_gas_fee = tx.gas * env.gas_price diff --git a/src/ethereum/paris/fork.py b/src/ethereum/paris/fork.py index 1c076cb173..87da3a1177 100644 --- a/src/ethereum/paris/fork.py +++ b/src/ethereum/paris/fork.py @@ -553,12 +553,12 @@ def process_transaction( sender_account = get_account(env.state, sender) if isinstance(tx, FeeMarketTransaction): - gas_fee = tx.gas * tx.max_fee_per_gas + max_gas_fee = tx.gas * tx.max_fee_per_gas else: - gas_fee = tx.gas * tx.gas_price + max_gas_fee = tx.gas * tx.gas_price ensure(sender_account.nonce == tx.nonce, InvalidBlock) - ensure(sender_account.balance >= gas_fee + tx.value, InvalidBlock) + ensure(sender_account.balance >= max_gas_fee + tx.value, InvalidBlock) ensure(sender_account.code == bytearray(), InvalidBlock) effective_gas_fee = tx.gas * env.gas_price diff --git a/src/ethereum/shanghai/fork.py b/src/ethereum/shanghai/fork.py index 053e6c6abd..68fd279cad 100644 --- a/src/ethereum/shanghai/fork.py +++ b/src/ethereum/shanghai/fork.py @@ -574,12 +574,12 @@ def process_transaction( sender_account = get_account(env.state, sender) if isinstance(tx, FeeMarketTransaction): - gas_fee = tx.gas * tx.max_fee_per_gas + max_gas_fee = tx.gas * tx.max_fee_per_gas else: - gas_fee = tx.gas * tx.gas_price + max_gas_fee = tx.gas * tx.gas_price ensure(sender_account.nonce == tx.nonce, InvalidBlock) - ensure(sender_account.balance >= gas_fee + tx.value, InvalidBlock) + ensure(sender_account.balance >= max_gas_fee + tx.value, InvalidBlock) ensure(sender_account.code == bytearray(), InvalidBlock) effective_gas_fee = tx.gas * env.gas_price From b78f4d666cb5f5626410e46046d957d7b947e2d2 Mon Sep 17 00:00:00 2001 From: Dimitris Apostolou Date: Wed, 21 Feb 2024 11:09:44 +0200 Subject: [PATCH 4/6] Fix typos --- lists/evm/opcode-blocks.md | 4 ++-- lists/evm/pending-opcodes.md | 12 ++++++------ network-upgrades/README.md | 4 ++-- network-upgrades/mainnet-upgrades/shanghai.md | 2 +- network-upgrades/retrospectives/london.md | 2 +- src/ethereum/arrow_glacier/bloom.py | 2 +- src/ethereum/arrow_glacier/fork.py | 4 ++-- src/ethereum/arrow_glacier/vm/memory.py | 2 +- .../arrow_glacier/vm/precompiled_contracts/modexp.py | 2 +- src/ethereum/berlin/bloom.py | 2 +- src/ethereum/berlin/fork.py | 4 ++-- src/ethereum/berlin/vm/memory.py | 2 +- .../berlin/vm/precompiled_contracts/modexp.py | 2 +- src/ethereum/byzantium/bloom.py | 2 +- src/ethereum/byzantium/fork.py | 4 ++-- src/ethereum/byzantium/vm/memory.py | 2 +- .../byzantium/vm/precompiled_contracts/modexp.py | 2 +- src/ethereum/constantinople/bloom.py | 2 +- src/ethereum/constantinople/fork.py | 4 ++-- src/ethereum/constantinople/vm/memory.py | 2 +- .../vm/precompiled_contracts/modexp.py | 2 +- src/ethereum/crypto/finite_field.py | 2 +- src/ethereum/dao_fork/bloom.py | 2 +- src/ethereum/dao_fork/fork.py | 6 +++--- src/ethereum/dao_fork/vm/memory.py | 2 +- src/ethereum/frontier/bloom.py | 2 +- src/ethereum/frontier/fork.py | 4 ++-- src/ethereum/frontier/vm/memory.py | 2 +- src/ethereum/gray_glacier/bloom.py | 2 +- src/ethereum/gray_glacier/fork.py | 4 ++-- src/ethereum/gray_glacier/vm/memory.py | 2 +- .../gray_glacier/vm/precompiled_contracts/modexp.py | 2 +- src/ethereum/homestead/bloom.py | 2 +- src/ethereum/homestead/fork.py | 4 ++-- src/ethereum/homestead/vm/memory.py | 2 +- src/ethereum/istanbul/bloom.py | 2 +- src/ethereum/istanbul/fork.py | 4 ++-- src/ethereum/istanbul/vm/memory.py | 2 +- .../istanbul/vm/precompiled_contracts/modexp.py | 2 +- src/ethereum/london/bloom.py | 2 +- src/ethereum/london/fork.py | 4 ++-- src/ethereum/london/vm/memory.py | 2 +- .../london/vm/precompiled_contracts/modexp.py | 2 +- src/ethereum/muir_glacier/bloom.py | 2 +- src/ethereum/muir_glacier/fork.py | 4 ++-- src/ethereum/muir_glacier/vm/memory.py | 2 +- .../muir_glacier/vm/precompiled_contracts/modexp.py | 2 +- src/ethereum/paris/bloom.py | 2 +- src/ethereum/paris/fork.py | 2 +- src/ethereum/paris/vm/memory.py | 2 +- .../paris/vm/precompiled_contracts/modexp.py | 2 +- src/ethereum/shanghai/bloom.py | 2 +- src/ethereum/shanghai/fork.py | 2 +- src/ethereum/shanghai/vm/memory.py | 2 +- .../shanghai/vm/precompiled_contracts/modexp.py | 2 +- src/ethereum/spurious_dragon/bloom.py | 2 +- src/ethereum/spurious_dragon/fork.py | 4 ++-- src/ethereum/spurious_dragon/vm/memory.py | 2 +- src/ethereum/tangerine_whistle/bloom.py | 2 +- src/ethereum/tangerine_whistle/fork.py | 4 ++-- src/ethereum/tangerine_whistle/vm/memory.py | 2 +- src/ethereum_spec_tools/new_fork.py | 2 +- tests/helpers/load_state_tests.py | 4 ++-- tests/test_ethash_general.py | 2 +- 64 files changed, 86 insertions(+), 86 deletions(-) diff --git a/lists/evm/opcode-blocks.md b/lists/evm/opcode-blocks.md index ec4e35de9f..bc0e9e6817 100644 --- a/lists/evm/opcode-blocks.md +++ b/lists/evm/opcode-blocks.md @@ -1,9 +1,9 @@ Opcode Blocks ------------- -| Prefix | Available | Propsoed | Name | +| Prefix | Available | Proposed | Name | |--------|----------:|---------:|---------------------------------| -| 0x0 | 3 | | Aritmetic | +| 0x0 | 3 | | Arithmetic | | 0x1 | 2 | | Comparison / Bitwise | | 0x2 | 15 | | Cryptography | | 0x3 | 0 | | Environmental | diff --git a/lists/evm/pending-opcodes.md b/lists/evm/pending-opcodes.md index a77bf2ce6a..d344f90d61 100644 --- a/lists/evm/pending-opcodes.md +++ b/lists/evm/pending-opcodes.md @@ -2,7 +2,7 @@ Opcodes under active consideration ---------------------------------- This list includes opcodes under active consideration for adding to the -next or subsuquent hard fork. +next or subsequent hard fork. | Opcode | Name | Description | EIP | |:--------:|-----------------|-------------------------------------------------|------------------------------------------------------------------------------| @@ -12,7 +12,7 @@ next or subsuquent hard fork. | 0x5D | TSTORE | Transient data store | [EIP-1153](https://eips.ethereum.org/EIPS/eip-1153) | | 0x5E | MCOPY | Memory copy | [EIP-5656](https://eips.ethereum.org/EIPS/eip-5656) | | 0xE0 | RJUMP | relative jump | [EIP-4200](https://eips.ethereum.org/EIPS/eip-4200) | -| 0xE1 | RJUMPI | relative conditional jump | [EIP-4200](https://eips.ethereum.org/EIPS/eip-4200) | +| 0xE1 | RJUMPI | relative conditional jump | [EIP-4200](https://eips.ethereum.org/EIPS/eip-4200) | | 0xE2 | RJUMV | relative jump table | [EIP-4200](https://eips.ethereum.org/EIPS/eip-4200) | | 0xE3 | CALLF | EOF Subroutine Call | [EIP-4750](https://eips.ethereum.org/EIPS/eip-4750) | | 0xE4 | RETF | EOF Subroutine return | [EIP-4750](https://eips.ethereum.org/EIPS/eip-4750) | @@ -26,12 +26,12 @@ next or subsuquent hard fork. | 0xEC | CREATE3 | Create from EOF contained initcode | TBD - [mega EOF](https://notes.ethereum.org/@ipsilon/mega-eof-specification) | | 0xED | CREATE4 | Create from transaction contained initcode | TBD - [mega EOF](https://notes.ethereum.org/@ipsilon/mega-eof-specification) | | 0xEE | RETURNCONTRACT | Contract to be created, references EOF data | TBD - [mega EOF](https://notes.ethereum.org/@ipsilon/mega-eof-specification) | -| 0xEF | - | Reserved for EOF compatability | TBD - [mega EOF](https://notes.ethereum.org/@ipsilon/mega-eof-specification) | +| 0xEF | - | Reserved for EOF compatibility | TBD - [mega EOF](https://notes.ethereum.org/@ipsilon/mega-eof-specification) | | 0xF6 | PAY | transfers value from caller to target | [EIP-5920](https://eips.ethereum.org/EIPS/eip-5920) | -| 0xF8 | CALL2 | CALL without gas and output memory | [EIP-7069](https://eips.ethereum.org/EIPS/eip-7069) || +| 0xF8 | CALL2 | CALL without gas and output memory | [EIP-7069](https://eips.ethereum.org/EIPS/eip-7069) | | 0xF9 | DELEGATECALL2 | DELEGATECALL without gas and output memory | [EIP-7069](https://eips.ethereum.org/EIPS/eip-7069) | | 0xFB | STATICCALL2 | STATICCALL without gas and output memory | [EIP-7069](https://eips.ethereum.org/EIPS/eip-7069) | -| 0xFC | SETCODE | Change the code for the current contract | [EIP-6913](https://eips.ethereum.org/EIPS/eip-6913) | | +| 0xFC | SETCODE | Change the code for the current contract | [EIP-6913](https://eips.ethereum.org/EIPS/eip-6913) | Pending Opcode Table -------------------- @@ -42,7 +42,7 @@ Existing Opcodes ---------------- Current up to Shanghai. Opcodes not operation in mainnet (and are either -scheduled or accepted) are in *itallics*. +scheduled or accepted) are in *italics*. | Number | Name | Execution spec category | Initial Release | EIP | |--------|------------------|-------------------------|------------------|--------------------------------------------------------------------------------| diff --git a/network-upgrades/README.md b/network-upgrades/README.md index a153842934..6bf9a69823 100644 --- a/network-upgrades/README.md +++ b/network-upgrades/README.md @@ -10,7 +10,7 @@ In an effort to separate this process from the EIP standardization process, thre **Considered for Inclusion**: Signals that client developers are generally positive towards the idea, and that, assuming it meets all the requirements for mainnet inclusion, it could potentially be included in a network upgrade. This means the EIP may be included in client integration testnets. It is similar to "concept ACK" in other open source projects, and is not sufficient to result in deployment to mainnet. -**Client Integration Testnets**: Short-lived integration testnets which are stood up to test cross-client implementations of certain EIPs. This does not guarantee mainnet deployement, and for some EIPs with small or non-applicable changes, this step may be skipped. +**Client Integration Testnets**: Short-lived integration testnets which are stood up to test cross-client implementations of certain EIPs. This does not guarantee mainnet deployment, and for some EIPs with small or non-applicable changes, this step may be skipped. **Mainnet**: Signals that client developers wish to include the EIP into an upgrade to the public Ethereum networks (i.e. testnets such as Goerli, Ropsten and Rinkeby and mainnet). @@ -43,4 +43,4 @@ Note: by this point, your EIP should be in `Review` status. ### Deploying your EIP to Mainnet -If client developers reach rough consensus to include your EIP in a network upgrade, it will be added to a spec under the `mainnet-upgardes` folder. When the upgrade spec gets finalized (i.e. the list of EIPs is final and blocks are selected), your EIP should be moved to the `Last Call` status. +If client developers reach rough consensus to include your EIP in a network upgrade, it will be added to a spec under the `mainnet-upgrades` folder. When the upgrade spec gets finalized (i.e. the list of EIPs is final and blocks are selected), your EIP should be moved to the `Last Call` status. diff --git a/network-upgrades/mainnet-upgrades/shanghai.md b/network-upgrades/mainnet-upgrades/shanghai.md index 63f01d533a..b4caa06dcd 100644 --- a/network-upgrades/mainnet-upgrades/shanghai.md +++ b/network-upgrades/mainnet-upgrades/shanghai.md @@ -18,7 +18,7 @@ Changes included in the Network Upgrade. | Goerli | `1678832736` | 3/14/2023, 10:25:36 PM | `0xf9843abf` | 162304 | Mainnet | `1681338455` | 4/12/2023, 10:27:35 PM | `0xdce96c2d` | 194048 -### Implementation Progresss +### Implementation Progress Implementation status of Included & CFI'd EIPs across participating clients. diff --git a/network-upgrades/retrospectives/london.md b/network-upgrades/retrospectives/london.md index 4bcef318bb..e7536cbd5f 100644 --- a/network-upgrades/retrospectives/london.md +++ b/network-upgrades/retrospectives/london.md @@ -85,7 +85,7 @@ July 22, 2021 assert sender.balance >= gasLimit * transaction.max_fee_per_gas ``` -A few lines above (L207), though, `sender.balance` is modified to substract from it the transaction's amount (`sender.balance -= transaction.amount`). This led to confusion, as some client teams used the full `sender.balance` (i.e. pre-subtraction of `transaction.amount`) when checking the assertion defined on line 217, rather than the updated value. +A few lines above (L207), though, `sender.balance` is modified to subtract from it the transaction's amount (`sender.balance -= transaction.amount`). This led to confusion, as some client teams used the full `sender.balance` (i.e. pre-subtraction of `transaction.amount`) when checking the assertion defined on line 217, rather than the updated value. One suggested fix is to move this assertion closer to when the `sender.balance` value is updated, similarly to the other assertion on line 208. diff --git a/src/ethereum/arrow_glacier/bloom.py b/src/ethereum/arrow_glacier/bloom.py index f43de65194..d4e1485281 100644 --- a/src/ethereum/arrow_glacier/bloom.py +++ b/src/ethereum/arrow_glacier/bloom.py @@ -13,7 +13,7 @@ general theory of bloom filters see e.g. `Wikipedia `_. Bloom filters are used to allow for efficient searching of logs by address and/or topic, by rapidly -eliminating blocks and reciepts from their search. +eliminating blocks and receipts from their search. """ from typing import Tuple diff --git a/src/ethereum/arrow_glacier/fork.py b/src/ethereum/arrow_glacier/fork.py index 3f393726f8..8bcd4c0352 100644 --- a/src/ethereum/arrow_glacier/fork.py +++ b/src/ethereum/arrow_glacier/fork.py @@ -275,7 +275,7 @@ def validate_header(header: Header, parent_header: Header) -> None: quantities in the header should match the logic for the block itself. For example the header timestamp should be greater than the block's parent timestamp because the block was created *after* the parent block. - Additionally, the block's number should be directly folowing the parent + Additionally, the block's number should be directly following the parent block's number since it is the next block in the sequence. Parameters @@ -622,7 +622,7 @@ def validate_ommers( To be considered valid, the ommers must adhere to the rules defined in the Ethereum protocol. The maximum amount of ommers is 2 per block and there cannot be duplicate ommers in a block. Many of the other ommer - contraints are listed in the in-line comments of this function. + constraints are listed in the in-line comments of this function. Parameters ---------- diff --git a/src/ethereum/arrow_glacier/vm/memory.py b/src/ethereum/arrow_glacier/vm/memory.py index a9204bd36a..d8a904c352 100644 --- a/src/ethereum/arrow_glacier/vm/memory.py +++ b/src/ethereum/arrow_glacier/vm/memory.py @@ -59,7 +59,7 @@ def memory_read_bytes( def buffer_read(buffer: Bytes, start_position: U256, size: U256) -> Bytes: """ - Read bytes from a buffer. Padding with zeros if neccesary. + Read bytes from a buffer. Padding with zeros if necessary. Parameters ---------- diff --git a/src/ethereum/arrow_glacier/vm/precompiled_contracts/modexp.py b/src/ethereum/arrow_glacier/vm/precompiled_contracts/modexp.py index cd94397456..f88bdc8f61 100644 --- a/src/ethereum/arrow_glacier/vm/precompiled_contracts/modexp.py +++ b/src/ethereum/arrow_glacier/vm/precompiled_contracts/modexp.py @@ -22,7 +22,7 @@ def modexp(evm: Evm) -> None: """ - Calculates `(base**exp) % modulus` for arbitary 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 diff --git a/src/ethereum/berlin/bloom.py b/src/ethereum/berlin/bloom.py index f43de65194..d4e1485281 100644 --- a/src/ethereum/berlin/bloom.py +++ b/src/ethereum/berlin/bloom.py @@ -13,7 +13,7 @@ general theory of bloom filters see e.g. `Wikipedia `_. Bloom filters are used to allow for efficient searching of logs by address and/or topic, by rapidly -eliminating blocks and reciepts from their search. +eliminating blocks and receipts from their search. """ from typing import Tuple diff --git a/src/ethereum/berlin/fork.py b/src/ethereum/berlin/fork.py index d5e2d66a7c..b9b2d0dce4 100644 --- a/src/ethereum/berlin/fork.py +++ b/src/ethereum/berlin/fork.py @@ -206,7 +206,7 @@ def validate_header(header: Header, parent_header: Header) -> None: quantities in the header should match the logic for the block itself. For example the header timestamp should be greater than the block's parent timestamp because the block was created *after* the parent block. - Additionally, the block's number should be directly folowing the parent + Additionally, the block's number should be directly following the parent block's number since it is the next block in the sequence. Parameters @@ -519,7 +519,7 @@ def validate_ommers( To be considered valid, the ommers must adhere to the rules defined in the Ethereum protocol. The maximum amount of ommers is 2 per block and there cannot be duplicate ommers in a block. Many of the other ommer - contraints are listed in the in-line comments of this function. + constraints are listed in the in-line comments of this function. Parameters ---------- diff --git a/src/ethereum/berlin/vm/memory.py b/src/ethereum/berlin/vm/memory.py index a9204bd36a..d8a904c352 100644 --- a/src/ethereum/berlin/vm/memory.py +++ b/src/ethereum/berlin/vm/memory.py @@ -59,7 +59,7 @@ def memory_read_bytes( def buffer_read(buffer: Bytes, start_position: U256, size: U256) -> Bytes: """ - Read bytes from a buffer. Padding with zeros if neccesary. + Read bytes from a buffer. Padding with zeros if necessary. Parameters ---------- diff --git a/src/ethereum/berlin/vm/precompiled_contracts/modexp.py b/src/ethereum/berlin/vm/precompiled_contracts/modexp.py index cd94397456..f88bdc8f61 100644 --- a/src/ethereum/berlin/vm/precompiled_contracts/modexp.py +++ b/src/ethereum/berlin/vm/precompiled_contracts/modexp.py @@ -22,7 +22,7 @@ def modexp(evm: Evm) -> None: """ - Calculates `(base**exp) % modulus` for arbitary 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 diff --git a/src/ethereum/byzantium/bloom.py b/src/ethereum/byzantium/bloom.py index f43de65194..d4e1485281 100644 --- a/src/ethereum/byzantium/bloom.py +++ b/src/ethereum/byzantium/bloom.py @@ -13,7 +13,7 @@ general theory of bloom filters see e.g. `Wikipedia `_. Bloom filters are used to allow for efficient searching of logs by address and/or topic, by rapidly -eliminating blocks and reciepts from their search. +eliminating blocks and receipts from their search. """ from typing import Tuple diff --git a/src/ethereum/byzantium/fork.py b/src/ethereum/byzantium/fork.py index 14aeb6b70e..73aa9c2d69 100644 --- a/src/ethereum/byzantium/fork.py +++ b/src/ethereum/byzantium/fork.py @@ -200,7 +200,7 @@ def validate_header(header: Header, parent_header: Header) -> None: quantities in the header should match the logic for the block itself. For example the header timestamp should be greater than the block's parent timestamp because the block was created *after* the parent block. - Additionally, the block's number should be directly folowing the parent + Additionally, the block's number should be directly following the parent block's number since it is the next block in the sequence. Parameters @@ -507,7 +507,7 @@ def validate_ommers( To be considered valid, the ommers must adhere to the rules defined in the Ethereum protocol. The maximum amount of ommers is 2 per block and there cannot be duplicate ommers in a block. Many of the other ommer - contraints are listed in the in-line comments of this function. + constraints are listed in the in-line comments of this function. Parameters ---------- diff --git a/src/ethereum/byzantium/vm/memory.py b/src/ethereum/byzantium/vm/memory.py index a9204bd36a..d8a904c352 100644 --- a/src/ethereum/byzantium/vm/memory.py +++ b/src/ethereum/byzantium/vm/memory.py @@ -59,7 +59,7 @@ def memory_read_bytes( def buffer_read(buffer: Bytes, start_position: U256, size: U256) -> Bytes: """ - Read bytes from a buffer. Padding with zeros if neccesary. + Read bytes from a buffer. Padding with zeros if necessary. Parameters ---------- diff --git a/src/ethereum/byzantium/vm/precompiled_contracts/modexp.py b/src/ethereum/byzantium/vm/precompiled_contracts/modexp.py index 9c3d5bb8fd..4fa2afa369 100644 --- a/src/ethereum/byzantium/vm/precompiled_contracts/modexp.py +++ b/src/ethereum/byzantium/vm/precompiled_contracts/modexp.py @@ -22,7 +22,7 @@ def modexp(evm: Evm) -> None: """ - Calculates `(base**exp) % modulus` for arbitary 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 diff --git a/src/ethereum/constantinople/bloom.py b/src/ethereum/constantinople/bloom.py index f43de65194..d4e1485281 100644 --- a/src/ethereum/constantinople/bloom.py +++ b/src/ethereum/constantinople/bloom.py @@ -13,7 +13,7 @@ general theory of bloom filters see e.g. `Wikipedia `_. Bloom filters are used to allow for efficient searching of logs by address and/or topic, by rapidly -eliminating blocks and reciepts from their search. +eliminating blocks and receipts from their search. """ from typing import Tuple diff --git a/src/ethereum/constantinople/fork.py b/src/ethereum/constantinople/fork.py index 075efb5b86..9f579f1c52 100644 --- a/src/ethereum/constantinople/fork.py +++ b/src/ethereum/constantinople/fork.py @@ -200,7 +200,7 @@ def validate_header(header: Header, parent_header: Header) -> None: quantities in the header should match the logic for the block itself. For example the header timestamp should be greater than the block's parent timestamp because the block was created *after* the parent block. - Additionally, the block's number should be directly folowing the parent + Additionally, the block's number should be directly following the parent block's number since it is the next block in the sequence. Parameters @@ -507,7 +507,7 @@ def validate_ommers( To be considered valid, the ommers must adhere to the rules defined in the Ethereum protocol. The maximum amount of ommers is 2 per block and there cannot be duplicate ommers in a block. Many of the other ommer - contraints are listed in the in-line comments of this function. + constraints are listed in the in-line comments of this function. Parameters ---------- diff --git a/src/ethereum/constantinople/vm/memory.py b/src/ethereum/constantinople/vm/memory.py index a9204bd36a..d8a904c352 100644 --- a/src/ethereum/constantinople/vm/memory.py +++ b/src/ethereum/constantinople/vm/memory.py @@ -59,7 +59,7 @@ def memory_read_bytes( def buffer_read(buffer: Bytes, start_position: U256, size: U256) -> Bytes: """ - Read bytes from a buffer. Padding with zeros if neccesary. + Read bytes from a buffer. Padding with zeros if necessary. Parameters ---------- diff --git a/src/ethereum/constantinople/vm/precompiled_contracts/modexp.py b/src/ethereum/constantinople/vm/precompiled_contracts/modexp.py index 9c3d5bb8fd..4fa2afa369 100644 --- a/src/ethereum/constantinople/vm/precompiled_contracts/modexp.py +++ b/src/ethereum/constantinople/vm/precompiled_contracts/modexp.py @@ -22,7 +22,7 @@ def modexp(evm: Evm) -> None: """ - Calculates `(base**exp) % modulus` for arbitary 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 diff --git a/src/ethereum/crypto/finite_field.py b/src/ethereum/crypto/finite_field.py index 9e1bb0820a..c45f7fd49a 100644 --- a/src/ethereum/crypto/finite_field.py +++ b/src/ethereum/crypto/finite_field.py @@ -317,7 +317,7 @@ def deg(self: U) -> int: def multiplicative_inverse(self: U) -> U: """ - Calculate the multiplicative inverse. Uses the Euclidian algorithm. + Calculate the multiplicative inverse. Uses the Euclidean algorithm. """ x2: List[int] p = self.PRIME diff --git a/src/ethereum/dao_fork/bloom.py b/src/ethereum/dao_fork/bloom.py index f43de65194..d4e1485281 100644 --- a/src/ethereum/dao_fork/bloom.py +++ b/src/ethereum/dao_fork/bloom.py @@ -13,7 +13,7 @@ general theory of bloom filters see e.g. `Wikipedia `_. Bloom filters are used to allow for efficient searching of logs by address and/or topic, by rapidly -eliminating blocks and reciepts from their search. +eliminating blocks and receipts from their search. """ from typing import Tuple diff --git a/src/ethereum/dao_fork/fork.py b/src/ethereum/dao_fork/fork.py index 276c5fc1af..3fcf35d96c 100644 --- a/src/ethereum/dao_fork/fork.py +++ b/src/ethereum/dao_fork/fork.py @@ -82,7 +82,7 @@ def apply_fork(old: BlockChain) -> BlockChain: When forks need to implement an irregular state transition, this function is used to handle the irregularity. - The DAO-Fork occured as a result of the `2016 DAO Hacks + The DAO-Fork occurred as a result of the `2016 DAO Hacks `_ in which an unknown entity managed to drain more than 3.6 million ether causing the price of ether to drop by nearly 35%. This fork was the solution to the @@ -207,7 +207,7 @@ def validate_header(header: Header, parent_header: Header) -> None: quantities in the header should match the logic for the block itself. For example the header timestamp should be greater than the block's parent timestamp because the block was created *after* the parent block. - Additionally, the block's number should be directly folowing the parent + Additionally, the block's number should be directly following the parent block's number since it is the next block in the sequence. Parameters @@ -512,7 +512,7 @@ def validate_ommers( To be considered valid, the ommers must adhere to the rules defined in the Ethereum protocol. The maximum amount of ommers is 2 per block and there cannot be duplicate ommers in a block. Many of the other ommer - contraints are listed in the in-line comments of this function. + constraints are listed in the in-line comments of this function. Parameters ---------- diff --git a/src/ethereum/dao_fork/vm/memory.py b/src/ethereum/dao_fork/vm/memory.py index a9204bd36a..d8a904c352 100644 --- a/src/ethereum/dao_fork/vm/memory.py +++ b/src/ethereum/dao_fork/vm/memory.py @@ -59,7 +59,7 @@ def memory_read_bytes( def buffer_read(buffer: Bytes, start_position: U256, size: U256) -> Bytes: """ - Read bytes from a buffer. Padding with zeros if neccesary. + Read bytes from a buffer. Padding with zeros if necessary. Parameters ---------- diff --git a/src/ethereum/frontier/bloom.py b/src/ethereum/frontier/bloom.py index f43de65194..d4e1485281 100644 --- a/src/ethereum/frontier/bloom.py +++ b/src/ethereum/frontier/bloom.py @@ -13,7 +13,7 @@ general theory of bloom filters see e.g. `Wikipedia `_. Bloom filters are used to allow for efficient searching of logs by address and/or topic, by rapidly -eliminating blocks and reciepts from their search. +eliminating blocks and receipts from their search. """ from typing import Tuple diff --git a/src/ethereum/frontier/fork.py b/src/ethereum/frontier/fork.py index b96d1e721d..bc81a1376e 100644 --- a/src/ethereum/frontier/fork.py +++ b/src/ethereum/frontier/fork.py @@ -194,7 +194,7 @@ def validate_header(header: Header, parent_header: Header) -> None: quantities in the header should match the logic for the block itself. For example the header timestamp should be greater than the block's parent timestamp because the block was created *after* the parent block. - Additionally, the block's number should be directly folowing the parent + Additionally, the block's number should be directly following the parent block's number since it is the next block in the sequence. Parameters @@ -493,7 +493,7 @@ def validate_ommers( To be considered valid, the ommers must adhere to the rules defined in the Ethereum protocol. The maximum amount of ommers is 2 per block and there cannot be duplicate ommers in a block. Many of the other ommer - contraints are listed in the in-line comments of this function. + constraints are listed in the in-line comments of this function. Parameters ---------- diff --git a/src/ethereum/frontier/vm/memory.py b/src/ethereum/frontier/vm/memory.py index a9204bd36a..d8a904c352 100644 --- a/src/ethereum/frontier/vm/memory.py +++ b/src/ethereum/frontier/vm/memory.py @@ -59,7 +59,7 @@ def memory_read_bytes( def buffer_read(buffer: Bytes, start_position: U256, size: U256) -> Bytes: """ - Read bytes from a buffer. Padding with zeros if neccesary. + Read bytes from a buffer. Padding with zeros if necessary. Parameters ---------- diff --git a/src/ethereum/gray_glacier/bloom.py b/src/ethereum/gray_glacier/bloom.py index f43de65194..d4e1485281 100644 --- a/src/ethereum/gray_glacier/bloom.py +++ b/src/ethereum/gray_glacier/bloom.py @@ -13,7 +13,7 @@ general theory of bloom filters see e.g. `Wikipedia `_. Bloom filters are used to allow for efficient searching of logs by address and/or topic, by rapidly -eliminating blocks and reciepts from their search. +eliminating blocks and receipts from their search. """ from typing import Tuple diff --git a/src/ethereum/gray_glacier/fork.py b/src/ethereum/gray_glacier/fork.py index effe505275..8d676c0541 100644 --- a/src/ethereum/gray_glacier/fork.py +++ b/src/ethereum/gray_glacier/fork.py @@ -275,7 +275,7 @@ def validate_header(header: Header, parent_header: Header) -> None: quantities in the header should match the logic for the block itself. For example the header timestamp should be greater than the block's parent timestamp because the block was created *after* the parent block. - Additionally, the block's number should be directly folowing the parent + Additionally, the block's number should be directly following the parent block's number since it is the next block in the sequence. Parameters @@ -622,7 +622,7 @@ def validate_ommers( To be considered valid, the ommers must adhere to the rules defined in the Ethereum protocol. The maximum amount of ommers is 2 per block and there cannot be duplicate ommers in a block. Many of the other ommer - contraints are listed in the in-line comments of this function. + constraints are listed in the in-line comments of this function. Parameters ---------- diff --git a/src/ethereum/gray_glacier/vm/memory.py b/src/ethereum/gray_glacier/vm/memory.py index a9204bd36a..d8a904c352 100644 --- a/src/ethereum/gray_glacier/vm/memory.py +++ b/src/ethereum/gray_glacier/vm/memory.py @@ -59,7 +59,7 @@ def memory_read_bytes( def buffer_read(buffer: Bytes, start_position: U256, size: U256) -> Bytes: """ - Read bytes from a buffer. Padding with zeros if neccesary. + Read bytes from a buffer. Padding with zeros if necessary. Parameters ---------- diff --git a/src/ethereum/gray_glacier/vm/precompiled_contracts/modexp.py b/src/ethereum/gray_glacier/vm/precompiled_contracts/modexp.py index cd94397456..f88bdc8f61 100644 --- a/src/ethereum/gray_glacier/vm/precompiled_contracts/modexp.py +++ b/src/ethereum/gray_glacier/vm/precompiled_contracts/modexp.py @@ -22,7 +22,7 @@ def modexp(evm: Evm) -> None: """ - Calculates `(base**exp) % modulus` for arbitary 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 diff --git a/src/ethereum/homestead/bloom.py b/src/ethereum/homestead/bloom.py index f43de65194..d4e1485281 100644 --- a/src/ethereum/homestead/bloom.py +++ b/src/ethereum/homestead/bloom.py @@ -13,7 +13,7 @@ general theory of bloom filters see e.g. `Wikipedia `_. Bloom filters are used to allow for efficient searching of logs by address and/or topic, by rapidly -eliminating blocks and reciepts from their search. +eliminating blocks and receipts from their search. """ from typing import Tuple diff --git a/src/ethereum/homestead/fork.py b/src/ethereum/homestead/fork.py index cf40c688d4..8196d9f999 100644 --- a/src/ethereum/homestead/fork.py +++ b/src/ethereum/homestead/fork.py @@ -196,7 +196,7 @@ def validate_header(header: Header, parent_header: Header) -> None: quantities in the header should match the logic for the block itself. For example the header timestamp should be greater than the block's parent timestamp because the block was created *after* the parent block. - Additionally, the block's number should be directly folowing the parent + Additionally, the block's number should be directly following the parent block's number since it is the next block in the sequence. Parameters @@ -495,7 +495,7 @@ def validate_ommers( To be considered valid, the ommers must adhere to the rules defined in the Ethereum protocol. The maximum amount of ommers is 2 per block and there cannot be duplicate ommers in a block. Many of the other ommer - contraints are listed in the in-line comments of this function. + constraints are listed in the in-line comments of this function. Parameters ---------- diff --git a/src/ethereum/homestead/vm/memory.py b/src/ethereum/homestead/vm/memory.py index a9204bd36a..d8a904c352 100644 --- a/src/ethereum/homestead/vm/memory.py +++ b/src/ethereum/homestead/vm/memory.py @@ -59,7 +59,7 @@ def memory_read_bytes( def buffer_read(buffer: Bytes, start_position: U256, size: U256) -> Bytes: """ - Read bytes from a buffer. Padding with zeros if neccesary. + Read bytes from a buffer. Padding with zeros if necessary. Parameters ---------- diff --git a/src/ethereum/istanbul/bloom.py b/src/ethereum/istanbul/bloom.py index f43de65194..d4e1485281 100644 --- a/src/ethereum/istanbul/bloom.py +++ b/src/ethereum/istanbul/bloom.py @@ -13,7 +13,7 @@ general theory of bloom filters see e.g. `Wikipedia `_. Bloom filters are used to allow for efficient searching of logs by address and/or topic, by rapidly -eliminating blocks and reciepts from their search. +eliminating blocks and receipts from their search. """ from typing import Tuple diff --git a/src/ethereum/istanbul/fork.py b/src/ethereum/istanbul/fork.py index b73f42b7b5..5bb4f457dd 100644 --- a/src/ethereum/istanbul/fork.py +++ b/src/ethereum/istanbul/fork.py @@ -200,7 +200,7 @@ def validate_header(header: Header, parent_header: Header) -> None: quantities in the header should match the logic for the block itself. For example the header timestamp should be greater than the block's parent timestamp because the block was created *after* the parent block. - Additionally, the block's number should be directly folowing the parent + Additionally, the block's number should be directly following the parent block's number since it is the next block in the sequence. Parameters @@ -508,7 +508,7 @@ def validate_ommers( To be considered valid, the ommers must adhere to the rules defined in the Ethereum protocol. The maximum amount of ommers is 2 per block and there cannot be duplicate ommers in a block. Many of the other ommer - contraints are listed in the in-line comments of this function. + constraints are listed in the in-line comments of this function. Parameters ---------- diff --git a/src/ethereum/istanbul/vm/memory.py b/src/ethereum/istanbul/vm/memory.py index a9204bd36a..d8a904c352 100644 --- a/src/ethereum/istanbul/vm/memory.py +++ b/src/ethereum/istanbul/vm/memory.py @@ -59,7 +59,7 @@ def memory_read_bytes( def buffer_read(buffer: Bytes, start_position: U256, size: U256) -> Bytes: """ - Read bytes from a buffer. Padding with zeros if neccesary. + Read bytes from a buffer. Padding with zeros if necessary. Parameters ---------- diff --git a/src/ethereum/istanbul/vm/precompiled_contracts/modexp.py b/src/ethereum/istanbul/vm/precompiled_contracts/modexp.py index 9c3d5bb8fd..4fa2afa369 100644 --- a/src/ethereum/istanbul/vm/precompiled_contracts/modexp.py +++ b/src/ethereum/istanbul/vm/precompiled_contracts/modexp.py @@ -22,7 +22,7 @@ def modexp(evm: Evm) -> None: """ - Calculates `(base**exp) % modulus` for arbitary 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 diff --git a/src/ethereum/london/bloom.py b/src/ethereum/london/bloom.py index f43de65194..d4e1485281 100644 --- a/src/ethereum/london/bloom.py +++ b/src/ethereum/london/bloom.py @@ -13,7 +13,7 @@ general theory of bloom filters see e.g. `Wikipedia `_. Bloom filters are used to allow for efficient searching of logs by address and/or topic, by rapidly -eliminating blocks and reciepts from their search. +eliminating blocks and receipts from their search. """ from typing import Tuple diff --git a/src/ethereum/london/fork.py b/src/ethereum/london/fork.py index e87e47205b..85345350a1 100644 --- a/src/ethereum/london/fork.py +++ b/src/ethereum/london/fork.py @@ -281,7 +281,7 @@ def validate_header(header: Header, parent_header: Header) -> None: quantities in the header should match the logic for the block itself. For example the header timestamp should be greater than the block's parent timestamp because the block was created *after* the parent block. - Additionally, the block's number should be directly folowing the parent + Additionally, the block's number should be directly following the parent block's number since it is the next block in the sequence. Parameters @@ -630,7 +630,7 @@ def validate_ommers( To be considered valid, the ommers must adhere to the rules defined in the Ethereum protocol. The maximum amount of ommers is 2 per block and there cannot be duplicate ommers in a block. Many of the other ommer - contraints are listed in the in-line comments of this function. + constraints are listed in the in-line comments of this function. Parameters ---------- diff --git a/src/ethereum/london/vm/memory.py b/src/ethereum/london/vm/memory.py index a9204bd36a..d8a904c352 100644 --- a/src/ethereum/london/vm/memory.py +++ b/src/ethereum/london/vm/memory.py @@ -59,7 +59,7 @@ def memory_read_bytes( def buffer_read(buffer: Bytes, start_position: U256, size: U256) -> Bytes: """ - Read bytes from a buffer. Padding with zeros if neccesary. + Read bytes from a buffer. Padding with zeros if necessary. Parameters ---------- diff --git a/src/ethereum/london/vm/precompiled_contracts/modexp.py b/src/ethereum/london/vm/precompiled_contracts/modexp.py index cd94397456..f88bdc8f61 100644 --- a/src/ethereum/london/vm/precompiled_contracts/modexp.py +++ b/src/ethereum/london/vm/precompiled_contracts/modexp.py @@ -22,7 +22,7 @@ def modexp(evm: Evm) -> None: """ - Calculates `(base**exp) % modulus` for arbitary 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 diff --git a/src/ethereum/muir_glacier/bloom.py b/src/ethereum/muir_glacier/bloom.py index f43de65194..d4e1485281 100644 --- a/src/ethereum/muir_glacier/bloom.py +++ b/src/ethereum/muir_glacier/bloom.py @@ -13,7 +13,7 @@ general theory of bloom filters see e.g. `Wikipedia `_. Bloom filters are used to allow for efficient searching of logs by address and/or topic, by rapidly -eliminating blocks and reciepts from their search. +eliminating blocks and receipts from their search. """ from typing import Tuple diff --git a/src/ethereum/muir_glacier/fork.py b/src/ethereum/muir_glacier/fork.py index 0b4c07cf4a..75b83cc204 100644 --- a/src/ethereum/muir_glacier/fork.py +++ b/src/ethereum/muir_glacier/fork.py @@ -200,7 +200,7 @@ def validate_header(header: Header, parent_header: Header) -> None: quantities in the header should match the logic for the block itself. For example the header timestamp should be greater than the block's parent timestamp because the block was created *after* the parent block. - Additionally, the block's number should be directly folowing the parent + Additionally, the block's number should be directly following the parent block's number since it is the next block in the sequence. Parameters @@ -508,7 +508,7 @@ def validate_ommers( To be considered valid, the ommers must adhere to the rules defined in the Ethereum protocol. The maximum amount of ommers is 2 per block and there cannot be duplicate ommers in a block. Many of the other ommer - contraints are listed in the in-line comments of this function. + constraints are listed in the in-line comments of this function. Parameters ---------- diff --git a/src/ethereum/muir_glacier/vm/memory.py b/src/ethereum/muir_glacier/vm/memory.py index a9204bd36a..d8a904c352 100644 --- a/src/ethereum/muir_glacier/vm/memory.py +++ b/src/ethereum/muir_glacier/vm/memory.py @@ -59,7 +59,7 @@ def memory_read_bytes( def buffer_read(buffer: Bytes, start_position: U256, size: U256) -> Bytes: """ - Read bytes from a buffer. Padding with zeros if neccesary. + Read bytes from a buffer. Padding with zeros if necessary. Parameters ---------- diff --git a/src/ethereum/muir_glacier/vm/precompiled_contracts/modexp.py b/src/ethereum/muir_glacier/vm/precompiled_contracts/modexp.py index 9c3d5bb8fd..4fa2afa369 100644 --- a/src/ethereum/muir_glacier/vm/precompiled_contracts/modexp.py +++ b/src/ethereum/muir_glacier/vm/precompiled_contracts/modexp.py @@ -22,7 +22,7 @@ def modexp(evm: Evm) -> None: """ - Calculates `(base**exp) % modulus` for arbitary 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 diff --git a/src/ethereum/paris/bloom.py b/src/ethereum/paris/bloom.py index f43de65194..d4e1485281 100644 --- a/src/ethereum/paris/bloom.py +++ b/src/ethereum/paris/bloom.py @@ -13,7 +13,7 @@ general theory of bloom filters see e.g. `Wikipedia `_. Bloom filters are used to allow for efficient searching of logs by address and/or topic, by rapidly -eliminating blocks and reciepts from their search. +eliminating blocks and receipts from their search. """ from typing import Tuple diff --git a/src/ethereum/paris/fork.py b/src/ethereum/paris/fork.py index 87da3a1177..1727aa4e74 100644 --- a/src/ethereum/paris/fork.py +++ b/src/ethereum/paris/fork.py @@ -268,7 +268,7 @@ def validate_header(header: Header, parent_header: Header) -> None: quantities in the header should match the logic for the block itself. For example the header timestamp should be greater than the block's parent timestamp because the block was created *after* the parent block. - Additionally, the block's number should be directly folowing the parent + Additionally, the block's number should be directly following the parent block's number since it is the next block in the sequence. Parameters diff --git a/src/ethereum/paris/vm/memory.py b/src/ethereum/paris/vm/memory.py index a9204bd36a..d8a904c352 100644 --- a/src/ethereum/paris/vm/memory.py +++ b/src/ethereum/paris/vm/memory.py @@ -59,7 +59,7 @@ def memory_read_bytes( def buffer_read(buffer: Bytes, start_position: U256, size: U256) -> Bytes: """ - Read bytes from a buffer. Padding with zeros if neccesary. + Read bytes from a buffer. Padding with zeros if necessary. Parameters ---------- diff --git a/src/ethereum/paris/vm/precompiled_contracts/modexp.py b/src/ethereum/paris/vm/precompiled_contracts/modexp.py index cd94397456..f88bdc8f61 100644 --- a/src/ethereum/paris/vm/precompiled_contracts/modexp.py +++ b/src/ethereum/paris/vm/precompiled_contracts/modexp.py @@ -22,7 +22,7 @@ def modexp(evm: Evm) -> None: """ - Calculates `(base**exp) % modulus` for arbitary 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 diff --git a/src/ethereum/shanghai/bloom.py b/src/ethereum/shanghai/bloom.py index f43de65194..d4e1485281 100644 --- a/src/ethereum/shanghai/bloom.py +++ b/src/ethereum/shanghai/bloom.py @@ -13,7 +13,7 @@ general theory of bloom filters see e.g. `Wikipedia `_. Bloom filters are used to allow for efficient searching of logs by address and/or topic, by rapidly -eliminating blocks and reciepts from their search. +eliminating blocks and receipts from their search. """ from typing import Tuple diff --git a/src/ethereum/shanghai/fork.py b/src/ethereum/shanghai/fork.py index 68fd279cad..7d1fbffcfd 100644 --- a/src/ethereum/shanghai/fork.py +++ b/src/ethereum/shanghai/fork.py @@ -274,7 +274,7 @@ def validate_header(header: Header, parent_header: Header) -> None: quantities in the header should match the logic for the block itself. For example the header timestamp should be greater than the block's parent timestamp because the block was created *after* the parent block. - Additionally, the block's number should be directly folowing the parent + Additionally, the block's number should be directly following the parent block's number since it is the next block in the sequence. Parameters diff --git a/src/ethereum/shanghai/vm/memory.py b/src/ethereum/shanghai/vm/memory.py index a9204bd36a..d8a904c352 100644 --- a/src/ethereum/shanghai/vm/memory.py +++ b/src/ethereum/shanghai/vm/memory.py @@ -59,7 +59,7 @@ def memory_read_bytes( def buffer_read(buffer: Bytes, start_position: U256, size: U256) -> Bytes: """ - Read bytes from a buffer. Padding with zeros if neccesary. + Read bytes from a buffer. Padding with zeros if necessary. Parameters ---------- diff --git a/src/ethereum/shanghai/vm/precompiled_contracts/modexp.py b/src/ethereum/shanghai/vm/precompiled_contracts/modexp.py index cd94397456..f88bdc8f61 100644 --- a/src/ethereum/shanghai/vm/precompiled_contracts/modexp.py +++ b/src/ethereum/shanghai/vm/precompiled_contracts/modexp.py @@ -22,7 +22,7 @@ def modexp(evm: Evm) -> None: """ - Calculates `(base**exp) % modulus` for arbitary 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 diff --git a/src/ethereum/spurious_dragon/bloom.py b/src/ethereum/spurious_dragon/bloom.py index f43de65194..d4e1485281 100644 --- a/src/ethereum/spurious_dragon/bloom.py +++ b/src/ethereum/spurious_dragon/bloom.py @@ -13,7 +13,7 @@ general theory of bloom filters see e.g. `Wikipedia `_. Bloom filters are used to allow for efficient searching of logs by address and/or topic, by rapidly -eliminating blocks and reciepts from their search. +eliminating blocks and receipts from their search. """ from typing import Tuple diff --git a/src/ethereum/spurious_dragon/fork.py b/src/ethereum/spurious_dragon/fork.py index 85a19b121e..b79ab13ada 100644 --- a/src/ethereum/spurious_dragon/fork.py +++ b/src/ethereum/spurious_dragon/fork.py @@ -198,7 +198,7 @@ def validate_header(header: Header, parent_header: Header) -> None: quantities in the header should match the logic for the block itself. For example the header timestamp should be greater than the block's parent timestamp because the block was created *after* the parent block. - Additionally, the block's number should be directly folowing the parent + Additionally, the block's number should be directly following the parent block's number since it is the next block in the sequence. Parameters @@ -503,7 +503,7 @@ def validate_ommers( To be considered valid, the ommers must adhere to the rules defined in the Ethereum protocol. The maximum amount of ommers is 2 per block and there cannot be duplicate ommers in a block. Many of the other ommer - contraints are listed in the in-line comments of this function. + constraints are listed in the in-line comments of this function. Parameters ---------- diff --git a/src/ethereum/spurious_dragon/vm/memory.py b/src/ethereum/spurious_dragon/vm/memory.py index a9204bd36a..d8a904c352 100644 --- a/src/ethereum/spurious_dragon/vm/memory.py +++ b/src/ethereum/spurious_dragon/vm/memory.py @@ -59,7 +59,7 @@ def memory_read_bytes( def buffer_read(buffer: Bytes, start_position: U256, size: U256) -> Bytes: """ - Read bytes from a buffer. Padding with zeros if neccesary. + Read bytes from a buffer. Padding with zeros if necessary. Parameters ---------- diff --git a/src/ethereum/tangerine_whistle/bloom.py b/src/ethereum/tangerine_whistle/bloom.py index f43de65194..d4e1485281 100644 --- a/src/ethereum/tangerine_whistle/bloom.py +++ b/src/ethereum/tangerine_whistle/bloom.py @@ -13,7 +13,7 @@ general theory of bloom filters see e.g. `Wikipedia `_. Bloom filters are used to allow for efficient searching of logs by address and/or topic, by rapidly -eliminating blocks and reciepts from their search. +eliminating blocks and receipts from their search. """ from typing import Tuple diff --git a/src/ethereum/tangerine_whistle/fork.py b/src/ethereum/tangerine_whistle/fork.py index cf40c688d4..8196d9f999 100644 --- a/src/ethereum/tangerine_whistle/fork.py +++ b/src/ethereum/tangerine_whistle/fork.py @@ -196,7 +196,7 @@ def validate_header(header: Header, parent_header: Header) -> None: quantities in the header should match the logic for the block itself. For example the header timestamp should be greater than the block's parent timestamp because the block was created *after* the parent block. - Additionally, the block's number should be directly folowing the parent + Additionally, the block's number should be directly following the parent block's number since it is the next block in the sequence. Parameters @@ -495,7 +495,7 @@ def validate_ommers( To be considered valid, the ommers must adhere to the rules defined in the Ethereum protocol. The maximum amount of ommers is 2 per block and there cannot be duplicate ommers in a block. Many of the other ommer - contraints are listed in the in-line comments of this function. + constraints are listed in the in-line comments of this function. Parameters ---------- diff --git a/src/ethereum/tangerine_whistle/vm/memory.py b/src/ethereum/tangerine_whistle/vm/memory.py index a9204bd36a..d8a904c352 100644 --- a/src/ethereum/tangerine_whistle/vm/memory.py +++ b/src/ethereum/tangerine_whistle/vm/memory.py @@ -59,7 +59,7 @@ def memory_read_bytes( def buffer_read(buffer: Bytes, start_position: U256, size: U256) -> Bytes: """ - Read bytes from a buffer. Padding with zeros if neccesary. + Read bytes from a buffer. Padding with zeros if necessary. Parameters ---------- diff --git a/src/ethereum_spec_tools/new_fork.py b/src/ethereum_spec_tools/new_fork.py index 3fb1d918d2..dc8c896246 100644 --- a/src/ethereum_spec_tools/new_fork.py +++ b/src/ethereum_spec_tools/new_fork.py @@ -52,7 +52,7 @@ def find_replace(dir: str, find: str, replace: str, file_pattern: str) -> None: """ - Replace the occurrance of a certain text in files with a new text + Replace the occurrence of a certain text in files with a new text """ for path, _, files in os.walk(dir): for filename in fnmatch.filter(files, file_pattern): diff --git a/tests/helpers/load_state_tests.py b/tests/helpers/load_state_tests.py index eca2da7f22..f53cfef229 100644 --- a/tests/helpers/load_state_tests.py +++ b/tests/helpers/load_state_tests.py @@ -166,7 +166,7 @@ def fetch_state_test_files( for test_path in only_in: files_to_iterate.append(os.path.join(test_dir, test_path)) else: - # If there isnt a custom list, iterate over the test_dir + # If there isn't a custom list, iterate over the test_dir all_jsons = [ y for x in os.walk(test_dir) @@ -183,7 +183,7 @@ def fetch_state_test_files( for _test_file in files_to_iterate: try: for _test_case in load_json_fixture(_test_file, network): - # _identifier could identifiy files, folders through test_file + # _identifier could identify files, folders through test_file # individual cases through test_key _identifier = ( "(" diff --git a/tests/test_ethash_general.py b/tests/test_ethash_general.py index 3120f76d4b..7732183013 100644 --- a/tests/test_ethash_general.py +++ b/tests/test_ethash_general.py @@ -303,6 +303,6 @@ def test_dataset_generation_random_epoch(tmpdir: str) -> None: dataset_item = generate_dataset_item(cache, index) assert dataset_item == dag_dataset[index], index - # Manually forcing the dataset out of the memory incase the gc + # Manually forcing the dataset out of the memory in case the gc # doesn't kick in immediately del dag_dataset From 029c9683c44977012e60c1fb8df4ae26822d857d Mon Sep 17 00:00:00 2001 From: Peter Davies Date: Thu, 22 Feb 2024 14:42:34 -0500 Subject: [PATCH 5/6] Don't swallow exceptions in T8N --- src/ethereum_spec_tools/evm_tools/t8n/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ethereum_spec_tools/evm_tools/t8n/__init__.py b/src/ethereum_spec_tools/evm_tools/t8n/__init__.py index 3700804fd1..3e69cd7336 100644 --- a/src/ethereum_spec_tools/evm_tools/t8n/__init__.py +++ b/src/ethereum_spec_tools/evm_tools/t8n/__init__.py @@ -12,6 +12,7 @@ from ethereum import rlp, trace from ethereum.base_types import U64, U256, Uint from ethereum.crypto.hash import keccak256 +from ethereum.exceptions import InvalidBlock from ethereum_spec_tools.forks import Hardfork from ..fixture_loader import Load @@ -330,7 +331,7 @@ def apply_body(self) -> None: env = self.environment(tx, gas_available) process_transaction_return = self.process_transaction(env, tx) - except Exception as e: + except InvalidBlock as e: # The tf tools expects some non-blank error message # even in case e is blank. self.txs.rejected_txs[tx_idx] = f"Failed transaction: {str(e)}" From 0f9e4345b60d36c23fffaa69f70cf9cdb975f4ba Mon Sep 17 00:00:00 2001 From: Sam Wilson Date: Mon, 26 Feb 2024 14:57:23 -0500 Subject: [PATCH 6/6] Bump min python req --- CONTRIBUTING.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 58da4f4279..8490e96233 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -31,8 +31,8 @@ This specification aims to be: Running the tests necessary to merge into the repository requires: - * Python 3.9.x, and - * [PyPy 7.3.x](https://www.pypy.org/). + * Python 3.10.x, and + * [PyPy 7.3.12](https://www.pypy.org/) or later. * `geth` installed and present in `$PATH`