Skip to content

Commit d53769f

Browse files
authored
chore(tests): set tx gas limit to 2^24 (#1882)
* chore(tests): set tx gas limit to 2^24. * chore(tests|forks): fix tx gas limit change.
1 parent 5878612 commit d53769f

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

docs/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ Users can select any of the artifacts depending on their testing needs for their
9696
- ✨ 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)).
9797
- 🔀 Refactored EIP-145 static tests into python ([#1683](https://github.com/ethereum/execution-spec-tests/pull/1683)).
9898
- ✨ 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), [#1729](https://github.com/ethereum/execution-spec-tests/pull/1729)).
99-
-[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)).
99+
-[EIP-7825](https://eips.ethereum.org/EIPS/eip-7825): Add test cases for the transaction gas limit of 2^24 gas ([#1711](https://github.com/ethereum/execution-spec-tests/pull/1711), [#1882](https://github.com/ethereum/execution-spec-tests/pull/1882)).
100100
-[EIP-7951](https://eips.ethereum.org/EIPS/eip-7951): add test cases for `P256VERIFY` precompile to support secp256r1 curve [#1670](https://github.com/ethereum/execution-spec-tests/pull/1670).
101101
- ✨ Introduce blockchain tests for benchmark to cover the scenario of pure ether transfers [#1742](https://github.com/ethereum/execution-spec-tests/pull/1742).
102102
-[EIP-7934](https://eips.ethereum.org/EIPS/eip-7934): Add test cases for the block RLP max limit of 10MiB ([#1730](https://github.com/ethereum/execution-spec-tests/pull/1730)).

src/ethereum_test_forks/forks/forks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1378,7 +1378,7 @@ def engine_get_blobs_version(cls, block_number: int = 0, timestamp: int = 0) ->
13781378
@classmethod
13791379
def transaction_gas_limit_cap(cls, block_number: int = 0, timestamp: int = 0) -> int | None:
13801380
"""At Osaka, transaction gas limit is capped at 30 million."""
1381-
return 30_000_000
1381+
return 16_777_216
13821382

13831383
@classmethod
13841384
def block_rlp_size_limit(cls, block_number: int = 0, timestamp: int = 0) -> int | None:

tests/osaka/eip7825_transaction_gas_limit_cap/test_tx_gas_limit.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
REFERENCE_SPEC_GIT_PATH = "EIPS/eip-7825.md"
2929
REFERENCE_SPEC_VERSION = "47cbfed315988c0bd4d10002c110ae402504cd94"
3030

31-
TX_GAS_LIMIT = 30_000_000
31+
TX_GAS_LIMIT = 2**24 # 16,777,216
3232
BLOB_COMMITMENT_VERSION_KZG = 1
3333

3434

@@ -125,8 +125,8 @@ def test_transaction_gas_limit_cap_at_transition(
125125
"""
126126
Test transaction gas limit cap behavior at the Osaka transition.
127127
128-
Before timestamp 15000: No gas limit cap (transactions with gas > 30M are valid)
129-
At/after timestamp 15000: Gas limit cap of 30M is enforced
128+
Before timestamp 15000: No gas limit cap (transactions with gas > 2^24 are valid)
129+
At/after timestamp 15000: Gas limit cap of 2^24 is enforced
130130
"""
131131
sender = pre.fund_eoa()
132132
contract_address = pre.deploy_contract(
@@ -137,7 +137,7 @@ def test_transaction_gas_limit_cap_at_transition(
137137
if pre_cap is None:
138138
pre_cap = TX_GAS_LIMIT
139139

140-
# Transaction with gas limit above 30M
140+
# Transaction with gas limit above the cap before transition
141141
high_gas_tx = Transaction(
142142
ty=0, # Legacy transaction
143143
to=contract_address,

0 commit comments

Comments
 (0)