---
eip: 5133
label: EIP-5133
title: Delaying Difficulty Bomb to mid-September 2022
status: Final
type: Standards Track
category: Core
created: 2022-06-01
official: https://eips.ethereum.org/EIPS/eip-5133
source: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-5133.md
canonical: https://eips.huatuo.xyz/zh/eip-5133/
lang: zh
tldr: 将工作量证明难度炸弹推迟 70 万个区块（总偏移量达到 1140 万个区块），为 The Merge 争取时间；在 Gray Glacier 升级中激活。
tags: [difficulty-bomb, pow, core, hardfork, gray-glacier]
---

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

> Delays the difficulty bomb by a further 700000 blocks, to the middle of September 2022.

**TL;DR:** 将工作量证明难度炸弹推迟 70 万个区块（总偏移量达到 1140 万个区块），为 The Merge 争取时间；在 Gray Glacier 升级中激活。

## 它解决什么问题？

工作量证明时代的以太坊有一个"难度炸弹"（冰河时代）：一个随区块号呈指数增长的额外难度项。它的目的是迫使社区不断升级，最终离开工作量证明。每当 The Merge 尚未就绪、炸弹就开始拖慢出块时间，就会用一次硬分叉把它推迟。

到 2022 年年中，上一次推迟（[EIP-4345](/eip-4345/)）即将耗尽，而 The Merge（[EIP-3675](/eip-3675/)）还没有排期。如果不采取行动，出块时间会持续上升并损害网络。EIP-5133 把炸弹又推迟了一次。

## 它如何运作

从 `FORK_BLOCK_NUMBER` 开始，难度计算仅对冰河时代项使用一个虚假的区块号：

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

之前的推迟使用的是 1070 万的偏移量，因此这里增加了 70 万个区块。难度公式中的其他部分均未改变。

规范的预测脚本估计，炸弹大约在区块 15,530,314（预计 2022 年 9 月中旬）开始变得明显，到 9 月中旬出块大约慢 0.1 秒，到 10 月初慢 0.6–1.2 秒。作者指出这类估计并不精确，尤其是在 The Merge 之前算力下降的情况下。

## 示例代码

规范 Rationale 部分的预测脚本：

```python
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
```

## 需要注意

- 状态：**Final**。它是 Gray Glacier 硬分叉（2022 年年中）中唯一的改动，也是 The Merge 之前的最后一次推迟。
- 它实际上是最后一次炸弹推迟：The Merge 于 2022 年 9 月完成，此后区块由权益证明产生，PoW 难度不再适用。
- 同一系列更早的推迟包括 [EIP-649](/eip-649/)、[EIP-1234](/eip-1234/)、[EIP-3554](/eip-3554/) 和 [EIP-4345](/eip-4345/)。
- 无需修改任何应用或合约；它只影响客户端的共识规则。


---

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