Vitalik's new work: EIP-8037 may be the only way for Ethereum's secure scalability.

CN
19 minutes ago
The Gas rules are not set in stone, and how to deal with future hard forks for unupgradeable contracts.

Written by: Vitalik Buterin

Translated by: Luffy, Foresight News

The objective of EIP-8037 is to separate the two types of scalability bottlenecks of Ethereum: to significantly enhance computation power in the execution layer (scalability in computing power is relatively easy), while keeping the growth of state data to a very small scope (state scalability is very difficult).

This is currently the most feasible solution for balancing scalability and security, and this article will:

  • Explain the underlying logic for the introduction of EIP-8037
  • Clarify why solutions similar to EIP-8037 are nearly the only way for Ethereum to achieve secure scalability
  • Explore ways to mitigate the drawbacks of this solution: measures that have already been implemented, new measures that can be added, and which problems cannot be fundamentally resolved by similar solutions
  • Discuss communication issues: why developers may have biased expectations about future changes to the EVM
  • Answer a question: what rules should developers writing unupgradeable contracts and applications follow to ensure contract safety in all subsequent upgrades of the strawmap.org roadmap

Background: The capacity limits of different resources in Ethereum

Over the past decade, Ethereum has had two widely recognized core objectives: 1) to maintain decentralization and security; 2) to achieve scalability.

In order to achieve scalability without sacrificing security and decentralization, we must first understand the resource constraints of Ethereum: if we simply raise the Gas limit and change nothing else, where will the problems arise?

The Ethereum network currently has to bear several types of resource pressure:

179481429326621.jpg

A rough estimation: if the Gas limit is increased tenfold, the pressures on the above items will also roughly increase tenfold. A tenfold increase in average verification time is still acceptable (a laptop node would struggle but could still function); however, a tenfold increase in the remaining three items is unacceptable.

Except for the Blob data solution, any scalability action in Ethereum will affect the latter three items:

  • Scaling up computation power → raises the worst-case scenario block verification time
  • Scaling up call data → raises the block broadcast time
  • Scaling up state (new storage, new accounts) → causes a massive increase in state volume. The larger the state volume, the higher the disk usage, the slower the node synchronization, the harder it is to achieve full synchronization, and the slower the execution layer's read/write speed for states

Next, let’s take a look at other proposals in the Glamsterdam upgrade package aside from EIP-8037:

  • EIP-7976: Raises the base price of call data (non-zero bytes from 40 to 64 Gas, zero bytes from 10 to 64 Gas), compressing the maximum call data volume per transaction
  • EIP-7928: Block-level access lists to support parallel verification, shortening verification times and speeding up node synchronization
  • EIP-8038: Raises the Gas cost of state read/write operations
  • EIP-7732 (ePBS): Extends the block security verification limit from approximately 2 seconds to half a Slot (6 seconds)

We update the comparison table, assuming the Gas limit is raised tenfold while also implementing the above proposals, but not including EIP-8037:

179481429347573.jpg

There are no issues on the computation execution side. The pressure on call data is also close to manageable, and subsequent EIP-8279 and EIP-8131 (within Hegota’s plan) can push the worst-case costs down even further, while peer-to-peer network optimization will continue to reduce broadcast delays; EIP-8288 can also move signature and proof out of call data, further freeing up space.

In other words, in terms of computation power, call data, and broadcasting, coupled with the Glamsterdam and Hegota upgrades, Ethereum could even withstand a Gas limit increase greater than tenfold. The only sticking point is the growth in state volume.

When a certain type of resource bottleneck becomes more severe, Gas must be repriced

For over a decade, Ethereum has followed one principle: the Gas price of an operation must match the actual burden it places on the entire network. If operation A puts ten times the burden on the network as operation B, the Gas price must reflect that tenfold difference. A typical example is SLOAD (reading storage), which has seen multiple price increases since EIP-150, including EIP-1884 and EIP-2929.

EIP-8037 addresses this imbalance in resource pressure by significantly raising the cost of newly creating state, whether it’s new storage slots, contract deployments, or new accounts. Below is the cost comparison provided by the proposal:

179481429367138.jpg

State Gas does not count toward the single transaction limit of 16.7 million Gas, so deploying a 24KB contract remains feasible

EIP-8037 also completes the rules: no matter how an account is created (even if it's just transferring ETH to a non-existent address), the high state Gas must be paid; there will be no loopholes anymore.

This pricing also supports further increases: the initial value of the CPSB parameter that determines the base state Gas is 1530; as the Gas limit continues to rise, this value can also be increased.

The core consensus is that the scalability space for computation power and call data will continue to grow; however, the ceiling for state scalability is very low. The state is data that nodes must completely hold to operate, and it cannot be simply sharded.

Are there any alternative solutions?

Theoretically, there are four possible routes:

  • Ethereum no longer scales
  • Accept state inflation without limits, moving toward centralization
  • Do not raise the Gas for new state but reduce the Gas for all other operations
  • Design a mechanism to separate this additional state cost from normal execution Gas and pay for them separately

Solution 1 conflicts with mainstream community demands; Solution 2 directly undermines Ethereum's underlying security commitments; Solution 3 has been discussed but rejected: the costs are too high. It requires lowering the prices for all instructions, precompiled contracts, call data, Blobs, and logs, which introduces more unknown risks; moreover, after scaling exceeds three times, the price for fundamental instructions (like ADD, PUSH) could fall below 1 Gas, necessitating significant protocol changes.

The remaining Solution 4 is the route chosen by EIP-8037, and it can only address part of the problem.

State Gas reservoir mechanism

EIP-8037 is a step toward multi-dimensional Gas in Ethereum: a single transaction has two sets of Gas limits, one for ordinary execution Gas, and the other for the state Gas reservoir. By default, Gas within 16.7 million counts as execution Gas; any excess goes to the reservoir. EIP-8141 allows transactions to explicitly specify these two limits without the need for accounts to hold a balance to pay for Gas exceeding 16.7 million.

New state creation operations will prioritize consuming Gas from the state reservoir; only when the reservoir is depleted will regular execution Gas be used. The reservoir is completely open to sub-calls: parent calls can limit how much execution Gas sub-calls can use but cannot prevent them from using the reservoir.

179481429391386.jpg

This approach is similar to EIP-2930. When the price increase from EIP-2929 caused contract issues, EIP-2930 introduced access lists where users prepay storage read fees at the beginning of the transaction, making reads cheaper during execution. The reservoir mechanism addresses several pain points:

  • Supports deploying large contracts that consume far more than 16.7 million Gas
  • Fixed Gas limits for calls that will create new storage slots can still run normally in reservoir-enabled transactions
  • Parents can reserve a portion of Gas as a safety net: even if the sub-call consumes all its Gas, the parent call still has reserved Gas to complete; the reservoir mechanism also protects this type of completion logic

In the long run, this framework supports setting different Gas limits, target values, and Gas prices at the block level for various dimensions (new states, execution power, state read/write), with the Gas reservoir potentially expanding into multiple dimensions. This is also the relatively least negative impact implementation of the most difficult problems I discussed in my article on "Multi-dimensional Gas."

However, the reservoir cannot solve all problems, and the core issues that remain are:

  • The model for a single transaction to surpass 16.7 million Gas is not elegant. EIP-8141 will improve this, but it requires waiting for the next hard fork; application front-ends will need significant adaptations.
  • Some systems (like cross-chain bridges) have transaction parameters hard-coded in the backend, making upgrades very difficult.
  • The reservoir is optional: for cases like the OP Stack bridge with a hard limit of 40,000 Gas, attackers can trigger state writes by submitting transactions that do not utilize the reservoir, causing intended successful calls to fail, while the transaction itself would still be confirmed, enabling malicious disruptions.
  • Gas refunds change to immediate refunds (EIP-3529 is a unified refund at transaction completion), the GAS instruction return values could suddenly increase.
  • EIP-8038 raises the cost of SSTORE (from 5000 to 12100), and it does not have the reservoir mechanism to back it up; some contracts will be affected.
  • Once the reservoir is used, the GAS instructions cannot accurately account for the total Gas consumed by sub-calls; compatibility with UserOperation of ERC-4337 is very challenging unless specific adaptation logic is developed.

There are some alternative remedial ideas for these pain points, but each has its cost:

  • Reverting to unified refunds at the end of transactions: this only helps a small portion of applications, and changing this during the Glamsterdam launch phase incurs high costs.
  • Revoke EIP-8038: this would directly compress the scalability limit by about 2.4 times.
  • Add a reservoir for state read/write now.
  • Speed up the implementation of EIP-8141 by launching this transaction type directly in Glamsterdam (temporarily abandoning support for the memory pool).
  • Differentiate "empty storage slots" and "storage slots with values of 0" and create new instructions to zero out empty slots.
  • Change the rules so that when a sub-call runs out of Gas, the whole transaction / entire call frame rolls back. This can fix OP Stack bridge issues but could break more existing systems (including ERC-4337).
  • Grant exemptions to old contracts: but with a penalty tax, extra Gas is burned when calling an exempt contract to prevent bypassing state cost controls.

Another approach: use milder parameters when EIP-8037 goes live. But this proposal does not work for the OP Stack bridge, as even a slight increase in state Gas would exceed its hardcoded limit of 40,000 Gas.

In summary, these remedial schemes involve deep protocol changes and carry new risks, which would seriously slow down the progress of scalability and quantum-resistance upgrades. The prevailing view among core developers is to prioritize collaboration with application developers to repair all affected contracts before the Glamsterdam launch instead of continuing to make major protocol-level changes. Supporting actions include: delaying the Glamsterdam launch (already implemented), publicly communicating issues (already started, multiple public discussions and online meetings organized), and allocating resources to investigate and fix all affected issues (relevant work has already begun).

What should application developers do right now?

Ethereum's scalability inherently implies “different resources scale at different paces”: computing power scales best, state read/writes and call data have medium difficulty, while state volume is the hardest. To achieve differentiated scalability, adjustments must be made to the relative Gas costs of various operations; EIP-8037 + EIP-8038 is already the solution with the least negative impact.

Of course, we could introduce some remedial plans at the protocol level, but such solutions are extremely costly to develop, carry inherent risks, and would severely slow down the progress of scalability and quantum safety upgrades. Because of this, the vast majority of core developers believe that to balance security and development, the main focus should be on another path — closely collaborating with application developers to ensure that all applications affected by EIP-8037 and EIP-8038 can effectively be repaired before the Glamsterdam upgrade goes live.

Measures related to this include:

  • Delaying the Glamsterdam upgrade (this has already been implemented)
  • Publicly disclosing relevant issues (already initiated, organized multiple public discussions and online meetings)
  • Investing resources to investigate and fix all affected issues (relevant work has already started)

What should developers of unupgradeable contracts do?

Application developers may have a very reasonable question: I want to write unupgradeable contracts (meaning without centralized control or governance authority over upgrade permissions), as Ethereum's core value is to provide applications with such strong guarantees for users.

So if I want to write a contract that will not become obsolete in the next hard fork, what should I do?

In response to this event, the answer is quite clear: do not assume that the Gas pricing rules are permanently fixed. This principle has been a consensus among early core developers and within the security community for many years.

The crux of the matter is that early core developers took it for granted that "do not assume Gas prices will remain unchanged forever" was common knowledge, but they did not realize that since 2021, this experience had not been organized into documentation or reiterated. As a result, many newer developers, with limited information channels, have no idea that this was a default premise of the group of developers who formulated EIP-8037.

In my opinion, the correct approach going forward is to formalize these "unwritten rules": to reach a clear consensus, clarify which functions in the protocol are open to change, and ensure comprehensive publicity so that it truly becomes the industry consensus.

This is feasible because the roadmap on strawmap.org is already quite mature; any changes that would disrupt compatibility can be accurately predicted in advance.

Below is a list I compiled, outlining expected changes to Ethereum’s functionalities in the future:

  • All contents related to the Gas mechanism. In general, the Gas limit should be set by the party bearing the losses due to Gas setting errors. In most scenarios, applications unconsciously adhere to this logic: when users initiate transactions with insufficient Gas, it is the users who suffer, and the transaction Gas limit is controlled by the user's wallet. What remains is to fully implement this logic, and not hardcode the Gas limit in code. I also advise against assuming that "sub-calls can allocate less than the full quota of Gas" will be retained permanently. After EIP-8141 goes live, this mechanism will likely be removed to simplify the protocol.
  • The state tree and block hash solution. In the future, the state tree will likely be changed to a partitioned binary tree based on Keccak, and the block structure and receipts will also change to a Keccak-based SSZ encoding format.
  • The finite field used for Blob point evaluation. It currently uses BLS-12-381, approximately a 253-bit field, which will be changed to a 128-bit binary finite field in the future.
  • Other modifications to the Blob structure. Due to the finite field change, the maximum capacity of a single Blob will be adjusted to a standardized 2¹⁷ bytes, and additionally, there may be larger changes to the Blob.
  • ECRECOVER. It will become a stateful instruction. This change is to ensure that the upgrade to a quantum-resistant version of accounts won't expose them to risks due to off-chain pre-authorization mechanisms.
  • All aspects of the consensus layer. Over the next two years, the consensus algorithm is likely to undergo disruptive adjustments. Validator participation rules, reward and penalty mechanisms, distributed verification technologies (DVT), light client protocols, etc., will all be subject to change.
  • Slot time. The block slot number can no longer be used as a timestamp because the slot intervals will shorten.
  • The feasibility of distributed block construction schemes. ePBS, FOCIL, and subsequent upgrades will continue to significantly change this mechanism.
  • Transaction formats. Old transaction types will likely be gradually phased out; in a few years, the only supported transaction format may be EIP-8141 transactions that adopt SSZ serialization.

The EVM itself is not included in this list, even if the protocol layer is changed to a new instruction set (such as RISC-V or a better scheme). The reason is that we already have mature solutions to add compatibility layers within the new architecture, allowing the execution logic of EVM code to remain completely consistent with the original. The only thing that will change is still the Gas cost.

This list is merely something I compiled in a few hours. Ideally, core developers should collaborate to produce a more comprehensive blacklist specifying which features are expected to change, preferably also accompanied by a whitelist marking which features are unlikely to change at all. Most of the items on the list are technical, and ordinary applications will not default to touching these pitfalls. However, there are many edge cases, and we must proactively push to initiate this work as soon as possible.

免责声明:本文章仅代表作者个人观点,不代表本平台的立场和观点。本文章仅供信息分享,不构成对任何人的任何投资建议。用户与作者之间的任何争议,与本平台无关。如网页中刊载的文章或图片涉及侵权,请提供相关的权利证明和身份证明发送邮件到[email protected],本平台相关工作人员将会进行核查。

Share To
APP

X

Telegram

Facebook

Reddit

CopyLink