File tree 12 files changed +31
-6
lines changed
tests/prague/eip7623_increase_calldata_cost
12 files changed +31
-6
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ A new fork `EOFv1` has additionally been created to fill and consume EOF related
19
19
### 🛠️ Framework
20
20
21
21
- ✨ Add an empty account function for usage within fill and execute ([ #1482 ] ( https://github.com/ethereum/execution-spec-tests/pull/1482 ) ).
22
+ - ✨ Added ` TransactionException.INTRINSIC_GAS_BELOW_FLOOR_GAS_COST ` exception to specifically catch the case where the intrinsic gas cost is insufficient due to the data floor gas cost ([ #1582 ] ( https://github.com/ethereum/execution-spec-tests/pull/1582 ) ).
22
23
23
24
### 📋 Misc
24
25
Original file line number Diff line number Diff line change @@ -330,6 +330,9 @@ class BesuExceptionMapper(ExceptionMapper):
330
330
TransactionException .INTRINSIC_GAS_TOO_LOW : (
331
331
r"transaction invalid intrinsic gas cost \d+ exceeds gas limit \d+"
332
332
),
333
+ TransactionException .INTRINSIC_GAS_BELOW_FLOOR_GAS_COST : (
334
+ r"transaction invalid intrinsic gas cost \d+ exceeds gas limit \d+"
335
+ ),
333
336
TransactionException .SENDER_NOT_EOA : (
334
337
r"transaction invalid Sender 0x[0-9a-f]+ has deployed code and so is not authorized "
335
338
r"to send transactions"
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ class ErigonExceptionMapper(ExceptionMapper):
14
14
),
15
15
TransactionException .NONCE_IS_MAX : "nonce has max value" ,
16
16
TransactionException .INTRINSIC_GAS_TOO_LOW : "intrinsic gas too low" ,
17
+ TransactionException .INTRINSIC_GAS_BELOW_FLOOR_GAS_COST : "intrinsic gas too low" ,
17
18
TransactionException .INSUFFICIENT_MAX_FEE_PER_GAS : "fee cap less than block base fee" ,
18
19
TransactionException .PRIORITY_GREATER_THAN_MAX_FEE_PER_GAS : "tip higher than fee cap" ,
19
20
TransactionException .INSUFFICIENT_MAX_FEE_PER_BLOB_GAS : "max fee per blob gas too low" ,
Original file line number Diff line number Diff line change @@ -77,6 +77,9 @@ class EthereumJSExceptionMapper(ExceptionMapper):
77
77
"Invalid EIP-7702 transaction: authorization list is empty"
78
78
),
79
79
TransactionException .INTRINSIC_GAS_TOO_LOW : "is lower than the minimum gas limit of" ,
80
+ TransactionException .INTRINSIC_GAS_BELOW_FLOOR_GAS_COST : (
81
+ "is lower than the minimum gas limit of"
82
+ ),
80
83
TransactionException .INITCODE_SIZE_EXCEEDED : (
81
84
"the initcode size of this transaction is too large"
82
85
),
Original file line number Diff line number Diff line change @@ -60,6 +60,7 @@ class EvmoneExceptionMapper(ExceptionMapper):
60
60
),
61
61
TransactionException .TYPE_4_EMPTY_AUTHORIZATION_LIST : "empty authorization list" ,
62
62
TransactionException .INTRINSIC_GAS_TOO_LOW : "intrinsic gas too low" ,
63
+ TransactionException .INTRINSIC_GAS_BELOW_FLOOR_GAS_COST : "intrinsic gas too low" ,
63
64
TransactionException .TYPE_3_TX_MAX_BLOB_GAS_ALLOWANCE_EXCEEDED : "blob gas limit exceeded" ,
64
65
TransactionException .INITCODE_SIZE_EXCEEDED : "max initcode size exceeded" ,
65
66
TransactionException .INSUFFICIENT_ACCOUNT_FUNDS : (
Original file line number Diff line number Diff line change @@ -153,6 +153,7 @@ class ExecutionSpecsExceptionMapper(ExceptionMapper):
153
153
TransactionException .TYPE_3_TX_BLOB_COUNT_EXCEEDED : " transaction: " ,
154
154
TransactionException .TYPE_3_TX_ZERO_BLOBS : "transaction: " ,
155
155
TransactionException .INTRINSIC_GAS_TOO_LOW : "ransaction: " ,
156
+ TransactionException .INTRINSIC_GAS_BELOW_FLOOR_GAS_COST : "ransaction: " ,
156
157
TransactionException .INITCODE_SIZE_EXCEEDED : "ansaction: " ,
157
158
TransactionException .PRIORITY_GREATER_THAN_MAX_FEE_PER_GAS : "nsaction: " ,
158
159
TransactionException .NONCE_MISMATCH_TOO_HIGH : "saction: " ,
Original file line number Diff line number Diff line change @@ -33,6 +33,10 @@ class GethExceptionMapper(ExceptionMapper):
33
33
TransactionException .INSUFFICIENT_ACCOUNT_FUNDS : (
34
34
"insufficient funds for gas * price + value"
35
35
),
36
+ TransactionException .INTRINSIC_GAS_TOO_LOW : "intrinsic gas too low" ,
37
+ TransactionException .INTRINSIC_GAS_BELOW_FLOOR_GAS_COST : (
38
+ "insufficient gas for floor data gas cost"
39
+ ),
36
40
TransactionException .NONCE_IS_MAX : "nonce has max value" ,
37
41
TransactionException .TYPE_3_TX_MAX_BLOB_GAS_ALLOWANCE_EXCEEDED : (
38
42
"would exceed maximum allowance"
@@ -118,9 +122,6 @@ class GethExceptionMapper(ExceptionMapper):
118
122
TransactionException .TYPE_3_TX_MAX_BLOB_GAS_ALLOWANCE_EXCEEDED : (
119
123
r"blob gas used \d+ exceeds maximum allowance \d+"
120
124
),
121
- TransactionException .INTRINSIC_GAS_TOO_LOW : (
122
- r"intrinsic gas too low|insufficient gas for floor data gas cost"
123
- ),
124
125
BlockException .BLOB_GAS_USED_ABOVE_LIMIT : (
125
126
r"blob gas used \d+ exceeds maximum allowance \d+"
126
127
),
Original file line number Diff line number Diff line change @@ -324,6 +324,7 @@ class NethermindExceptionMapper(ExceptionMapper):
324
324
mapping_substring = {
325
325
TransactionException .SENDER_NOT_EOA : "sender has deployed code" ,
326
326
TransactionException .INTRINSIC_GAS_TOO_LOW : "intrinsic gas too low" ,
327
+ TransactionException .INTRINSIC_GAS_BELOW_FLOOR_GAS_COST : "intrinsic gas too low" ,
327
328
TransactionException .INSUFFICIENT_MAX_FEE_PER_GAS : "miner premium is negative" ,
328
329
TransactionException .PRIORITY_GREATER_THAN_MAX_FEE_PER_GAS : (
329
330
"InvalidMaxPriorityFeePerGas: Cannot be higher than maxFeePerGas"
Original file line number Diff line number Diff line change @@ -89,6 +89,7 @@ class NimbusExceptionMapper(ExceptionMapper):
89
89
TransactionException .TYPE_3_TX_BLOB_COUNT_EXCEEDED : "exceeds maximum allowance" ,
90
90
TransactionException .TYPE_3_TX_ZERO_BLOBS : "blob transaction missing blob hashes" ,
91
91
TransactionException .INTRINSIC_GAS_TOO_LOW : "intrinsic gas too low" ,
92
+ TransactionException .INTRINSIC_GAS_BELOW_FLOOR_GAS_COST : "intrinsic gas too low" ,
92
93
TransactionException .INITCODE_SIZE_EXCEEDED : "max initcode size exceeded" ,
93
94
# TODO EVMONE needs to differentiate when the section is missing in the header or body
94
95
EOFException .MISSING_STOP_OPCODE : "err: no_terminating_instruction" ,
Original file line number Diff line number Diff line change @@ -40,7 +40,10 @@ class RethExceptionMapper(ExceptionMapper):
40
40
mapping_regex = {
41
41
TransactionException .NONCE_MISMATCH_TOO_LOW : r"nonce \d+ too low, expected \d+" ,
42
42
TransactionException .INTRINSIC_GAS_TOO_LOW : (
43
- r"(call gas cost|gas floor) \(\d+\) exceeds the gas limit \(\d+\)"
43
+ r"call gas cost \(\d+\) exceeds the gas limit \(\d+\)"
44
+ ),
45
+ TransactionException .INTRINSIC_GAS_BELOW_FLOOR_GAS_COST : (
46
+ r"gas floor \(\d+\) exceeds the gas limit \(\d+\)"
44
47
),
45
48
TransactionException .TYPE_3_TX_MAX_BLOB_GAS_ALLOWANCE_EXCEEDED : (
46
49
r"blob gas used \d+ exceeds maximum allowance \d+"
Original file line number Diff line number Diff line change @@ -323,6 +323,10 @@ class TransactionException(ExceptionBase):
323
323
"""
324
324
Transaction's gas limit is too low.
325
325
"""
326
+ INTRINSIC_GAS_BELOW_FLOOR_GAS_COST = auto ()
327
+ """
328
+ Transaction's gas limit is below the floor gas cost.
329
+ """
326
330
INITCODE_SIZE_EXCEEDED = auto ()
327
331
"""
328
332
Transaction's initcode for a contract-creating transaction is too large.
Original file line number Diff line number Diff line change @@ -302,9 +302,14 @@ def tx_gas_limit(
302
302
303
303
304
304
@pytest .fixture
305
- def tx_error (tx_gas_delta : int ) -> TransactionException | None :
305
+ def tx_error (tx_gas_delta : int , data_test_type : DataTestType ) -> TransactionException | None :
306
306
"""Transaction error, only expected if the gas delta is negative."""
307
- return TransactionException .INTRINSIC_GAS_TOO_LOW if tx_gas_delta < 0 else None
307
+ if tx_gas_delta < 0 :
308
+ if data_test_type == DataTestType .FLOOR_GAS_COST_GREATER_THAN_INTRINSIC_GAS :
309
+ return TransactionException .INTRINSIC_GAS_BELOW_FLOOR_GAS_COST
310
+ else :
311
+ return TransactionException .INTRINSIC_GAS_TOO_LOW
312
+ return None
308
313
309
314
310
315
@pytest .fixture
You can’t perform that action at this time.
0 commit comments