EIPs Explained

EIP-5133 · Final · Core · 2022-06-01

EIP-5133: Delaying Difficulty Bomb to mid-September 2022

Pushed back the proof-of-work difficulty bomb by 700,000 blocks (to a total offset of 11.4M blocks), buying time for the Merge; activated in the Gray Glacier upgrade.

What problem does it solve?

Proof-of-work Ethereum had a "difficulty bomb" (ice age): an extra difficulty term that grows exponentially with block number. Its purpose was to force the community to keep upgrading and eventually leave proof-of-work. Each time it began to slow block times before the Merge was ready, a hard fork delayed it.

By mid-2022 the previous delay (EIP-4345) was running out and the Merge (EIP-3675) was not yet scheduled. Without action, block times would have kept rising and degrading the network. EIP-5133 delayed the bomb once more.

How it works

From FORK_BLOCK_NUMBER, the difficulty calculation uses a fake block number for the ice-age term only:

fake_block_number = (
    max(0, block.number - 11_400_000)
    if block.number >= FORK_BLOCK_NUMBER
    else block.number
)

Previous delays had used a 10.7M offset, so this adds 700,000 blocks. Nothing else in the difficulty formula changes.

The spec's prediction script estimated that the bomb would become noticeable around block 15,530,314, expected in mid-September 2022, with roughly 0.1 s slower blocks by mid-September and 0.6–1.2 s by early October. The authors note such estimates are imprecise, especially if hashrate dropped before the Merge.

Sample code

The prediction script from the spec's rationale:

import math

def predict_bomb_block(current_difficulty, diff_adjust_coeff, block_adjustment):
    # Block at which the bomb is expected to become noticeable.
    return round(block_adjustment + 100000 * (2 + math.log2(
        diff_adjust_coeff * current_difficulty // 2048)))

# difficulty on Jun 01 2022; bomb noticeable when coefficient >= 0.1
print(predict_bomb_block(13891609586928851, 0.1, 11_400_000))  # 15530314

Things to know

  • Status: Final. It was the only change in the Gray Glacier hard fork (mid-2022), the last delay before the Merge.
  • It was effectively the final bomb delay: the Merge happened in September 2022, after which blocks are produced by proof-of-stake and PoW difficulty no longer applies.
  • Earlier delays in the same family include EIP-649, EIP-1234, EIP-3554 and EIP-4345.
  • No application or contract changes were needed; it only affected client consensus rules.

#difficulty-bomb #pow #core #hardfork #gray-glacier

Details

Authors
Tomasz Kajetan Stanczak (@tkstanczak), Eric Marti Haynes (@ericmartihaynes), Josh Klopfenstein (@joshklop), Abhimanyu Nag (@AbhiMan1601)
Status
Final
Type
Standards Track / Core
Created
2022-06-01
Required by

Machine-readable: Markdown · JSON