|Christos Ziogas, Diego López León, Isaac Ardis
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.
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:
|Limit and meter initcode
|Supplant DIFFICULTY opcode with PREVRANDAO
|Beacon chain push withdrawals as operations
Beacon chain withdrawals are omitted at this time as they are not applicable for Ethereum Classic.
EIP Summaries and expected action
- 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
- 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.difficultyand replaces it with
block.prevrandaobut 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_000on Mordor testnet
19_250_000on Ethereum Classic mainnet
For more information on the opcodes and their respective EIPs and implementations, please see the Specification section of this document.
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.
Technical specifications for each EIP can be found at those documents respectively:
- EIP-4399: Supplant DIFFICULTY opcode with PREVRANDAO
- EIP-3651: Warm COINBASE
- EIP-3855: PUSH0 instruction
- EIP-3860: Limit and meter initcode
- EIP-6049: Deprecate SELFDESTRUCT
- EIP-4895: Beacon chain push withdrawals as operations
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.
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.