From 19fb8f5616c78609b7965febd944c5603dc22954 Mon Sep 17 00:00:00 2001 From: ilitteri Date: Fri, 21 Aug 2026 18:14:43 -0300 Subject: [PATCH] Map ethrex's frame-transaction rejection reasons The mapper had no TYPE_6_* entries, so every frame-transaction rejection reached the consume-engine simulator as "Undefined exception message" even when the block was correctly rejected. 51 of the 62 failures in the frames hive suite were this. Adds the three frame-transaction exceptions plus the two fee-overflow cases. TYPE_6_INVALID_FRAME_FORMAT carries three alternatives because ethrex reaches that conclusion three ways: the static-validation reason, signature-entry structure checked inside signature validation, and a frame or signature field too wide for its type rejected while decoding. Depends on lambdaclass/ethrex#7197, which makes ethrex report these reasons distinctly instead of returning the approval error for all of them. --- .../client_clis/clis/ethrex.py | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/packages/testing/src/execution_testing/client_clis/clis/ethrex.py b/packages/testing/src/execution_testing/client_clis/clis/ethrex.py index 707ebdacbe3..1c444497e1d 100644 --- a/packages/testing/src/execution_testing/client_clis/clis/ethrex.py +++ b/packages/testing/src/execution_testing/client_clis/clis/ethrex.py @@ -59,6 +59,22 @@ class EthrexExceptionMapper(ExceptionMapper): BlockException.INVALID_BASEFEE_PER_GAS: ( "Base fee per gas is incorrect" ), + TransactionException.TYPE_6_INVALID_SIGNATURE: ( + "Invalid frame transaction: signature validation failed" + ), + TransactionException.TYPE_6_INVALID_FRAME_EXECUTION: ( + "Invalid frame transaction: VERIFY frame did not call APPROVE " + "or payer not approved" + ), + # EIP-8141 permits fee fields up to 2**256, so a fixture testing + # overflow encodes more than 256 bits and ethrex rejects it while + # decoding the field rather than while validating the transaction. + TransactionException.GASPRICE_OVERFLOW: ( + "Error decoding field 'max_fee_per_gas'" + ), + TransactionException.PRIORITY_OVERFLOW: ( + "Error decoding field 'max_priority_fee_per_gas'" + ), } mapping_regex = { TransactionException.INVALID_SIGNATURE_VRS: ( @@ -197,4 +213,15 @@ class EthrexExceptionMapper(ExceptionMapper): r"Failed to RLP decode BAL|" r"Block access list accounts not in strictly ascending order.*" ), + # `validate_static_constraints` names the EIP-8141 rule it failed, so + # the reason follows the prefix. Two other shapes reach the same + # conclusion: ethrex checks signature-entry structure inside signature + # validation rather than static validation, and a frame or signature + # field too wide for its type is rejected while decoding. + TransactionException.TYPE_6_INVALID_FRAME_FORMAT: ( + r"Invalid frame transaction format: .*|" + r"Invalid frame transaction: signature validation failed|" + r"Error decoding field 'frames' of type .*|" + r"Error decoding field 'signatures' of type .*" + ), }