Skip to content

Commit 68beae6

Browse files
committed
chore: add exceptions mapper, clean up, ci fix.
1 parent a14169d commit 68beae6

File tree

9 files changed

+21
-9
lines changed

9 files changed

+21
-9
lines changed

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+ exceeed 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"
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
"""
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).
44
"""

tests/osaka/eip7825_transaction_gas_limit_cap/test_transaction_gas_limit_cap.py renamed to tests/osaka/eip7825_transaction_gas_limit_cap/test_tx_gas_limit.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,9 @@ def test_transaction_gas_limit_cap(
6666
error: TransactionException | None,
6767
tx_type: int,
6868
):
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."""
7470
env = Environment()
7571

76-
# TODO: Modify pre-state allocations here.
7772
sender = pre.fund_eoa()
7873
storage = Storage()
7974
contract_address = pre.deploy_contract(

0 commit comments

Comments
 (0)