EIP-8337: Validated EVM Code

Discussion topic for EIP-8337

Code can be prefixed with MAGIC bytes. The complete control flow of MAGIC code can be traversed in time and space linear in the size of the code, enabling better tools for validation, static analysis, JIT and AOT compilers, ZK work, and more. On-chain, MAGIC code is validated at CREATE time to ensure that it will not execute invalid instructions, jump to invalid locations, underflow stack, or, in the absence of recursion, overflow stack.

These changes are backwards-compatible:the new instructions behave as specified whether or not they appear in MAGIC code.

Update Log

  • yyyy-mm-dd: initial draft

External Reviews

None as of yyyy-mm-dd.

Outstanding Issues

Once issues are addressed, these becomes:

None as of yyyy-mm-dd.