---
eip: 1234
label: EIP-1234
title: Constantinople Difficulty Bomb Delay and Block Reward Adjustment
status: Final
type: Standards Track
category: Core
created: 2018-07-19
official: https://eips.ethereum.org/EIPS/eip-1234
source: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1234.md
canonical: https://eips.huatuo.xyz/zh/eip-1234/
lang: zh
tldr: Constantinople 中的一项变更：把难度炸弹推迟约 500 万个区块，并将工作量证明的区块奖励从 3 ETH 降至 2 ETH。
tags: [difficulty-bomb, issuance, pow, core, constantinople]
---

# EIP-1234: Constantinople Difficulty Bomb Delay and Block Reward Adjustment

> The average block times are increasing due to the difficulty bomb (also known as the "ice age") slowly accelerating. This EIP proposes to delay the difficulty bomb for approximately 12 months and to reduce the block rewards with the Constantinople fork, the second part of the Metropolis fork.

**TL;DR:** Constantinople 中的一项变更：把难度炸弹推迟约 500 万个区块，并将工作量证明的区块奖励从 3 ETH 降至 2 ETH。

## 它解决什么问题？

以太坊工作量证明的难度公式中包含一个呈指数增长的项，即"难度炸弹"或"冰河期"。它的作用是：如果不采取行动，区块会越来越慢，从而迫使网络升级（并最终转向权益证明）。

到 2018 年中期，炸弹又开始起作用：平均出块时间在上升，但权益证明还没有准备好。放任不管会让链越来越慢。EIP-1234 把炸弹再推迟大约 12 个月，使 Ethash 挖矿保持可行，同时降低区块奖励，这样一旦区块再次变快，总发行量也不会激增。

## 它如何运作

从 Constantinople 分叉区块起，有两项变更生效：

1. **用于炸弹的假区块号。** 计算难度中指数形式的冰河期项时，客户端使用比真实区块号小 5,000,000 的区块号。正常的难度调整不变；只有炸弹看到的是一条"更年轻"的链。
2. **降低奖励。** 基础区块奖励变为 2 ETH。叔块奖励和侄块奖励按现有公式由它推导。

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

规范估计，在出块时间回升到大约 30 秒之前，延迟约为 2,900 万秒（大约一年）。

## 示例代码

粗略估算：包含一个晚一个区块的叔块（`k = 1`）的区块，其奖励如下：

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

在实现方面，规范指出其逻辑与 [EIP-649](/eip-649/) 相同，只是偏移量和奖励不同。

## 需要注意

- **状态：Final**，随 Constantinople 升级（[EIP-1013](/eip-1013/)）上线。在主网上，Constantinople 和 Petersburg（[EIP-1716](/eip-1716/)）在区块 7,280,000 一起激活。
- 它沿用了 Byzantium 的 [EIP-649](/eip-649/) 的模式，后者将炸弹推迟了 300 万个区块，并把奖励从 5 ETH 降到 3 ETH。
- 炸弹不断卷土重来；后来的分叉，例如 Muir Glacier（[EIP-2384](/eip-2384/)），又再次将其推迟。
- 自 The Merge 以来，以太坊使用权益证明：矿工没有区块奖励，没有叔块，也没有难度炸弹，因此本 EIP 仅对工作量证明区块的历史验证有意义。


---

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