REP-0023 Title: Increase max code size limit to 32KB Author: Ronin Core Team Type: Standard Track Status: Approved Created: 2024-08-07
This proposal specifies to increase max contract code size limit to 32KB.
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.
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.
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.
The content is licensed under CC0.