Ethereum Constantinople Upgrade: Things you should know

Aniket
Coinmonks
3 min readFeb 24, 2019

--

Constantinople is second phase upgrade of Ethereum Metropolis. First phase upgrade was done at block 4,370,000. It was named as Byzantium. You can visit changes introduced by Byzantium here.

Constantinople is set to introduce at block number 7,280,000 which is expected to arrive on 27–28 February 2019. Real time countdown can be found here.

Blockchain Hard Fork

In this upgrade, most introduced changes are about provide less gas operations and be ready for Proof of Stake in Ethereum. Changes are described below corresponding the EIP (Ethereum Improvement Proposal).

EIP 145: Bitwise shifting instructions in EVM

This EIP is about providing native bitwise shifting with cost on par with other arithmetic operations. Native shifting instructions can reduce left and right shift operations from 35 gas to 3 gas.

EIP 1014: Skinny CREATE2

This EIP was introduced by Vitalik Buterin himself. Motivation for EIP is to allow interactions to (actually or counterfactually in channels) be made with addresses that do not exist yet on-chain but can be relied on to only possibly eventually contain code that has been created by a particular piece of init code. This can be important for state-channel use cases that involve counterfactual interactions with contracts.

EIP 1052: EXTCODEHASH Opcode

This EIP specifies a new opcode, which returns the keccak256 hash of a contract’s code.Many contracts need to perform checks on a contract’s bytecode, but do not necessarily need the bytecode itself. The gas cost of the EXTCODEHASH is 400.

EIP 1234: Constantinople Difficulty Bomb Delay and Block Reward Adjustment

This EIP was proposed by Afri Schoedon. This raised great conflicts in Ethereum Community and Afri stepped away from the project. In the vision of this, dozen of developers issued an open letter on breakermag.

This EIP was about to delay the difficulty bomb (or ice age) and reducing block reward 3 ETH to 2 ETH.

Motivation for this EIP is that the Casper development and switch to proof-of-stake is delayed, the Ethash proof-of-work should be feasible for miners and allow sealing new blocks every 15 seconds on average for another 12 months. With the delay of the ice age, there is a desire to not suddenly also increase miner rewards.

The difficulty bomb has been known about for a long time and now it’s going to stop from happening. In order to maintain stability of the system, a block reward reduction that offsets the ice age delay would leave the system in the same general state as before. Reducing the reward also decreases the likelihood of a miner driven chain split as Ethereum approaches proof-of-stake.

Furthermore, block rewards will be adjusted to a base of 2 ETH, uncle and nephew rewards will be adjusted accordingly.

St. Petersburg Upgrade

This is about removal of EIP 1283: Net gas metering for SSTORE without dirty maps.

Actually, Constantinople upgrade was planned to occur at block 7,080,000 on January 16, 2019 initially and EIP 1283 was about to introduce in it.

EIP-1283 introduces cheaper gas cost for SSTORE operations but Security Audit Company ChainSecurity find out that this may be vulnerable for some smart contracts. It released an article regarding this mentioning

The upcoming Constantinople Upgrade for the ethereum network introduces cheaper gas cost for certain SSTORE operations. As an unwanted side effect, this enables reentrancy attacks when using address.transfer(...) oraddress.send(...) in Solidity smart contracts. Previously these functions were considered reentrancy-safe, which they aren’t any longer.

So Constantinople upgrade was postponed. The original Constantinople changes were applied to test networks before the postponement and require a second network upgrade to reverse the original Constantinople changes. This is called St. Petersburg Upgrade and it occurs on the same block number as Constantinople.

Network upgrade can be seen real time at http://forkmon.ethdevops.io/.

Hope with this upgrade Ethereum network will become more mature & development friendly.

Thanks for reading.

Get Best Software Deals Directly In Your Inbox

--

--