Fantom-foundation / Tosca

Other
12 stars 11 forks source link

Initialization Code may exceed the 24576 byte limit for code #290

Open HerbertJordan opened 8 months ago

HerbertJordan commented 8 months ago

This issue was discovered and reported by @HonzaDajc:

While contracts stored in the chain are limited to 24576 bytes, code initialising a contract is unlimited in size. In particular, such a code may exceed 64k, and thus the limit of the 2-byte PC counter currently used by the LFVM. Such a case was encountered in the Ethereum mainnet history.

The Tosca VM implementations need to be adapted to be able to handle larger input codes.

HerbertJordan commented 8 months ago

Two proposals that have been proposed by @HonzaDajc on how to handle the problem: