EIP-7957 - EVM64 - EOF support

Created 2025-05-26
Status Draft
Category Core
Type Standards Track
Authors
Requires

Abstract

This EIP defines EOF support for EVM64 with its additional code validation rules and RJUMPI, RJUMPV opcodes.

Motivation

EOF defines a stricter stricter code validation rule to improve efficiency. Due to EVM64 using multibyte opcode (the mode opcode C0), a small adaptation is needed. This EIP also additionally defines a 64-bit mode RJUMPI and RJUMPV to be 64-bit.

Specification

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 and RFC 8174.

We define the following gas cost constant:

Name Gas
G_RJUMPIV64 3

At EOF contract creation time as defined in EIP-3670, if the opcode C0 is encountered and it is not part of PUSH opcode's data, then the interpreter MUST validate that:

For flow operations RJUMPI and RJUMPV, the 64-bit mode has following changes:

Note that:

Rationale

For detailed rationale discussion, please see the core EVM64 definition EIP-7937.

Backwards Compatibility

No backward compatibility issues found.

Test Cases

To be added.

Reference Implementation

To be added.

Security Considerations

Needs discussion.

Copyright

Copyright and related rights waived via CC0.