EIP.tools

EIP.tools

⚠️ DraftStandards Track: Core

EIP-8208: Increase Maximum Contract Size to 64KiB

Raise the maximum contract code size from 32KiB to 64KiB and initcode size from 64KiB to 128KiB.

Authors
Created2026-03-28
Discussion Linkhttps://ethereum-magicians.org/t/eip-8208-increase-maximum-contract-size-to-48kb/24509
Requires

Markdown

https://raw.githubusercontent.com/ethereum/EIPs/re...
Pull Request#11462PR open

EIP-GPT summary

Contents
AbstractMotivationSpecificationParametersCode size limitsRationaleBackwards CompatibilitySecurity ConsiderationsCopyright

Abstract

This EIP raises the maximum contract code size from 32KiB to 64KiB and the maximum initcode size from 64KiB to 128KiB.

Motivation

Even with EIP-7954 raising the limit from 24KiB to 32KiB, complex protocols and on-chain libraries continue to hit the ceiling. Developers resort to proxy patterns and contract splitting, which increase deployment cost, complexity, and attack surface.

Raising the limit to 64KiB provides meaningful headroom while remaining conservative relative to block gas limits and state growth. The 2:1 ratio between initcode and runtime code limits established by EIP-3860 is preserved.

Specification

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 and RFC 8174.

Parameters

ParameterValue
MAX_CODE_SIZE65536 (0x10000, 64KiB)
MAX_INITCODE_SIZE131072 (0x20000, 128KiB)

Code size limits

  1. The EIP-170 contract code size limit is raised from 32KiB to MAX_CODE_SIZE (64KiB).
  2. The EIP-3860 initcode size limit is raised from 64KiB to MAX_INITCODE_SIZE (128KiB).

The INITCODE_WORD_COST of 2 gas per 32-byte word defined in EIP-3860 remains unchanged.

Rationale

  • Developer flexibility: Eliminates the most common reason for proxy-based contract splitting, reducing deployment complexity and gas overhead.
  • Power of two: 64KiB (2^16) is a natural boundary that aligns with common memory page sizes and simplifies tooling.
  • Preserved ratio: The 2:1 initcode-to-runtime ratio from EIP-3860 is maintained at 128KiB initcode for 64KiB runtime.
  • Backward compatibility: All existing contracts remain valid. Only new deployments may take advantage of the increased limit.

Backwards Compatibility

This change is not backwards compatible and MUST be activated via a network upgrade. It assumes EIP-7954 has already been activated.

After activation, contracts up to 64KiB in size will be deployable. Existing contracts are unaffected.

Security Considerations

Larger contracts increase the worst-case cost of EXTCODECOPY and EXTCODESIZE operations. However, these opcodes already charge gas proportional to the size of the code accessed, so the economic cost scales accordingly.

The maximum single-contract code size of 64KiB remains small relative to the total state size and block gas limits. Deploying a maximum-size contract requires paying for the full calldata cost of the initcode plus the code deposit cost, which acts as a natural economic deterrent against state bloat.

Copyright and related rights waived via CC0.

EIP.tools

EIP.tools

Search, read, and map Ethereum improvement proposals, ERCs, RIPs, and CAIPs from one focused interface.

Farcaster
by @apoorveth