This is a headliner proposal for EVM64 for Glamsterdam.
Summary
Headliner proposal for EVM64.
Option A is EVM64 with prefix opcode 0xC0
.
- EIP-7937 of EVM64 for endianness-independent arithmetic, comparison, bitwise and flow operations.
- EIP-9819 for EOF support.
- EIP-9821 for little-endian
BYTE64
,MLOAD64
,MSTORE64
andPUSH*64
opcodes.
Option B is “pure” EVM64 via EOF code section.
- EIP-9834 which defines an extended version of
types_section
for EOF. - EIP-9835 which defines the EVM64 code section type.
Detailed justification
The benefit of this proposal includes:
- Improve throughput and reduce gas costs for writing computationally intensive algorithms in EVM. Many algorithms cannot utilize the full 256-bit.
- Make EVM JITs / AOTs, as well as EVM-to-RISCV recompilers in the future, more attractive. At this moment, any EVM contract re-compile will be roughly 4x the size (because 1 256-bit op will be at least 4 64-bit ops), which is a considerable bottleneck.
Why consider the inclusion now:
- There are an increasing amount of EVM contracts on-chain that are computationally intensive nowadays, especially for rollups. Many of them wait for certain precompiles on-chain. But precompiles can’t foresee all possible use cases. EVM64 provide with them a possible alternative path that does not depend on Ethereum network upgrades.
- With the beginning of the recent discussions of potential RISC-V contracts on Ethereum, EVM64 prepares us for the future when we eventually need EVM-to-RISCV recompilation.
Stakeholder impact
- Positive: An important tool for smart contract developers for computationally intensive contracts.
- Negative: Implementation complexity for core devs.
Technical readiness
The core EIP (EIP-7937) is specification-ready. Benchmarks are being worked on. A reference implementation is available in rust-evm.
Security & open questions
The core EIP (EIP-7937) has no known open questions.
The design of the optional additional EIP with regards to BYTE64
, MLOAD64
, MSTORE64
, PUSH*64
is ready, but additional discussions about endianness is still open.
For past discussions and reviews about EIP-7937 please also see the Github PR.