EIP-7703 Calldata Cost Increase (Increase calldata cost)
No call decision · Fees & gas · EIP status Stagnant · created 2024-05-07
A proposal that raises calldata gas costs to reduce the limit on how large blocks can grow, creating room to more safely raise the block gas limit instead.
Why it is needed
Larger blocks take longer to propagate across the entire network. This propagation time is the reason it is difficult to simply raise the block gas limit. How large a block can grow is ultimately determined by the amount of data carried in transactions, that is, calldata, and its gas cost. As things stand, with calldata costs low, the amount of data that can fit within the same gas limit, in other words the maximum block size, is large. Raising the calldata cost reduces the amount of data that can fit within the same gas limit, shrinking the maximum block size, so that raising the block gas limit does not increase the block propagation burden by the same amount.
What changes
Today
- The gas cost per byte of zero calldata (G_CALLDATAZERO) is 4
- The gas cost per byte of nonzero calldata (G_CALLDATANONZERO) is 16
- The amount of calldata that fits within the same gas limit is large, making the maximum block size large
- It is difficult to raise the block gas limit because of the block propagation burden
After EIP-7703
- G_CALLDATAZERO raised from 4 to 12
- G_CALLDATANONZERO raised from 16 to 48
- The maximum block size decreases to about one third
- Room opens up to raise the block gas limit by as much as the maximum block size has shrunk
Who is affected
- Users: Fees for transactions that use a lot of calldata could rise by nearly three times at most.
- Wallet & app developers: Since eth_estimateGas results change, gas must be estimated under the new cost basis before activation to avoid transactions reverting due to out-of-gas.
- Rollups and other calldata-dependent services: Services like rollups that carry large amounts of data in calldata are significantly affected by the cost increase.
- Clients and validators: As the maximum block size shrinks, the block propagation burden decreases, which forms the premise for future discussions on raising the gas limit.
In depth
Specification: raising two gas constants
This EIP changes only two values. It raises G_CALLDATAZERO, the gas cost per byte of zero calldata, from 4 to 12, and G_CALLDATANONZERO, the gas cost per nonzero byte, from 16 to 48. Both are exactly tripled. It does not touch any other gas costs, transaction formats, or opcode behavior.
Motivation: block propagation time as the practical constraint on the gas limit
The larger a block is, the longer it takes to propagate across the network. This propagation delay is the factor that limits how much the block gas limit can be raised. In other words, to safely raise the gas limit, the maximum block size (in bytes) achievable under the same gas limit must first be reduced, and raising the calldata gas cost is the method for doing so.
Rationale: why tripling the cost reduces the maximum block size to one third
Tripling the calldata gas cost reduces the number of calldata bytes that fit within the same gas limit to one third. Since the maximum block size is mainly determined by the total amount of calldata, this adjustment alone reduces the maximum block size to roughly one third as well. This is the core logic behind this proposal.
Backwards compatibility: revert risk at activation and mitigation
Once this change is activated, some transactions may revert due to out-of-gas because previously estimated gas amounts fall short. The original text suggests that if eth_estimateGas calculates gas based on the new cost basis (G_CALLDATAZERO=12, G_CALLDATANONZERO=48) even before activation, it can provide estimates that remain valid at activation time, avoiding such reverts.
Security: no separately identified issues
The original text states in its Security Considerations section only that no security issues were found. The judgment is that changing the gas cost constants itself does not create a new attack surface.
Current status: Stagnant, no decision on fork inclusion
This EIP's current status is Stagnant, with no recorded decision on inclusion in the call history. Beyond the figures and logic stated in the original text, there is no additional confirmed timeline or evaluation, so the content or status may change in the future.