EIP-7903 Removing the initcode size limit (Remove Initcode Size Limit)

No call decision · EVM & execution · EIP status Stagnant · created 2025-03-05

This removes the 49152-byte initcode size limit introduced by EIP-3860. The per-byte gas cost is left unchanged; only the artificial cap is removed.

Why it is needed

Ethereum limits deployed contract code to 24576 bytes under EIP-170. Because of this, large contracts are split into deployed as several smaller physical contracts, and high-level language (HLL) compilers handle this split on the developer's behalf so the contract appears as a single large contract. However, EIP-3860 limited the initcode used to create a contract to 49152 bytes, meaning a logical contract larger than this can no longer be deployed in a single transaction. It must instead be deployed across multiple transactions, breaking the abstraction the high-level language was trying to provide. This proposal holds that since initcode is already charged gas per byte, costs are already fairly imposed, so it is safe to remove the artificial size cap.

What changes

Today

After EIP-7903

Who is affected

In depth

What is being reverted

This removes the 49152-byte initcode cap on contract creation that EIP-3860 introduced. On the other hand, the gas cost that EIP-3860 also introduced, the 2-gas-per-byte charge for JUMPDEST analysis, is left unchanged. The deployed contract code size limit (EIP-170, 24576 bytes) and the rest of the gas schedule are left untouched. It states explicitly that since this only lifts the cap without changing execution semantics, existing contracts and transactions are unaffected.

The argument that gas charging already controls costs

The source gives a three-layer cost structure as the reason initcode would not be abused even without a cap. First, gas that scales linearly with initcode size (2 gas per byte) fairly charges for the cost of JUMPDEST analysis. Second, the per-block gas limit acts as a natural cap; at the gas limit of 35 million cited in the source, initcode is limited to about 16MB. Third, initcode is data that has already been paid for via calldata or memory expansion costs, so an implicit cost is already applied.

Why remove the cap instead of raising it

Raising the cap to something like 98304 bytes was considered as an alternative but was rejected on the grounds that any number would be arbitrary. Since gas charging already mitigates resource-usage concerns, the judgment is that an artificial cap is unnecessary in the first place. In addition, the core justification for keeping EIP-170's 24576-byte limit is that 'high-level languages can abstract it away,' but EIP-3860's initcode cap forces multi-transaction deployment of large contracts, breaking that very abstraction. Removing the cap restores single-transaction deployment, which realigns with this philosophy.

Security review and benchmarks

The source states there is no new security risk. Since the current gas schedule already charges per byte for initcode, denial-of-service (DoS) concerns are already mitigated. Benchmarks were in fact run across bytecode ranging from 128 bytes to 15MB, and the per-byte processing time (ns/byte) reportedly stayed constant across the whole range. In other words, this is the basis for the claim that as initcode grows, processing cost only increases linearly in proportion to size.

Current status

This EIP is Standards Track (Core), was created on March 5, 2025, and its current status is Stagnant. It is not yet a finalized specification, and its content may change or progress may stall. The source's Test Cases section is empty, and there is no confirmed core developer call decision on fork inclusion.

Original EIP · ← EIPs