--- eip: 7987 title: Transaction Gas Limit Cap at 16,777,216 description: Introduce a protocol-level cap on the maximum gas used by a transaction to 16,777,216 author: Toni Wahrstätter (@nerolation), Vitalik Buterin (@vbuterin) discussions-to: https://ethereum-magicians.org/t/eip-7983-transaction-gas-limit-cap-at-2-24/24746 status: Draft type: Standards Track category: Core created: 2025-06-24 --- ## Abstract This proposal introduces a protocol-level cap on the maximum gas usage per transaction to 16,777,216 gas (2^24). By implementing this limit, Ethereum can enhance its resilience against certain DoS vectors, improve network stability, and provide more predictability to transaction processing costs. ## Motivation Currently, transactions can theoretically consume up to the entire block gas limit, which poses several risks: 1. **Inefficient Load Balancing**: A single transaction consuming most or all of the block gas can result in uneven load distribution and impact network stability. 2. **Quadratic attacks (see: 2016 DoS era):** They are *probably* gone, but reducing max size of a transaction still gives us added protection. 3. **zkVM Compatibility**: Splitting large transactions into smaller chunks allows better participation in distributed proving systems. Theoretically it's possible for zkVMs to parallelize within a transaction and not just between transactions (as they do today). But in practice, they have been very unwilling to do this due to the added complexity. So we should just concede this point and make transactions smaller. 4. **Parallel Execution**: Variable gas usage causes load imbalance across execution threads. By limiting individual transactions to a maximum of 16,777,216 gas, we aim to: - Reduce the risks of single-transaction DoS attacks. - Enable more predictable zkVM circuit design. - Promote fairer gas allocation across transactions within a block. ## Specification ### Gas Cap - Enforce a protocol-level maximum of **16,777,216 gas** (2^24) for any single transaction. - This cap applies regardless of the block gas limit set by miners or validators. - Transactions specifying gas limits higher than 16,777,216 gas will be rejected with an appropriate error code. ### Changes to EVM Behavior 1. **Txpool Validation**: During transaction validation, if the `gasLimit` specified by the sender exceeds 16.77 million, the transaction is invalidated (not included in the txpool). 2. **Block Validation**: As part of block validation before processing, any block having a transaction with `gasLimit` > 16.77 million is deemed invalid and rejected. ## Rationale ### Why 16,777,216? The proposed cap of 16,777,216 gas (2^24) provides a balance between allowing complex transactions while maintaining predictable execution bounds. This value enables most current use cases including contract deployments and advanced DeFi interactions while ensuring consistent performance characteristics. [EIP-7825](./eip-7825.md) is a first step in this direction, and this proposal continues that trajectory. ## Backwards Compatibility This change is **not backward-compatible** with transactions that specify gas limits exceeding 16.77 million. 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. ## Security Considerations 1. **DoS Mitigation**: A fixed cap reduces the risk of DoS attacks caused by excessively high-gas transactions. 2. **Block Verification Stability**: By capping individual transactions, the validation of blocks becomes more predictable and uniform. ## Copyright Copyright and related rights waived via [CC0](../LICENSE.md).