Skip to content

Commit 7f4fc84

Browse files
gurukamathSamWilsn
authored andcommitted
Implement EIP-7825
1 parent 268f67f commit 7f4fc84

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/ethereum/osaka/transactions.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@
5555
Gas cost for including a storage key in the access list of a transaction.
5656
"""
5757

58+
TX_MAX_GAS_LIMIT = Uint(30_000_000)
59+
5860

5961
@slotted_freezable
6062
@dataclass
@@ -549,6 +551,8 @@ def validate_transaction(tx: Transaction) -> Tuple[Uint, Uint]:
549551
raise InvalidTransaction("Nonce too high")
550552
if tx.to == Bytes0(b"") and len(tx.data) > 2 * MAX_CODE_SIZE:
551553
raise InvalidTransaction("Code size too large")
554+
if tx.gas > TX_MAX_GAS_LIMIT:
555+
raise InvalidTransaction("Gas limit too high")
552556

553557
return intrinsic_gas, calldata_floor_gas_cost
554558

0 commit comments

Comments
 (0)