EIP-3382 · Withdrawn · Core · 2021-03-13
EIP-3382: Hardcoded Block Gas Limit
A withdrawn proposal to fix the block gas limit at 12.5M by consensus, taking the choice away from block producers; the author later preferred the gas-limit cap in EIP-3756.
What problem does it solve?
Almost every Ethereum parameter is fixed by consensus rules that all nodes enforce. The block gas limit is an exception: block producers can nudge it up or down a little every block, so over time they collectively decide how big blocks are.
The protocol assumes producers are financially rational, not benevolent, yet the gas limit relies on them caring about long-term decentralisation. A sudden large increase (state growth, harder to run a node) or decrease (congestion) could be imposed by a small group. EIP-3382 proposed taking the parameter out of their hands.
How it works
- From
FORK_BLOCK_NUMBER, a block is valid only ifheader.gasLimit == 12,500,000. - The
gasLimitfield stays in the header to avoid changing the header structure, but it becomes a constant. - After EIP-1559, the same rule was to apply to what the spec calls the gas target.
- 12.5M was simply the gas limit when the EIP was written. Changing it later would require a new EIP and hard fork, like any other consensus parameter.
Sample code
The added header-validation rule, as pseudocode:
BLOCK_GAS_LIMIT = 12_500_000
def validate_header(header, parent):
if header.number >= FORK_BLOCK_NUMBER:
if header.gas_limit != BLOCK_GAS_LIMIT:
raise InvalidBlock("gas limit must equal BLOCK_GAS_LIMIT")
else:
validate_gas_limit_adjustment(header, parent) # legacy ±1/1024 rule
Things to know
- Status is Withdrawn. The author withdrew it in favour of EIP-3756, which caps the gas limit at a maximum instead of fixing an exact value (itself now Stagnant).
- The spec acknowledges the downside: in an emergency, changing the gas limit would require a hard fork rather than producer coordination.
- In practice Ethereum kept producer-voted gas limits, and validators have since raised the limit well beyond 12.5M. Per-transaction limits are a separate topic, see EIP-7825.