EIP-7783 Controlled gas limit growth strategy (Add Controlled Gas Limit Increase Strategy)
No call decision · Fees & gas · EIP status Stagnant · created 2024-10-06
Proposes a default strategy whereby, instead of validators manually setting the gas limit a block can hold, it is automatically increased a little each block according to a fixed formula.
Why it is needed
Currently the gas limit is manually adjusted by validators at their individual discretion. Arbitrary changes without a unified standard make block size and network performance hard to predict. Rather than relying solely on ad hoc decisions as demand grows, there is a need to slowly raise the gas limit according to a fixed rule, giving the ecosystem time to adapt to larger block sizes. At the same time, since the increase should not continue indefinitely, a safeguard is included that halts the increase at a certain point so the community can reassess network conditions.
What changes
Today
- The gas limit is manually set or adjusted by individual validators
- Because adjustment criteria are not unified, changes in block size are hard to predict
- Whether to raise the gas limit must be decided ad hoc each time
After EIP-7783
- Given a block number, a fixed formula calculates the target gas limit for that block
- The increase proceeds gradually according to one of three rules: linear, stepwise, or exponential
- At a predetermined point (a deactivation checkpoint), the increase halts, giving an opportunity for reassessment
- Validators can halt the increase or switch to a fixed value at any time
Who is affected
- Validator: Instead of manually deliberating over the gas limit, a reference default strategy is obtained, though following it remains optional
- Client development teams: Client software needs to implement this growth strategy as its default
- App and wallet developers: Because the amount of transactions a block can process grows at a predictable rate, capacity planning becomes easier
In depth
The current method of adjusting the gas limit
The text points out as a problem that the gas limit is currently adjusted manually at the discretion of individual miners/validators. It explains that arbitrary changes without a unified standard make block size and network performance hard to predict. This EIP proposes using a systematic, predictable growth method instead of these ad hoc decisions.
Linear Gas Limit Increase Strategy
The function compute_gas_limit(blockNum, blockNumStart, initialGasLimit, r, gasLimitCap) calculates the target gas limit for a given block. If blockNum precedes blockNumStart, initialGasLimit is used as is; afterward, the smaller of initialGasLimit + r * (blockNum - blockNumStart) and gasLimitCap is used. In other words, the gas limit increases by r with each block until it hits gasLimitCap. The source gives an example setting blockNumStart to the current block, initialGasLimit to 30,000,000, r to 6, and gasLimitCap to 60,000,000, explaining that at this rate the gas limit grows over roughly two years. This resulting value is merely a target the proposer aims for; the protocol does not enforce it.
Stepwise Linear Gas Limit Increase Strategy
A variant of the linear strategy where the gas limit jumps by r not every block but once every step_blocks_interval blocks (a cooldown period). compute_gas_limit adds r multiplied by the quotient of (blockNum - blockNumStart) divided by step_blocks_interval. The source cites as advantages of this approach that changes are more clearly visible at each step, more stable metrics can be gathered during the cooldown period, and the community gets more time to assess and respond to the impact.
Exponential Gas Limit Increase Strategy
The third strategy has the gas limit double every doubling_blocks_interval blocks. compute_gas_limit returns the smaller of initialGasLimit multiplied by 2 raised to the power of (blockNum - blockNumStart)/doubling_blocks_interval, and gasLimitCap. Unlike the other two strategies, the rate of increase accelerates over time.
A target value the protocol does not enforce
For all three strategies, the source explicitly states that the calculated gas limit value is only a target the proposer aims for in that block. The protocol does not enforce this value, and proposers must still follow existing gas-limit-related protocol rules. This EIP is merely a default strategy that clients propose; the consensus rules remain unchanged.
A deactivation checkpoint to prevent unlimited growth
So that the gas limit does not grow indefinitely, the source proposes including a deactivation point where the increase halts. This point serves as a checkpoint where the community can review the impact so far and decide on the next direction. It is not a point that permanently stops growth. The source states that even within the two-year period, the community can halt the increase or switch to a fixed gas limit value at any time.
Applies without a hard fork, and can be readjusted even under a DOS situation
The source states explicitly that this change does not alter consensus rules and therefore requires no hard fork. On the security side, it explains that the ability for validators to readjust the gas limit when a DOS attack or other problem occurs makes the network safer than a cliff-edge approach that raises the gas limit sharply all at once.
Current status
This EIP is of Informational type and is currently Stagnant, meaning it is not a stage of active ongoing discussion. The call records provided contain no decision to include this proposal in any particular fork.