Skip to content

Commit 7dd3144

Browse files
gurukamathmarioevz
authored andcommitted
fix(tests): change INVALID_DEPOSIT_EVENT_LAYOUT to BlockException (ethereum#1773)
* change INVALID_DEPOSIT_EVENT_LAYOUT to BlockException * Update docs/CHANGELOG.md --------- Co-authored-by: Mario Vega <marioevz@gmail.com>
1 parent 162778a commit 7dd3144

File tree

11 files changed

+23
-23
lines changed

11 files changed

+23
-23
lines changed

docs/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ Users can select any of the artifacts depending on their testing needs for their
3737
- 🐞 `fill` no longer writes generated fixtures into an existing, non-empty output directory; it must now be empty or `--clean` must be used to delete it first ([#1608](https://github.com/ethereum/execution-spec-tests/pull/1608)).
3838
- 🐞 zkEVM marked tests have been removed from `tests-deployed` tox environment into its own separate workflow `tests-deployed-zkevm` and are filled by `evmone-t8n` ([#1617](https://github.com/ethereum/execution-spec-tests/pull/1617)).
3939
- ✨ Field `postStateHash` is now added to all `blockchain_test` and `blockchain_test_engine` tests that use `exclude_full_post_state_in_output` in place of `postState`. Fixes `evmone-blockchaintest` test consumption and indirectly fixes coverage runs for these tests ([#1667](https://github.com/ethereum/execution-spec-tests/pull/1667)).
40+
- 🔀 Changed INVALID_DEPOSIT_EVENT_LAYOUT to a BlockException instead of a TransactionException ([#1773](https://github.com/ethereum/execution-spec-tests/pull/1773)).
4041

4142
#### `consume`
4243

src/ethereum_clis/clis/besu.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,11 @@ class BesuExceptionMapper(ExceptionMapper):
317317
BlockException.SYSTEM_CONTRACT_EMPTY: (
318318
r"(Invalid system call, no code at address)|" r"(Invalid system call address:)"
319319
),
320+
BlockException.INVALID_DEPOSIT_EVENT_LAYOUT: (
321+
r"Invalid (amount|index|pubKey|signature|withdrawalCred) (offset|size): "
322+
r"expected (\d+), but got (-?\d+)|"
323+
r"Invalid deposit log length\. Must be \d+ bytes, but is \d+ bytes"
324+
),
320325
TransactionException.INITCODE_SIZE_EXCEEDED: (
321326
r"transaction invalid Initcode size of \d+ exceeds maximum size of \d+"
322327
),
@@ -337,11 +342,6 @@ class BesuExceptionMapper(ExceptionMapper):
337342
TransactionException.NONCE_MISMATCH_TOO_LOW: (
338343
r"transaction invalid transaction nonce \d+ below sender account nonce \d+"
339344
),
340-
TransactionException.INVALID_DEPOSIT_EVENT_LAYOUT: (
341-
r"Invalid (amount|index|pubKey|signature|withdrawalCred) (offset|size): "
342-
r"expected (\d+), but got (-?\d+)|"
343-
r"Invalid deposit log length\. Must be \d+ bytes, but is \d+ bytes"
344-
),
345345
TransactionException.GAS_LIMIT_EXCEEDS_MAXIMUM: (
346346
r"transaction invalid Transaction gas limit must be at most \d+"
347347
),

src/ethereum_clis/clis/erigon.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class ErigonExceptionMapper(ExceptionMapper):
3535
),
3636
TransactionException.TYPE_4_TX_CONTRACT_CREATION: "wrong size for To: 0",
3737
TransactionException.TYPE_4_TX_PRE_FORK: "setCode tx is not supported by signer",
38-
TransactionException.INVALID_DEPOSIT_EVENT_LAYOUT: "could not parse requests logs",
38+
BlockException.INVALID_DEPOSIT_EVENT_LAYOUT: "could not parse requests logs",
3939
BlockException.SYSTEM_CONTRACT_EMPTY: "Syscall failure: Empty Code at",
4040
BlockException.SYSTEM_CONTRACT_CALL_FAILED: "Unprecedented Syscall failure",
4141
BlockException.INVALID_REQUESTS: "invalid requests root hash in header",

src/ethereum_clis/clis/ethereumjs.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,12 @@ class EthereumJSExceptionMapper(ExceptionMapper):
9090
"sender doesn't have enough funds to send tx"
9191
),
9292
TransactionException.NONCE_MISMATCH_TOO_LOW: "the tx doesn't have the correct nonce",
93-
TransactionException.INVALID_DEPOSIT_EVENT_LAYOUT: (
94-
"Error verifying block while running: error: number exceeds 53 bits"
95-
),
9693
TransactionException.GAS_ALLOWANCE_EXCEEDED: "tx has a higher gas limit than the block",
9794
BlockException.INCORRECT_EXCESS_BLOB_GAS: "Invalid 4844 transactions",
9895
BlockException.INVALID_RECEIPTS_ROOT: "invalid receipttrie",
96+
BlockException.INVALID_DEPOSIT_EVENT_LAYOUT: (
97+
"Error verifying block while running: error: number exceeds 53 bits"
98+
),
9999
# TODO EVMONE needs to differentiate when the section is missing in the header or body
100100
EOFException.MISSING_STOP_OPCODE: "err: no_terminating_instruction",
101101
EOFException.MISSING_CODE_HEADER: "err: code_section_missing",

src/ethereum_clis/clis/ethrex.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class EthrexExceptionMapper(ExceptionMapper):
1010
TransactionException.TYPE_3_TX_MAX_BLOB_GAS_ALLOWANCE_EXCEEDED: (
1111
"Exceeded MAX_BLOB_GAS_PER_BLOCK"
1212
),
13-
TransactionException.INVALID_DEPOSIT_EVENT_LAYOUT: ("Invalid deposit request layout"),
13+
BlockException.INVALID_DEPOSIT_EVENT_LAYOUT: ("Invalid deposit request layout"),
1414
BlockException.INVALID_REQUESTS: (
1515
"Requests hash does not match the one in the header after executing"
1616
),

src/ethereum_clis/clis/execution_specs.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ class ExecutionSpecsExceptionMapper(ExceptionMapper):
163163
TransactionException.GAS_ALLOWANCE_EXCEEDED: "ion: ",
164164
BlockException.SYSTEM_CONTRACT_EMPTY: "System contract address",
165165
BlockException.SYSTEM_CONTRACT_CALL_FAILED: "call failed:",
166+
BlockException.INVALID_DEPOSIT_EVENT_LAYOUT: "deposit",
166167
# TODO EVMONE needs to differentiate when the section is missing in the header or body
167168
EOFException.MISSING_STOP_OPCODE: "err: no_terminating_instruction",
168169
EOFException.MISSING_CODE_HEADER: "err: code_section_missing",

src/ethereum_clis/clis/geth.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ class GethExceptionMapper(ExceptionMapper):
7373
TransactionException.TYPE_4_TX_PRE_FORK: ("transaction type not supported"),
7474
TransactionException.INITCODE_SIZE_EXCEEDED: "max initcode size exceeded",
7575
TransactionException.NONCE_MISMATCH_TOO_LOW: "nonce too low",
76-
TransactionException.INVALID_DEPOSIT_EVENT_LAYOUT: "unable to parse deposit data",
76+
BlockException.INVALID_DEPOSIT_EVENT_LAYOUT: "unable to parse deposit data",
7777
BlockException.INCORRECT_BLOB_GAS_USED: "blob gas used mismatch",
7878
BlockException.INCORRECT_EXCESS_BLOB_GAS: "invalid excessBlobGas",
7979
BlockException.INVALID_VERSIONED_HASHES: "invalid number of versionedHashes",

src/ethereum_clis/clis/nethermind.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ class NethermindExceptionMapper(ExceptionMapper):
360360
BlockException.INVALID_GAS_USED_ABOVE_LIMIT: (
361361
"ExceededGasLimit: Gas used exceeds gas limit."
362362
),
363-
TransactionException.INVALID_DEPOSIT_EVENT_LAYOUT: (
363+
BlockException.INVALID_DEPOSIT_EVENT_LAYOUT: (
364364
"DepositsInvalid: Invalid deposit event layout:"
365365
),
366366
}

src/ethereum_clis/clis/reth.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class RethExceptionMapper(ExceptionMapper):
2929
TransactionException.TYPE_4_TX_PRE_FORK: (
3030
"eip 7702 transactions present in pre-prague payload"
3131
),
32-
TransactionException.INVALID_DEPOSIT_EVENT_LAYOUT: (
32+
BlockException.INVALID_DEPOSIT_EVENT_LAYOUT: (
3333
"failed to decode deposit requests from receipts"
3434
),
3535
BlockException.INVALID_REQUESTS: "mismatched block requests hash",

src/ethereum_test_exceptions/exceptions.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -395,11 +395,6 @@ class TransactionException(ExceptionBase):
395395
"""
396396
Transaction type 4 included before activation fork.
397397
"""
398-
INVALID_DEPOSIT_EVENT_LAYOUT = auto()
399-
"""
400-
Transaction emits a `DepositEvent` in the deposit contract (EIP-6110), but the layout
401-
of the event does not match the required layout.
402-
"""
403398

404399

405400
@unique
@@ -604,6 +599,11 @@ class BlockException(ExceptionBase):
604599
"""
605600
Block header's hash does not match the actually computed hash of the block.
606601
"""
602+
INVALID_DEPOSIT_EVENT_LAYOUT = auto()
603+
"""
604+
Transaction emits a `DepositEvent` in the deposit contract (EIP-6110), but the layout
605+
of the event does not match the required layout.
606+
"""
607607

608608

609609
@unique

0 commit comments

Comments
 (0)