File tree Expand file tree Collapse file tree 9 files changed +21
-9
lines changed
tests/osaka/eip7825_transaction_gas_limit_cap Expand file tree Collapse file tree 9 files changed +21
-9
lines changed Original file line number Diff line number Diff line change 42
42
"Osaka" : {
43
43
"git_url" : " https://github.com/spencer-tb/execution-specs.git" ,
44
44
"branch" : " forks/osaka" ,
45
- "commit" : " e59c6e3eaed0dbbca639b6f5b6acaa832e51ca00 "
45
+ "commit" : " 0d86ad789e7c0d25ec86f15d0e4adb9d9b308af3 "
46
46
}
47
47
}
Original file line number Diff line number Diff line change @@ -342,4 +342,7 @@ class BesuExceptionMapper(ExceptionMapper):
342
342
r"expected (\d+), but got (-?\d+)|"
343
343
r"Invalid deposit log length\. Must be \d+ bytes, but is \d+ bytes"
344
344
),
345
+ TransactionException .GAS_LIMIT_EXCEEDS_MAXIMUM : (
346
+ r"transaction invalid Transaction gas limit must be at most \d+"
347
+ ),
345
348
}
Original file line number Diff line number Diff line change @@ -42,6 +42,9 @@ class ErigonExceptionMapper(ExceptionMapper):
42
42
BlockException .INVALID_BLOCK_HASH : "invalid block hash" ,
43
43
}
44
44
mapping_regex = {
45
+ TransactionException .GAS_LIMIT_EXCEEDS_MAXIMUM : (
46
+ r"invalid block, txnIdx=\d+, gas limit too high"
47
+ ),
45
48
BlockException .INCORRECT_BLOB_GAS_USED : r"blobGasUsed by execution: \d+, in header: \d+" ,
46
49
BlockException .INCORRECT_EXCESS_BLOB_GAS : r"invalid excessBlobGas: have \d+, want \d+" ,
47
50
BlockException .INVALID_GAS_USED : r"gas used by execution: \w+, in header: \w+" ,
Original file line number Diff line number Diff line change @@ -67,6 +67,9 @@ class GethExceptionMapper(ExceptionMapper):
67
67
TransactionException .TYPE_4_TX_CONTRACT_CREATION : (
68
68
"input string too short for common.Address, decoding into (types.SetCodeTx).To"
69
69
),
70
+ TransactionException .GAS_LIMIT_EXCEEDS_MAXIMUM : (
71
+ "transaction exceeds maximum allowed gas limit"
72
+ ),
70
73
TransactionException .TYPE_4_TX_PRE_FORK : ("transaction type not supported" ),
71
74
TransactionException .INITCODE_SIZE_EXCEEDED : "max initcode size exceeded" ,
72
75
TransactionException .NONCE_MISMATCH_TOO_LOW : "nonce too low" ,
Original file line number Diff line number Diff line change @@ -377,6 +377,9 @@ class NethermindExceptionMapper(ExceptionMapper):
377
377
r"BlockBlobGasExceeded: A block cannot have more than \d+ blob gas, blobs count \d+, "
378
378
r"blobs gas used: \d+"
379
379
),
380
+ TransactionException .GAS_LIMIT_EXCEEDS_MAXIMUM : (
381
+ r"TxGasLimitCapExceeded: Gas limit \d+ exceeed cap of \d+\.?"
382
+ ),
380
383
BlockException .INCORRECT_EXCESS_BLOB_GAS : (
381
384
r"HeaderExcessBlobGasMismatch: Excess blob gas in header does not match calculated"
382
385
r"|Overflow in excess blob gas"
Original file line number Diff line number Diff line change @@ -85,6 +85,8 @@ class NimbusExceptionMapper(ExceptionMapper):
85
85
TransactionException .TYPE_3_TX_INVALID_BLOB_VERSIONED_HASH : (
86
86
"invalid tx: one of blobVersionedHash has invalid version"
87
87
),
88
+ # TODO: temp solution until mapper for nimbus is fixed
89
+ TransactionException .GAS_LIMIT_EXCEEDS_MAXIMUM : ("zero gasUsed but transactions present" ),
88
90
# This message is the same as TYPE_3_TX_MAX_BLOB_GAS_ALLOWANCE_EXCEEDED
89
91
TransactionException .TYPE_3_TX_BLOB_COUNT_EXCEEDED : "exceeds maximum allowance" ,
90
92
TransactionException .TYPE_3_TX_ZERO_BLOBS : "blob transaction missing blob hashes" ,
Original file line number Diff line number Diff line change @@ -55,6 +55,9 @@ class RethExceptionMapper(ExceptionMapper):
55
55
TransactionException .GAS_ALLOWANCE_EXCEEDED : (
56
56
r"transaction gas limit \w+ is more than blocks available gas \w+"
57
57
),
58
+ TransactionException .GAS_LIMIT_EXCEEDS_MAXIMUM : (
59
+ r"transaction gas limit \(\d+\) is greater than the cap \(\d+\)"
60
+ ),
58
61
BlockException .SYSTEM_CONTRACT_CALL_FAILED : r"failed to apply .* requests contract call" ,
59
62
BlockException .INCORRECT_BLOB_GAS_USED : (
60
63
r"blob gas used mismatch|blob gas used \d+ is not a multiple of blob gas per blob"
Original file line number Diff line number Diff line change 1
1
"""
2
- Test suite for
3
- [EIP-7825: Transaction Gas Limit Cap](https://eips.ethereum.org/EIPS/eip-7825).
2
+ abstract: Tests [EIP-7825: Transaction Gas Limit Cap](https://eips.ethereum.org/EIPS/eip-7825).
3
+ Test cases for [EIP-7825: Transaction Gas Limit Cap](https://eips.ethereum.org/EIPS/eip-7825).
4
4
"""
Original file line number Diff line number Diff line change @@ -66,14 +66,9 @@ def test_transaction_gas_limit_cap(
66
66
error : TransactionException | None ,
67
67
tx_type : int ,
68
68
):
69
- """
70
- TODO: Enter a one-line test summary here.
71
-
72
- TODO: (Optional) Enter a more detailed test function description here.
73
- """
69
+ """Test the transaction gas limit cap behavior for all transaction types."""
74
70
env = Environment ()
75
71
76
- # TODO: Modify pre-state allocations here.
77
72
sender = pre .fund_eoa ()
78
73
storage = Storage ()
79
74
contract_address = pre .deploy_contract (
You can’t perform that action at this time.
0 commit comments