EIP-1716 Hardfork meta: Petersburg ("Hardfork Meta: Petersburg")

Final · Other · EIP status Final · created 2019-01-21

A Meta document recording the content of the Petersburg hardfork, created in 2019 to remove EIP-1283 from the Constantinople hardfork.

Why it is needed

The Constantinople hardfork included EIP-1283, which lowered the cost of modifying storage. But shortly before activation, analysis emerged showing this change could open a new attack vector: reentrancy attacks. A reentrancy attack is a technique where unexpected code gets inserted into the gap while one contract calls another, draining assets. Since Constantinople code had already been deployed across multiple clients, a separate hardfork was needed solely to remove the problematic EIP-1283. That hardfork is Petersburg. This document records its activation block and the removed item as the official record.

What changes

Today

After EIP-1716

Who is affected

In depth

Fork overview and aliases

The codename is Petersburg, with the aliases St. Petersfork, Peter's Fork, and Constantinople Fix. Its type is Meta and its status is Final. This fork does exactly one thing: remove EIP-1283 from Constantinople (EIP-1013).

Activation blocks

Ethereum mainnet activates at Block >= 7,280,000, the Ropsten testnet at Block >= 4,939,394, Kovan at Block >= 10,255,201, and Rinkeby at Block >= 4,321,234. The Görli testnet activates at Block >= 0, applying from genesis.

Removed EIP: 1283

The sole item removed is EIP-1283 (Net gas metering for SSTORE without dirty maps). It introduces net gas metering for SSTORE without dirty maps, but was dropped after a reentrancy attack vector was identified. The removal was agreed at All-Core-Devs call #53 in January 2019.

Priority rules relative to Constantinople

If Petersburg and Constantinople apply at the same block, Petersburg takes priority and as a result EIP-1283 is disabled. If Petersburg is defined at an earlier block than Constantinople, there is no immediate effect at the Petersburg fork point, and EIP-1283 must be disabled later when Constantinople activates. On mainnet, both forks were set to the same block (7,280,000).

Background for removal: reentrancy attack vector

The original References state that EIP-1283 had to be removed from Constantinople because of a potential reentrancy attack vector, citing an analysis post by ChainSecurity and the Ethereum Foundation's February 2019 upgrade announcement. This document's status is Final, so it is a settled record that will not change further.

Original EIP · ← EIPs