EIP-1234 · Final · Core · 2018-07-19
EIP-1234: Constantinople Difficulty Bomb Delay and Block Reward Adjustment
Constantinople's change that pushed the difficulty bomb back by about 5 million blocks and cut the proof-of-work block reward from 3 ETH to 2 ETH.
What problem does it solve?
Ethereum's proof-of-work difficulty formula included an exponentially growing term, the "difficulty bomb" or "ice age". It was there to force the network to upgrade (and eventually to move to proof-of-stake) by making blocks slower and slower if nothing was done.
By mid-2018 the bomb was starting to bite again: average block times were rising, but proof-of-stake was not ready. Leaving it alone would have made the chain progressively slower. EIP-1234 delays the bomb for roughly another 12 months so Ethash mining stays viable, and at the same time lowers the block reward so total issuance does not jump once blocks become fast again.
How it works
Two changes take effect from the Constantinople fork block:
- Fake block number for the bomb. When computing the exponential ice-age term of difficulty, clients use a block number 5,000,000 lower than the real one. The normal difficulty adjustment is unchanged; only the bomb sees a "younger" chain.
- Lower rewards. The base block reward becomes 2 ETH. Uncle and nephew rewards are derived from it with the existing formulas.
CONSTANTINOPLE = CNSTNTNPL_FORK_BLKNUM
def bomb_block_number(n):
return max(0, n - 5_000_000) if n >= CONSTANTINOPLE else n
def block_reward(n, prev_reward):
return 2 * 10**18 if n >= CONSTANTINOPLE else prev_reward # wei
def uncle_reward(k, base): # k = block.number - uncle.number
return (8 - k) * base // 8
def nephew_reward(base): # extra paid per included uncle
return base // 32
The spec estimates the delay at about 29 million seconds (roughly a year) before block times would drift back to around 30 seconds.
Sample code
Back-of-envelope: rewards for a block that includes one uncle that is one block older (k = 1):
ETH = 10**18
base = 2 * ETH
miner = base + base // 32 # block reward + one nephew bonus
uncle = (8 - 1) * base // 8 # reward for the uncle's miner
print(miner / ETH) # 2.0625
print(uncle / ETH) # 1.75
Implementation-wise the spec notes the logic is identical to EIP-649, only with a different offset and reward.
Things to know
- Status: Final, shipped in the Constantinople upgrade (EIP-1013). On mainnet Constantinople and Petersburg (EIP-1716) activated together at block 7,280,000.
- It followed the same pattern as Byzantium's EIP-649, which had delayed the bomb by 3 million blocks and cut the reward from 5 to 3 ETH.
- The bomb kept returning; it was pushed back again by later forks such as Muir Glacier (EIP-2384).
- Since The Merge, Ethereum uses proof-of-stake: there are no block rewards for miners, no uncles and no difficulty bomb, so this EIP only matters for historical validation of proof-of-work blocks.