From facb3fc6a28adeb7c945a2bb774895eea34068bd Mon Sep 17 00:00:00 2001 From: Bob Summerwill Date: Sun, 19 Jan 2020 13:21:57 -0800 Subject: [PATCH 1/5] This ECIP describes a Phoenix hard-fork which would replace Azltan. --- _specs/ecip-aztlan-redo.md | 106 +++++++++++++++++++++++++++++++++++++ 1 file changed, 106 insertions(+) create mode 100644 _specs/ecip-aztlan-redo.md diff --git a/_specs/ecip-aztlan-redo.md b/_specs/ecip-aztlan-redo.md new file mode 100644 index 000000000..fe9b53e52 --- /dev/null +++ b/_specs/ecip-aztlan-redo.md @@ -0,0 +1,106 @@ +--- +lang: en +ecip: Unassigned +title: Phoenix EVM and Protocol Upgrades +author: Bob Summerwill (@bobsummerwill) +status: Draft +type: Meta +created: 2020-01-19 +license: Apache-2.0 +discussions-to: https://github.com/ethereumclassic/ECIPs/issues/263 +--- + +### Simple Summary + +This ECIP describes a hard-fork which would replace +[ECIP 1061: Aztlán EVM and Protocol Upgrades (Yingchun Edition)](https://ecips.ethereumclassic.org/ECIPs/ecip-1061) to "fix" two issues with ECIP-1061 where the written specification +did not match the original intent. + +Enable the outstanding Ethereum Foundation _Istanbul_ network protocol upgrades on the Ethereum +Classic network without any gas-cost assumptions in a hard-fork code-named _Phoenix_ 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 +_Istanbul_ hardforks. The proposed changes for Ethereum Classic's _Phoenix_ upgrade include: + +- Add Blake2 compression function `F` precompile +- Reduce alt_bn128 precompile gas costs +- Add ChainID opcode +- Calldata gas cost reduction +- Net gas metering for SSTORE without dirty maps +- Addition of SELFBALANCE opcode + +The network participants who took part in the +[ETC Core Developers call](https://github.com/ethereumclassic/ECIPs/issues/177) on 27th November 2019 +were under the impression at the time that the scope we agreed ("Instanbul without the +backward-compatibility breaking parts of EIP-1884") - ECIP-1061 / ECIP-1072 - would move the ETC +protocol to a place where it was 100% compatible with the ETH mainnet. + +[Wei Tang](https://github.com/sorpaas)'s implementation of ECIP-1061 shortly afterwards revealed +two flaws in the specification, together with recommendations on how to address those shortcomings. + +This ECIP codifies [those recommendations](https://specs.corepaper.org/51-aztlanredo) in the form +of a replacement hard-fork which would happen instead of +[ECIP 1061: Aztlán EVM and Protocol Upgrades (Yingchun Edition)](https://ecips.ethereumclassic.org/ECIPs/ecip-1061) on a timeline still TDB. + + +### 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 end of 2019. + + +### Specification + +This document proposes the following blocks at which to implement these changes in the Classic networks: + +- TBD on Mordor Classic PoW-testnet +- TBD Kotti Classic PoA-testnet +- TBD on Ethereum Classic PoW-mainnet + +After HARD_FORK_BLOCK, apply the following changes. + +- Enable [EIP-152](https://eips.ethereum.org/EIPS/eip-152) +- Enable [EIP-1108](https://eips.ethereum.org/EIPS/eip-1108) +- Enable [EIP-1344](https://eips.ethereum.org/EIPS/eip-1344) +- Enable [EIP-2028](https://eips.ethereum.org/EIPS/eip-2028) +- Enable [EIP-1283](https://eips.ethereum.org/EIPS/eip-1283) with [EIP-1706](https://eips.ethereum.org/EIPS/eip-1706). +- Enable [50-SELFBALANCE](https://specs.corepaper.org/50-selfbalance) - TODO - create an ECIP for this. + + +### Rationale + +[ECIP 1061: Aztlán EVM and Protocol Upgrades (Yingchun Edition)](https://ecips.ethereumclassic.org/ECIPs/ecip-1061) as defined is "broken" and it would be inadvisable to activate on the ETC mainnet in +its current state. + +Two better options are: + +1. "fix it" and proceed on the existing timeline, if there is enough time to do that. +2. Withdraw it and build consensus for a new HF on a more conservative timeline. + + +### 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 _Istanbul_ features currently: + +- Parity Ethereum +- Multi-Geth +- Hyperledger Besu + +The author is unaware if any of these clients have implemented [EIP-1706](https://eips.ethereum.org/EIPS/eip-1706), but it is a very simple change, analogous to [EIP-2200](https://eips.ethereum.org/EIPS/eip-2200), which all the +codebases have already implemented. + +Similarly [50-SELFBALANCE](https://specs.corepaper.org/50-selfbalance) has not been implemented in any of these +codebases, but is just a "remix" of code which they have already implemented. + + +## Copyright + +This work is licensed under the [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0). The author, Bob Summerwill, attests to his sole authorship of this work, and that he is able to contribute this work to the ECIP process under the Apache 2.0 licence. + +He further attests that he neither holds nor is aware of any patents, trademarks, copyright issues or other IP hinderances associated with this work. From 2444b7a1e706ac7a1650b1686c50b21de212074b Mon Sep 17 00:00:00 2001 From: Bob Summerwill Date: Sun, 19 Jan 2020 14:31:59 -0800 Subject: [PATCH 2/5] Pointing to new SELFBALANCE opcode ECIP and updated Rationale. --- _specs/ecip-aztlan-redo.md | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/_specs/ecip-aztlan-redo.md b/_specs/ecip-aztlan-redo.md index fe9b53e52..039766f65 100644 --- a/_specs/ecip-aztlan-redo.md +++ b/_specs/ecip-aztlan-redo.md @@ -68,7 +68,7 @@ After HARD_FORK_BLOCK, apply the following changes. - Enable [EIP-1344](https://eips.ethereum.org/EIPS/eip-1344) - Enable [EIP-2028](https://eips.ethereum.org/EIPS/eip-2028) - Enable [EIP-1283](https://eips.ethereum.org/EIPS/eip-1283) with [EIP-1706](https://eips.ethereum.org/EIPS/eip-1706). -- Enable [50-SELFBALANCE](https://specs.corepaper.org/50-selfbalance) - TODO - create an ECIP for this. +- Enable [SELFBALANCE opcode](https://github.com/ethereumclassic/ECIPs/issues/266) ### Rationale @@ -76,10 +76,27 @@ After HARD_FORK_BLOCK, apply the following changes. [ECIP 1061: Aztlán EVM and Protocol Upgrades (Yingchun Edition)](https://ecips.ethereumclassic.org/ECIPs/ecip-1061) as defined is "broken" and it would be inadvisable to activate on the ETC mainnet in its current state. -Two better options are: +See [EIP 1884: Repricing for trie-size-dependent opcodes](https://eips.ethereum.org/EIPS/eip-1884) for +the original rationale for the gas-repricings for ETH. -1. "fix it" and proceed on the existing timeline, if there is enough time to do that. -2. Withdraw it and build consensus for a new HF on a more conservative timeline. +These changes are sensible, but they [broke 680 deployed Aragon smart contracts](https://www.coindesk.com/ethereums-istanbul-upgrade-will-break-680-smart-contracts-on-aragon) along with various other deployed +smart contacts by applying the repricings retroactively and unconditionally. + +The new SELFBALANCE opcode does not break backwards compatibility. For compatibility with ETH it is both +necessary and desirable. + +Short of imminent and catatrophic danger to the ETC network, making retroactive changes which break +backwards compatibility is counter to ETC values and philosophy. + +Gas-repricings to balance EVM gas prices with real world resource usage is entirely rational and is +happening on the ETC protocol too, but will be done in a backwards-compatible ways wherever possible. +Unconditional retroactive ("emergency") repricings would only happen when the network has been halted +or has been rendered unusable. + +An example of such a situation occurred following the Shanghai attacks on ETH and ETC networks: + +[ECIP 1015: Long-term gas cost changes for IO-heavy operations to mitigate transaction spam attacks](https://ecips.ethereumclassic.org/ECIPs/ecip-1015), which has ETC's equivalent to [ETH Tangerine Whistle](https://eips.ethereum.org/EIPS/eip-608), +with both chains implementing [EIP 150: Gas cost changes for IO-heavy operations](https://eips.ethereum.org/EIPS/eip-150). ### Implementation From 4bd057feac7f9b83bcdc3b4fb5dc39b36b33d467 Mon Sep 17 00:00:00 2001 From: Bob Summerwill Date: Sun, 19 Jan 2020 15:01:58 -0800 Subject: [PATCH 3/5] Sorpaas assigned ECIP-1079 to this ECIP and ECIP-1080 to self-balance. Update links appropriately. --- _specs/{ecip-aztlan-redo.md => ecip-1079.md} | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) rename _specs/{ecip-aztlan-redo.md => ecip-1079.md} (95%) diff --git a/_specs/ecip-aztlan-redo.md b/_specs/ecip-1079.md similarity index 95% rename from _specs/ecip-aztlan-redo.md rename to _specs/ecip-1079.md index 039766f65..4d5f114bd 100644 --- a/_specs/ecip-aztlan-redo.md +++ b/_specs/ecip-1079.md @@ -1,6 +1,6 @@ --- lang: en -ecip: Unassigned +ecip: 1079 title: Phoenix EVM and Protocol Upgrades author: Bob Summerwill (@bobsummerwill) status: Draft @@ -68,7 +68,7 @@ After HARD_FORK_BLOCK, apply the following changes. - Enable [EIP-1344](https://eips.ethereum.org/EIPS/eip-1344) - Enable [EIP-2028](https://eips.ethereum.org/EIPS/eip-2028) - Enable [EIP-1283](https://eips.ethereum.org/EIPS/eip-1283) with [EIP-1706](https://eips.ethereum.org/EIPS/eip-1706). -- Enable [SELFBALANCE opcode](https://github.com/ethereumclassic/ECIPs/issues/266) +- Enable [ECIP-1080](https://github.com/ethereumclassic/ECIPs/issues/266) ### Rationale @@ -112,8 +112,7 @@ The following clients with Ethereum Classic support implement the _Istanbul_ fea The author is unaware if any of these clients have implemented [EIP-1706](https://eips.ethereum.org/EIPS/eip-1706), but it is a very simple change, analogous to [EIP-2200](https://eips.ethereum.org/EIPS/eip-2200), which all the codebases have already implemented. -Similarly [50-SELFBALANCE](https://specs.corepaper.org/50-selfbalance) has not been implemented in any of these -codebases, but is just a "remix" of code which they have already implemented. +Similarly [ECIP-1080](https://github.com/ethereumclassic/ECIPs/issues/266) has not been implemented in any of these codebases, but is just a "remix" of code which they have already implemented. ## Copyright From 65ee3b6b45a1f9e75c33d718a09dd698f3830c8c Mon Sep 17 00:00:00 2001 From: Bob Summerwill Date: Mon, 20 Jan 2020 19:20:29 -0800 Subject: [PATCH 4/5] Added copyright and sourcing for Core Paper to Copyright section in addition to attestation and thanks higher up. --- _specs/ecip-1079.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/_specs/ecip-1079.md b/_specs/ecip-1079.md index 4d5f114bd..12e65519e 100644 --- a/_specs/ecip-1079.md +++ b/_specs/ecip-1079.md @@ -120,3 +120,9 @@ Similarly [ECIP-1080](https://github.com/ethereumclassic/ECIPs/issues/266) has n This work is licensed under the [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0). The author, Bob Summerwill, attests to his sole authorship of this work, and that he is able to contribute this work to the ECIP process under the Apache 2.0 licence. He further attests that he neither holds nor is aware of any patents, trademarks, copyright issues or other IP hinderances associated with this work. + +Core Paper +Copyright 2019-2020 Wei Tang + +This product includes specifications developed at +The Core Paper project (https://corepaper.org/). From 2752eed379194e89bc92c7bdfb617e9f9d5f356d Mon Sep 17 00:00:00 2001 From: Bob Summerwill Date: Sun, 26 Jan 2020 17:26:24 -0800 Subject: [PATCH 5/5] Corrected boilerplate copyright notice which had been cut-and-pasted from earlier ECIP. It was inappropriate in this example. --- _specs/ecip-1079.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/_specs/ecip-1079.md b/_specs/ecip-1079.md index 12e65519e..d95767786 100644 --- a/_specs/ecip-1079.md +++ b/_specs/ecip-1079.md @@ -117,12 +117,12 @@ Similarly [ECIP-1080](https://github.com/ethereumclassic/ECIPs/issues/266) has n ## Copyright -This work is licensed under the [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0). The author, Bob Summerwill, attests to his sole authorship of this work, and that he is able to contribute this work to the ECIP process under the Apache 2.0 licence. +This proposal is licensed under the [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0), +based on specifications developed by Wei Tang within the Core Paper project (https://corepaper.org/). -He further attests that he neither holds nor is aware of any patents, trademarks, copyright issues or other IP hinderances associated with this work. +Core Paper Copyright 2019-2020 Wei Tang. -Core Paper -Copyright 2019-2020 Wei Tang - -This product includes specifications developed at -The Core Paper project (https://corepaper.org/). +Bob Summerwill, the author of this proposal attests that his is the sole author of this specific document +based on Wei Tang's work and that he is able to contribute this work to the ECIP process under the +Apache 2.0 licence. He further attests that he neither holds nor is aware of any patents, trademarks, +copyright issues or other IP hinderances associated with this work.