The history of Ethereum’s Constantinople hard fork delay and recovery

The Vulnerability and Historical Context

ChainSecurity discovered a security vulnerability within the Constantinople upgrade. This finding forced developers to delay the network upgrade to permit analysis of the risk. The security vulnerability in the Constantinople upgrade arises from the update that introduces the Cheaper Cost Of Storage through EIP1283, which allows for Reentrancy Attacks that can lead to the unauthorized withdrawal of funds from smart contracts. This change makes Reentrancy Attacks viable. In a Reentrancy Attack, a malicious external smart contract takes control of the execution flow of a target contract. The attacker makes multiple calls to a function such as "withdrawBalance()" to siphon funds. This vulnerability mirrors the 2016 DAO Attack where attackers used single and cross-function reentrancy to steal 3.6 million ETH from the DAO Smart Contract. The 2016 event led to an unplanned hard fork and the subsequent split between Ethereum and Ethereum Classic. The decision to postpone the Constantinople hard fork mitigated a critical security risk. For miners and node operators, the delay meant they had to upgrade to new versions of Geth or Parity before 4am Jan 17th GMT. Investors do not need to act with their Ether or tools like Ledger or MyEthereumWallet.

Ethereum entered public existence in July 2015 after the ninth and final proof-of-concept open testnet. Vitalik Buterin offered a reward of 25,000 ETH for developers who stress-tested the network. This testing focused on transaction activity, virtual machine usage, mining prowess, and general punishment. The first hard fork occurred on May 14, 2016, at block 1,150,000. The Homestead upgrade removed Canary Contracts, which were tools used to notify users of bad or vulnerable chains. Homestead also included EIP 2.1, which increased the cost of creating smart contracts from 21,000 gas to 53,000 gas. EIP 2.2 invalidated all transaction signatures with an s-value greater than secp256k1n/2. EIP 2.4 stabilized block times between 10 to 20 seconds.

Hard Fork Logistics and Mining Impacts

The Constantinople hard fork occurred on February 28, 2019, at block 7,280,000. This upgrade is the second stage of the Metropolis upgrade. Because developers wanted to audit the ProgPoW algorithm, they postponed the implementation of the ASIC resistant proof of work algorithm. They expected to finish this audit by March or April. The hard fork also included the difficulty bomb and the thirding implementation. EIP 1234 reduced the miner reward from 3 ETH to 2 ETH per block. This adjustment reduced the annual ETH supply from 7.4 million to 4.9 million and dropped the inflation rate from 7.8% to 4.9%.

Parameter Specification
Hard Fork Date February 28, 2019
Block Number 7,280,000
EIP-1234 Reward 2 ETH
Annual Supply 4.9 million ETH
Annual Inflation 4.9%

Low ETH prices at that time meant the reduction in mining rewards translated to low profits for the industry. Small miners faced longer recovery periods. You do not need to touch your Ledger or Trezor if you only hold assets.

Implementation Proposals and Process Changes

Vitalik Buterin proposed a new smart contract function called Create2 under EIP-1014. The original create function created a new smart contract using the creator’s address and the nonce number. The new contract’s address was created by hashing the creator’s address and the nonce number. In contrast, Create2 allows the address at which a new contract will be created to be determined beforehand. This allows for interaction with a smart contract that is not yet implemented on the blockchain. Some developers argued that Create2 introduces an attack vector because it could allow an attacker to replace a smart contract with a malicious one after implementation. Vitalik Buterin denied that the implementation introduces such an attack vector. The Ethereum community also discussed a new "Key Stakeholder Review" process following a post-mortem of the aborted January 16, 2019 fork. This process requires substantial internal review by relevant stakeholder groups during the Draft stage. The editor contacts stakeholder groups to record meeting dates before a proposal moves to the Review and Last Call stages. These groups must provide a clear summary of the issues they review and hold regular meetings.

The Roadmap to Serenity

The Constantinople upgrade follows the Byzantium hard fork, which went live in October 2017 at block 4,370,000. Byzantium included nine EIPs and introduced zk-SNARKS, early proof-of-stake, and transaction status receipts. The network moves through stages toward the Serenity phase. The Petersburg phase of Constantinople occurred in the first quarter of 2019. The next system-wide upgrade, Istanbul, is set for October 16, 2019. Istanbul will activate six EIPs, including EIP-152, EIP-1108, EIP-1344, EIP-1884, EIP-2028, and EIP-2200. The goal of the Istanbul upgrade is to make the network cheaper, faster, and more scalable for dApps. The introduction of the ProgPoW consensus will further entrench decentralization by balancing forces in the network. The transition to proof of stake involves two main proposals: Casper CBC suggested by Vlad Zamfir and Casper FFG advocated by Vitalik Buterin. Casper FFG will drive the initial rollout of the Beacon Chain. The Istanbul upgrade aims to align the cost of opcodes and computational costs and to improve denial-of-service attack resilience. It also seeks to ensure layer-2 solutions based on SNARKs and STARKs are more performant and to facilitate Ethereum and Zcash interoperability. Will the network successfully reach the Serenity phase through these scheduled transitions?

Newsletter