Skip to content

Commit 7ac49fc

Browse files
committed
Implement EIP-7825
1 parent 4538241 commit 7ac49fc

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
@@ -25,6 +25,8 @@
2525
TX_ACCESS_LIST_ADDRESS_COST = Uint(2400)
2626
TX_ACCESS_LIST_STORAGE_KEY_COST = Uint(1900)
2727

28+
TX_MAX_GAS_LIMIT = Uint(30_000_000)
29+
2830

2931
@slotted_freezable
3032
@dataclass
@@ -230,6 +232,8 @@ def validate_transaction(tx: Transaction) -> Tuple[Uint, Uint]:
230232
raise InvalidTransaction("Nonce too high")
231233
if tx.to == Bytes0(b"") and len(tx.data) > 2 * MAX_CODE_SIZE:
232234
raise InvalidTransaction("Code size too large")
235+
if tx.gas > TX_MAX_GAS_LIMIT:
236+
raise InvalidTransaction("Gas limit too high")
233237

234238
return intrinsic_gas, calldata_floor_gas_cost
235239

0 commit comments

Comments
 (0)