ECIP 1109: Spiral EVM and Protocol Upgrades Source

AuthorChristos Ziogas, Diego López León, Isaac Ardis
Discussions-Tohttps://github.com/ethereumclassic/ECIPs/discussions/511
StatusAccepted
TypeMeta
Created2023-05-10

Simple Summary

Enable the outstanding Ethereum Foundation Shanghai network protocol upgrades on the Ethereum Classic network in a hard-fork code-named Spiral to enable maximum compatibility across these networks.

Abstract

Add support for a subset of protocol-impacting changes introduced in the Ethereum Foundation (ETH) network via the Shanghai network upgrade. The proposed changes for Ethereum Classic’s Spiral upgrade include:

EIP Description Status
3651 Warm COINBASE Include
3855 PUSH0 instruction Include
3860 Limit and meter initcode Include
6049 Deprecate SELFDESTRUCT Include
4399 Supplant DIFFICULTY opcode with PREVRANDAO Omit
4895 Beacon chain push withdrawals as operations Omit

Beacon chain withdrawals are omitted at this time as they are not applicable for Ethereum Classic.

EIP Summaries and expected action

Included
  • EIP 3651 “Warm COINBASE”: Lowers the price of accessing the coinbase account following the access list framework introduced in EIP-2929.
  • EIP 3855 “PUSH0 instruction”: Introduces the PUSH0 (0x5f) instruction, which pushes the constant value 0 onto the stack.
  • EIP-3860 “Limit and meter initcode”: Limits the maximum size of initcode to 49152 bytes and apply extra gas cost of 2 for every 32-byte chunk of initcode
Omitted
  • EIP 4399 “Supplant DIFFICULTY opcode with PREVRANDAO”: Historically, the DIFFICULTY (0X44) instruction was used as a source of pseudo randomness. With the switch to Proof of Stake, Ethereum removed the work difficulty so, as a replacement, they now expose a RANDAO value taken from the beacon chain. Since v0.8.18, Solidity deprecates block.difficulty and replaces it with block.prevrandao but this syntactic change still compiles to the same EVM opcode, i.e. 0x44, which in the Ethereum Classic network will continue to evaluate as the aforementioned block difficulty value.
  • EIP 4895 “Beacon chain push withdrawals as operations”: In Proof of Stake networks, enable validator withdrawals from the beacon chain to the EVM. Ethereum Classic network only grants rewards through Proof of Work mining on the canonical chain, there are no validators, so this doesn’t apply.

This document proposes the following blocks at which to implement these changes in the Ethereum Classic networks:

  • 9_957_000 on Mordor testnet
  • 19_250_000 on Ethereum Classic mainnet

For more information on the opcodes and their respective EIPs and implementations, please see the Specification section of this document.

Motivation

To enhance the Ethereum Virtual Machine’s (EVM) capabilities, various opcodes shall be added to the Ethereum Classic networks, all of which have been in use on the Ethereum Foundation networks since late 2022.

Specification

Technical specifications for each EIP can be found at those documents respectively:

Rationale

Interoperability: Establishing and maintaining interoperable behavior between Ethereum clients is essential for developers and end-user adoption, yielding benefits for all participating chains (e.g., ETH and ETC, Sepholia and Mordor).

Immutability: None of the introduced new opcodes in the EVM has the potential to change the behavior of existing contracts. Adding opcodes to the EVM increases its functionality and should be considered a feature upgrade rather than a modification.

While this means no currently executable contract is affected, it states deployment of new data contracts starting with the 0xEF byte.

Implementation

Adoption of the content of this ECIP requires a hard fork as it introduces changes that are not backward compatible.

The following clients with Ethereum Classic support implement the Mystique features currently and will be able to support the Spiral upgrade:

  • Core-Geth (maintained by ETC Cooperative)
  • Hyperledger Besu (maintained by ConsenSys)

Copyright and related rights waived via CC0.