EIP-2384 · Final · Core · 2019-11-20
EIP-2384: Muir Glacier Difficulty Bomb Delay
Pushed Ethereum's proof-of-work difficulty bomb back by 4,000,000 blocks in the Muir Glacier upgrade, stopping block times from creeping toward 20–30 seconds.
What problem does it solve?
Proof-of-work Ethereum had a "difficulty bomb" (also called the ice age): an extra term in the difficulty formula that grows exponentially with block number. Its purpose was to make mining progressively slower so the network would be forced to upgrade rather than linger on an old ruleset.
By late 2019 the bomb was noticeable again. The spec notes block times rising from about 13.1 s around block 8,600,000 to about 14.3 s by block 8,900,000, with projections of 20 s blocks by the end of December 2019 and 30 s+ by February 2020. Slower blocks mean less throughput and a worse user experience. Since the move to proof-of-stake was not ready, the bomb had to be delayed again.
How it works
The fix is the same trick used by earlier delays (EIP-649 in Byzantium and EIP-1234 in Constantinople): when computing the ice-age component of difficulty, clients use a fake block number that is lower than the real one.
From the fork block onward, the fake block number is the real number minus 9,000,000. Relative to the previous delay this adds 4,000,000 blocks, roughly 611 days at the time's block rate. The rest of the difficulty calculation is unchanged; only the exponential bomb term sees the shifted number.
Muir Glacier was a single-EIP hard fork that followed Istanbul. The spec stresses that the 4,000,000 blocks are counted from around block 8,800,000, not from the activation block.
Sample code
The rule from the spec, in Python-style pseudocode:
def ice_age_block_number(block_number: int, fork_block: int) -> int:
# Used only for the exponential "bomb" term of calc_difficulty
if block_number >= fork_block:
return max(0, block_number - 9_000_000)
return block_number
# The bomb term in Ethereum's PoW difficulty formula
def bomb(block_number: int, fork_block: int) -> int:
fake = ice_age_block_number(block_number, fork_block)
period = fake // 100_000
return 2 ** (period - 2) if period >= 2 else 0
Things to know
- Status is Final; it shipped as the Muir Glacier upgrade.
- The spec expected the bomb to bring back ~20 s blocks around July 2021. It was later delayed again, by EIP-3554 (London), EIP-4345 (Arrow Glacier) and EIP-5133 (Gray Glacier).
- After The Merge, Ethereum no longer uses proof-of-work difficulty, so the bomb has no effect on today's chain. This EIP matters mainly for historical sync and for understanding past fork rules.