EIP-7783: Add Controlled Gas Limit Increase Strategy

Adds a controlled gas limit increase strategy.


Metadata
Status: DraftInformationalCreated: 2024-10-06
Authors
Giulio Rebuffo (@Giulio2002)

This proposal describes the introduction in clients of a controlled gas limit increase strategy to determine the gas limit of a specific block and set as default with conservative parameters, while keeping the possibility to change it in the future to a fixed value.

Abstract


The EIP proposes the introduction of a new gas limit management mechanism that automatically increases the block gas limit over time. The incremental growth is controlled by a fixed rate, ensuring predictable network scaling while preventing sudden surges in block sizes. This strategy is meant to be used as a default setting, with the option to switch to a fixed gas limit if needed (or different parameters).

Motivation


Predictable Gas Limit Growth

  • Current Issue:

    • The Ethereum network faces increasing demand, but changes to the gas limit are often manually adjusted by miners or validators based on their preferences, which may cause unpredictable block sizes and network performance issues.
  • Need for Change:

    • A systematic and predictable increase of the gas limit will help scale the network while giving the ecosystem time to adjust to larger block sizes, without needing to rely on ad hoc decisions by network participants.

Gradual Increase with Deactivation Safeguard

  • Controlled Growth:
    • Instead of sudden or unpredictable changes, this EIP proposes incremental gas limit increases over a specified amount of time, ensuring a smooth transition to higher transaction throughput, while still keeping the governance of the gas limit in the hand of the community.
  • Automatic Deactivation:
    • A safeguard deactivation block will halt the increase after some specified time, preventing the gas Limit from growing indefinitely and allowing the community to reassess the network's needs.

Specification


Incremental Gas Limit Increase Strategy

Add a new "Gas Limit" selection strategy that takes in Block Number N and spits out the Gas Limit GL for that block. The strategy is as follows:

  • The gas limit GL_t at block t is calculated as:

Where:

  • blockNum is the block number for which the gas limit is being calculated.
  • blockNumStart is the block number at which the gas limit increase starts.
  • initialGasLimit is the initial gas limit at block blockNumStart.
  • r is the rate at which the gas limit increases per block.
  • gasLimitCap is the maximum gas limit that can be reached.

If we set blockNumStart to the current block number, initialGasLimit to the current gas limit (30_000_000), r to 6, and gasLimitCap to 60_000_000, the gas limit will increase by 6 gas per block for two years, reaching 30 million gas at the end of a $\approx$ 2 years period. The result of compute_gas_limit will be the gas limit aimed by the proposer for the block blockNum. none of this is enforced at the protocol level, and the proposer needs to still follow protocol rules related to the gas limit.

Rationale


Predictable Growth

  • Systematic Adjustment:
    • The gradual increase avoids sudden surges in gas limit that could destabilize the network. Instead, it provides a smooth transition, giving the ecosystem time to adapt to larger block sizes.

Controlled Limit with Deactivation Block

  • Automatic Safeguard:

    • The inclusion of a deactivation block ensures that the gas limit does not increase indefinitely, preventing potential negative impacts on network performance beyond the planned growth.
  • Community Consensus:

    • The deactivation block serves only as a checkpoint for the community to evaluate the impact of the gas limit increase, however, in the two-year period, the community can decide to halt the increase at any time and can also switch to a fixed gas limit if needed.

Backwards Compatibility


No Hard Fork Required

Security Considerations


  • The controlled gas limit increase strategy is designed to prevent sudden changes that could lead to network instability or security vulnerabilities.
  • The fact that validators can re-adjust the gas limit in case of a DOS attack or other issues, makes the network more secure than to just increasing the gas limit manually in a cliff-like manner.

Copyright


Copyright and related rights waived via CC0 1.0 Universal.