In this track: Execution traces and low-level calls
advanced · 4 MIN READ

Code size and deployment limits

Runtime size, init-code size and execution gas are separate constraints.

LET’S PICTURE IT

A package can have limits on both the setup manual and the installed machine.

SEE IT FOR YOURSELF
A valid counter call, step by stepStep 1 / 4
A valid counter call, step by stepFunction requestincrement()No argumentsBefore executionstored count0A local teaching example with a defined starting stateIncoming callCheck function dispatchCheck coded conditionsRules passConditions passContinue executionA failed check can revert insteadCalculation0 + 1Result: 1Storage writecount = 1Persists if call succeedsCalculating a local value and storing it are separate stepsPersistent statecount1Later readGetter reports 1No new incrementState, logs and browser display have different roles

This example begins with count zero and a request to call increment(). No real contract is deployed.

Animated local teaching model. No wallet, RPC or live blockchain data. Some labels and hashes are abbreviated for readability.

Distinguish the two byte sequences

Runtime code is the installed program. Init code is the creation program, potentially including constructor arguments. A limit on one does not automatically describe the other.

Label the cited limits

EIP-170 specifies a 24,576-byte runtime code cap. EIP-3860 specifies a 49,152-byte init-code cap and additional init-code metering under its rules.

Retain fork assumptions

These are named protocol rules rather than universal limits for every EVM-like network forever. Confirm the target chain and fork before treating a numeric limit as applicable.

Measure compiler artifacts

Inspect actual compiled byte lengths with the intended settings. Source file length, comment count and ABI JSON size do not establish runtime deployment size.

Follow the execution

EIP-170 runtime cap: 24,576 bytes
EIP-3860 init-code cap: 49,152 bytes

Check the intended chain/fork and actual compiled artifact.

A local conceptual trace with explicit assumptions; this is not a trace of a live transaction.

QUICK CHECK · NO PRESSURE

Does source-file text length directly determine the runtime code size?

Your progress stays in this browser.
Keep exploring the original referenceEthereum Improvement Proposals ↗

Original explanations by EtherTools. Examples are educational and source-linked; this site is independent of the Ethereum Foundation. Our approach.