---
eip: 1013
label: EIP-1013
title: "Hardfork Meta: Constantinople"
status: Final
type: Meta
created: 2018-04-20
requires: 145, 609, 1014, 1052, 1234, 1283
official: https://eips.ethereum.org/EIPS/eip-1013
source: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1013.md
canonical: https://eips.huatuo.xyz/eip-1013/
lang: en
tldr: "The meta-EIP listing what went into the Constantinople hard fork: bitwise shifts, CREATE2, EXTCODEHASH, a difficulty bomb delay with lower block reward, and SSTORE net gas metering."
tags: [meta, hardfork, constantinople, evm]
---

# EIP-1013: Hardfork Meta: Constantinople

> This meta-EIP specifies the changes included in the Ethereum hardfork named Constantinople.

**TL;DR:** The meta-EIP listing what went into the Constantinople hard fork: bitwise shifts, CREATE2, EXTCODEHASH, a difficulty bomb delay with lower block reward, and SSTORE net gas metering.

## What problem does it solve?

A hard fork bundles several independent EIPs that must activate at the same block on every client. Client teams, exchanges and node operators need one authoritative list of what is included and when it activates.

EIP-1013 is that list for **Constantinople**, the second part of the "Metropolis" upgrades that began with Byzantium ([EIP-609](/eip-609/)).

## How it works

**Codename:** Constantinople (aliases: Metropolis/Constantinople, Metropolis part 2).

**Included EIPs:**

| EIP | Change | Effect for developers |
| --- | --- | --- |
| [EIP-145](/eip-145/) | `SHL`, `SHR`, `SAR` opcodes | Native bitwise shifts, cheaper than `MUL`/`DIV` tricks |
| [EIP-1014](/eip-1014/) | `CREATE2` | Deploy to an address known in advance, from deployer + salt + init code |
| [EIP-1052](/eip-1052/) | `EXTCODEHASH` | Get the hash of another contract's code without copying it |
| [EIP-1234](/eip-1234/) | Difficulty bomb delay | Bomb pushed back about 12 months; block reward cut from 3 to 2 ETH |
| [EIP-1283](/eip-1283/) | Net gas metering for `SSTORE` | Cheaper repeated writes to the same slot in one transaction |

**Activation blocks** in the spec:

- Mainnet: `7,280,000`
- Ropsten: `4,230,000`, Kovan: `9,200,000`, Rinkeby: `3,660,663`

## Sample code

Two features developers used immediately, in Solidity:

```solidity
// EIP-1014: predict a CREATE2 address before deploying
function predict(address deployer, bytes32 salt, bytes memory initCode)
    pure returns (address)
{
    return address(uint160(uint256(keccak256(
        abi.encodePacked(bytes1(0xff), deployer, salt, keccak256(initCode))
    ))));
}

// EIP-1052: check whether an address has code
function hasCode(address a) view returns (bool) {
    return a.codehash != bytes32(0) && a.codehash != keccak256("");
}
```

A client chain config of that era expressed the fork as a block number:

```json
{ "config": { "chainId": 1, "constantinopleBlock": 7280000, "petersburgBlock": 7280000 } }
```

## Things to know

- Constantinople was delayed shortly before its planned mainnet activation in January 2019 after a reentrancy risk was found in [EIP-1283](/eip-1283/): cheaper `SSTORE` meant the 2,300 gas stipend of `transfer()` could now be enough to change state.
- On mainnet it activated together with **Petersburg** ([EIP-1716](/eip-1716/)), which removed EIP-1283. So mainnet got Constantinople **without** net gas metering. Net metering returned later, with a safeguard, in Istanbul (EIP-2200).
- On testnets such as Ropsten, Constantinople activated with EIP-1283 first, and Petersburg removed it at a later block.
- `CREATE2` became the basis for counterfactual wallets and deterministic factory deployments.
- Testnets listed here (Ropsten, Kovan, Rinkeby) have since been shut down.


---

This is an unofficial plain-language summary. Read the full specification: https://eips.ethereum.org/EIPS/eip-1013
