Skip to content

Latest commit

 

History

History
32 lines (20 loc) · 1.22 KB

REP-0023.md

File metadata and controls

32 lines (20 loc) · 1.22 KB

REP-0023: Increase max code size limit to 32KB

Preamble

REP-0023
Title: Increase max code size limit to 32KB
Author: Ronin Core Team
Type: Standard Track
Status: Approved
Created: 2024-08-07

Abstract

This proposal specifies to increase max contract code size limit to 32KB.

Rationale

The author proposes raising the limit to 32KB to allow for the deployment of more complex contracts without needing to resort to alternative development patterns.

Specification

the MAX_CODE_SIZE limit set in EIP-170 changes from 0x6000 (2**14+2**13) bytes to 0x8000 (2**15) bytes. If contract creation initialization returns data with length of more than 0x8000 bytes, contract creation fails with an out of gas error.

Security analysis

MAX_CODE_SIZE was implemented to mitigate an attack vector where the process of reading code from disk, which has a quadratic complexity of O(n), was being charged a constant amount of gas. However, since this limit was introduced, data fetching has become faster, so raising the limit will not pose a problem.

License

The content is licensed under CC0.