MIP-20: Linear Code-Loading Costs

In Monad, operations that load code (calls, EXTCODESIZE, EXTCODECOPY, etc.) from the database are priced at a flat rate, independent of code size, intended to cover both the database I/O and the cost of jumpdest analysis on the loaded code: contract size is capped at 128KiB (MIP-2), so any such operation performs a bounded amount of work.

This MIP proposes a change to gas pricing for these operations that replaces constant pricing with a linear regime, where the cost to load cold contract code from the database is linear in the size of the contract code. Because this cost is charged before the code is loaded, clients must be able to determine the size of contract code without loading it; EXTCODESIZE, which requires only the size, is therefore priced independently of code size.