Skip to content

Commit 46d4490

Browse files
marioevzspencer-tb
andauthored
feat(tests): EIP-7825: Transaction Gas Limit Cap (#1711)
* feat(tests): add initial eip-7825 test cases. * chore: add exceptions mapper, clean up, ci fix. * chore(docs): changelog. * chore: spellcheck. * chore: fix coverage ci. --------- Co-authored-by: spencer-tb <[email protected]>
1 parent d7055d5 commit 46d4490

File tree

14 files changed

+241
-1
lines changed

14 files changed

+241
-1
lines changed

.github/workflows/coverage.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
paths:
66
- "tests/**" # This triggers the workflow for any changes in the tests folder
77
- "!tests/prague/**" # exclude changes in 'tests/prague'
8+
- "!tests/osaka/**" # exclude changes in 'tests/osaka'
89
- "!tests/unscheduled/**" # exclude changes in 'tests/unscheduled'
910

1011
jobs:

docs/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ Users can select any of the artifacts depending on their testing needs for their
6363
- ✨ EIP-7594: Sanity test cases to send blob transactions and verify `engine_getBlobsVX` using the `execute` command ([#1644](https://github.com/ethereum/execution-spec-tests/pull/1644)).
6464
- 🔀 Refactored EIP-145 static tests into python ([#1683](https://github.com/ethereum/execution-spec-tests/pull/1683)).
6565
- ✨ EIP-7823, EIP-7883: Add test cases for ModExp precompile gas-cost updates and input limits on Osaka ([#1579](https://github.com/ethereum/execution-spec-tests/pull/1579)).
66+
-[EIP-7825](https://eips.ethereum.org/EIPS/eip-7825): Add test cases for the transaction gas limit of 30M gas ([#1711](https://github.com/ethereum/execution-spec-tests/pull/1711)).
6667

6768
## [v4.5.0](https://github.com/ethereum/execution-spec-tests/releases/tag/v4.5.0) - 2025-05-14
6869

eels_resolutions.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,6 @@
4242
"Osaka": {
4343
"git_url": "https://github.com/spencer-tb/execution-specs.git",
4444
"branch": "forks/osaka",
45-
"commit": "e59c6e3eaed0dbbca639b6f5b6acaa832e51ca00"
45+
"commit": "0d86ad789e7c0d25ec86f15d0e4adb9d9b308af3"
4646
}
4747
}

src/ethereum_clis/clis/besu.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,4 +342,7 @@ class BesuExceptionMapper(ExceptionMapper):
342342
r"expected (\d+), but got (-?\d+)|"
343343
r"Invalid deposit log length\. Must be \d+ bytes, but is \d+ bytes"
344344
),
345+
TransactionException.GAS_LIMIT_EXCEEDS_MAXIMUM: (
346+
r"transaction invalid Transaction gas limit must be at most \d+"
347+
),
345348
}

src/ethereum_clis/clis/erigon.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ class ErigonExceptionMapper(ExceptionMapper):
4242
BlockException.INVALID_BLOCK_HASH: "invalid block hash",
4343
}
4444
mapping_regex = {
45+
TransactionException.GAS_LIMIT_EXCEEDS_MAXIMUM: (
46+
r"invalid block, txnIdx=\d+, gas limit too high"
47+
),
4548
BlockException.INCORRECT_BLOB_GAS_USED: r"blobGasUsed by execution: \d+, in header: \d+",
4649
BlockException.INCORRECT_EXCESS_BLOB_GAS: r"invalid excessBlobGas: have \d+, want \d+",
4750
BlockException.INVALID_GAS_USED: r"gas used by execution: \w+, in header: \w+",

src/ethereum_clis/clis/geth.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ class GethExceptionMapper(ExceptionMapper):
6767
TransactionException.TYPE_4_TX_CONTRACT_CREATION: (
6868
"input string too short for common.Address, decoding into (types.SetCodeTx).To"
6969
),
70+
TransactionException.GAS_LIMIT_EXCEEDS_MAXIMUM: (
71+
"transaction exceeds maximum allowed gas limit"
72+
),
7073
TransactionException.TYPE_4_TX_PRE_FORK: ("transaction type not supported"),
7174
TransactionException.INITCODE_SIZE_EXCEEDED: "max initcode size exceeded",
7275
TransactionException.NONCE_MISMATCH_TOO_LOW: "nonce too low",

src/ethereum_clis/clis/nethermind.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,9 @@ class NethermindExceptionMapper(ExceptionMapper):
377377
r"BlockBlobGasExceeded: A block cannot have more than \d+ blob gas, blobs count \d+, "
378378
r"blobs gas used: \d+"
379379
),
380+
TransactionException.GAS_LIMIT_EXCEEDS_MAXIMUM: (
381+
r"TxGasLimitCapExceeded: Gas limit \d+ \w+ cap of \d+\.?"
382+
),
380383
BlockException.INCORRECT_EXCESS_BLOB_GAS: (
381384
r"HeaderExcessBlobGasMismatch: Excess blob gas in header does not match calculated"
382385
r"|Overflow in excess blob gas"

src/ethereum_clis/clis/nimbus.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ class NimbusExceptionMapper(ExceptionMapper):
8585
TransactionException.TYPE_3_TX_INVALID_BLOB_VERSIONED_HASH: (
8686
"invalid tx: one of blobVersionedHash has invalid version"
8787
),
88+
# TODO: temp solution until mapper for nimbus is fixed
89+
TransactionException.GAS_LIMIT_EXCEEDS_MAXIMUM: ("zero gasUsed but transactions present"),
8890
# This message is the same as TYPE_3_TX_MAX_BLOB_GAS_ALLOWANCE_EXCEEDED
8991
TransactionException.TYPE_3_TX_BLOB_COUNT_EXCEEDED: "exceeds maximum allowance",
9092
TransactionException.TYPE_3_TX_ZERO_BLOBS: "blob transaction missing blob hashes",

src/ethereum_clis/clis/reth.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ class RethExceptionMapper(ExceptionMapper):
5555
TransactionException.GAS_ALLOWANCE_EXCEEDED: (
5656
r"transaction gas limit \w+ is more than blocks available gas \w+"
5757
),
58+
TransactionException.GAS_LIMIT_EXCEEDS_MAXIMUM: (
59+
r"transaction gas limit \(\d+\) is greater than the cap \(\d+\)"
60+
),
5861
BlockException.SYSTEM_CONTRACT_CALL_FAILED: r"failed to apply .* requests contract call",
5962
BlockException.INCORRECT_BLOB_GAS_USED: (
6063
r"blob gas used mismatch|blob gas used \d+ is not a multiple of blob gas per blob"

src/ethereum_test_exceptions/exceptions.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,10 @@ class TransactionException(ExceptionBase):
363363
"""
364364
Transaction causes block to go over blob gas limit.
365365
"""
366+
GAS_LIMIT_EXCEEDS_MAXIMUM = auto()
367+
"""
368+
Transaction gas limit exceeds the maximum allowed limit of 30 million.
369+
"""
366370
TYPE_3_TX_ZERO_BLOBS = auto()
367371
"""
368372
Transaction is type 3, but has no blobs.

0 commit comments

Comments
 (0)