EIP-7825 caps individual transaction gas at 30 million, independent of block gas limit. Transactions requesting more gas are rejected at the mempool level and blocks containing them are invalid. This limits maximum resources any single transaction can consume.
As gas limits increase for scaling, single transactions consuming an entire block create DoS risks and validation time variance. A 30M cap ensures at least two transactions per block, more predictable processing times, and protection against edge cases that consume excessive resources.
This proposal introduces a protocol-level cap on the maximum gas usage per transaction to 16,777,216 (2^24) gas. By implementing this limit, Ethereum can enhance its resilience against certain DoS vectors, improve network stability, and provide more predictability to transaction processing costs, especially in the context of increasing the gas limit.
Currently, transactions can theoretically consume up to the entire block gas limit, which poses several risks:
By limiting individual transactions to a maximum of 16,777,216 gas, we aim to:
MAX_GAS_LIMIT_EXCEEDED).gasLimit specified by the sender exceeds 16,777,216, the transaction is invalidated (not included in the txpool).gasLimit > 16,777,216 is deemed invalid and rejected.GAS_LIMIT parameter for transactions will be capped in client implementations at 16,777,216.The proposed cap of 16,777,216 gas (2^24) provides a clean power-of-two boundary that simplifies implementation while still being large enough to accommodate most complex transactions, including contract deployments and advanced DeFi interactions. This value represents approximately half of typical block sizes (30-40 million gas), ensuring multiple transactions can fit within each block.
This change is not backward-compatible with transactions that specify gas limits exceeding 16,777,216. Transactions with such high limits will need to be split into smaller operations. This adjustment is expected to impact a minimal number of users and dApps, as most transactions today fall well below the proposed cap.
An empirical analysis has been conducted to assess the potential impact of this change.
Copyright and related rights waived via CC0.