主页EIPs周刊
EIPsEIP-7957
EIP-7957

EVM64 - EOF support

EVM Object Format support for EVM64
DraftStandards Track: Core
创建时间: 2025-05-26
关联 EIP: EIP-3540, EIP-3670, EIP-4200, EIP-7937
Wei Tang (@sorpaas)
社区讨论原文链接编辑
1 分钟了解
欢迎补充好内容
去提交
相关视频
欢迎补充好内容
去提交
正文

Abstract

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

Motivation

EOF defines a 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:

NameGas
G_RJUMPIV643

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:

  • The next opcode exists.
  • The next opcode is RJUMPI64, RJUMPV64, or one of the core 64-bit opcode defined in EIP-7937 minus JUMP64 and JUMPI64.

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

  • For RJUMPI64 (0xc0e1), the condition popped from stack is only read for the last 64 bits. Gas cost is G_RJUMPIV64.
  • For RJUMPV64 (0xc0e2), the case popped from stack is only read for the last 64 bits. Gas cost is G_RJUMPIV64.

Note that:

  • RJUMP is automatically in 64-bit mode because it does not read or write the stack.

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 and related rights waived via CC0.

扩展阅读
欢迎补充好内容
去提交

不想错过最新的 EIP 动态?

订阅 EIPs Fun 周刊以跟进相关更新,建⽴你与 EIP 之间的连接 ,更好地建设以太坊。

详情
支持以太坊贡献者,推动生态建设
资源
GitHub