EIP Radar
@ 41a838d ·
EIP-3860

Limit and meter initcode

Limit the maximum size of initcode to 49152 and apply extra gas cost of 2 for every 32-byte chunk of initcode

FinalSplurge

Status history

  1. Draft16 Jul 2021
  2. Finaldate not observed

Abstract

We extend EIP-170 by introducing a maximum size limit for initcode (MAX_INITCODE_SIZE = 2 * MAX_CODE_SIZE = 49152). Furthermore, we introduce a charge of 2 gas for every 32-byte chunk of initcode to represent the cost of jumpdest-analysis. Lastly, the size limit results in the nice-to-have property that EVM code size, code offset (PC), and jump offset fits a 16-bit value.

Created
16 Jul 2021
Authors
Martin Holst Swende, Paweł Bylica, Alex Beregszaszi, Andrei Maiboroda
Upgrades
Requires
EIP-170
Required by
EIP-3540EIP-7830EIP-7873EIP-7903EIP-7954EIP-8311