{"eip":100,"title":"Change difficulty adjustment to target mean block time including uncles","authors":["Vitalik Buterin (@vbuterin)"],"status":"Final","type":"Standards Track","category":"Core","created":"2016-04-28","repo":"EIPs","label":"EIP-100","officialUrl":"https://eips.ethereum.org/EIPS/eip-100","sourceUrl":"https://github.com/ethereum/EIPs/blob/master/EIPS/eip-100.md","url":"https://eips.huatuo.xyz/eip-100/","tldr":{"en":"Changed proof-of-work difficulty adjustment to count uncles, so miners could not inflate ETH issuance by producing more uncle blocks.","ja":"プルーフ・オブ・ワークの難易度調整にアンクルを加味するよう変更し、マイナーがアンクルブロックを増やして ETH の発行量を水増しできないようにした。","ko":"작업 증명 난이도 조정에 엉클(uncle)을 반영하도록 바꿔, 채굴자가 엉클 블록을 더 많이 만들어 ETH 발행량을 부풀리지 못하게 했다.","zh":"修改工作量证明的难度调整，将叔块计算在内，使矿工无法通过制造更多叔块来推高 ETH 增发量。"},"tags":["difficulty","mining","uncles","core","byzantium"],"explainers":{"en":{"lang":"en","tldr":"Changed proof-of-work difficulty adjustment to count uncles, so miners could not inflate ETH issuance by producing more uncle blocks.","tags":["difficulty","mining","uncles","core","byzantium"],"related":[609,649,3675],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-100/","markdown":"## What problem does it solve?\n\nUnder proof of work, Ethereum adjusted the mining difficulty after every block to keep block times steady. The old formula looked only at the time gap between a block and its parent.\n\nEthereum also paid rewards for **uncles**, which are valid blocks that lost the race but were still referenced by a later block. Uncles add new ETH, but the old formula ignored them. A miner could therefore raise total issuance by producing more uncles, and the difficulty would not respond. The proposal's references describe this as a consensus flaw (\"uncle mining\").\n\nEIP-100 makes the difficulty target a steady average rate of blocks **including uncles**. Issuance then stays predictable and cannot be pushed up by manipulating the uncle rate.\n\n## How it works\n\nThe old adjustment factor was:\n\n```python\nadj_factor = max(1 - ((timestamp - parent.timestamp) // 10), -99)\n```\n\nFrom the Byzantium fork on, it became:\n\n```python\nadj_factor = max((2 if len(parent.uncles) else 1) - ((timestamp - parent.timestamp) // 9), -99)\n```\n\nTwo things changed:\n\n- **Uncle-aware target.** If the parent block included any uncles, the base value is 2 instead of 1. Difficulty rises faster when uncles appear, as if the network had produced more blocks in that period.\n- **Denominator 10 → 9.** This keeps the average block time about the same. The spec expects block times to drop by about 3% at the uncle rate of the time (about 7%).\n\nThe exact version would add `len(parent.uncles)`, treating a block with `k` uncles as `k + 1` blocks with the same timestamp. The spec instead uses only whether *any* uncles exist, because that can be checked from the header alone: compare the uncle hash with the hash of an empty list. Clients do not need the full block body.\n\n## Sample code\n\nSimplified difficulty calculation after EIP-100 (difficulty bomb term omitted):\n\n```python\nBLOCK_DIFF_FACTOR = 2048\nEMPTY_UNCLE_HASH = keccak256(rlp_encode([]))\n\ndef calc_difficulty(parent, timestamp):\n    has_uncles = parent.uncles_hash != EMPTY_UNCLE_HASH\n    adj_factor = max((2 if has_uncles else 1) - (timestamp - parent.timestamp) // 9, -99)\n    return parent.difficulty + (parent.difficulty // BLOCK_DIFF_FACTOR) * adj_factor\n    # + difficulty bomb component\n```\n\n## Things to know\n\n- Activated in the Byzantium hard fork ([EIP-609](/eip-609/)), together with the block reward cut and bomb delay in [EIP-649](/eip-649/).\n- Only the parent header is needed. That keeps light and fast-sync clients simple.\n- Since The Merge ([EIP-3675](/eip-3675/)), Ethereum uses proof of stake. Difficulty is fixed at 0 and uncles no longer exist, so this rule now matters only for the historical proof-of-work chain and for chains that still use Ethash.\n"},"ja":{"lang":"ja","tldr":"プルーフ・オブ・ワークの難易度調整にアンクルを加味するよう変更し、マイナーがアンクルブロックを増やして ETH の発行量を水増しできないようにした。","tags":["difficulty","mining","uncles","core","byzantium"],"related":[609,649,3675],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-100/","markdown":"## 何を解決するのか\n\nプルーフ・オブ・ワークの下で、Ethereum はブロック時間を安定させるため、ブロックごとにマイニング難易度を調整していました。従来の計算式が見ていたのは、ブロックと親ブロックとの時間差だけでした。\n\nEthereum は**アンクル**にも報酬を支払っていました。アンクルとは、競争には負けたものの、後続のブロックから参照された有効なブロックのことです。アンクルは新たな ETH を生みますが、従来の計算式はそれを無視していました。そのため、マイナーはアンクルを増やすことで総発行量を引き上げることができ、難易度はそれに反応しませんでした。提案の参考資料では、これをコンセンサス上の欠陥（「アンクルマイニング」）と説明しています。\n\nEIP-100 は、難易度が**アンクルを含めた**ブロックの平均レートを一定に保つようにします。これにより発行量は予測可能なままとなり、アンクル率の操作で押し上げることはできなくなります。\n\n## 仕組み\n\n従来の調整係数は次のとおりでした。\n\n```python\nadj_factor = max(1 - ((timestamp - parent.timestamp) // 10), -99)\n```\n\nByzantium フォーク以降は次のようになりました。\n\n```python\nadj_factor = max((2 if len(parent.uncles) else 1) - ((timestamp - parent.timestamp) // 9), -99)\n```\n\n変更点は 2 つです。\n\n- **アンクルを考慮した目標。** 親ブロックにアンクルが 1 つでも含まれていた場合、基準値は 1 ではなく 2 になります。アンクルが現れると、ネットワークがその期間により多くのブロックを生成したかのように、難易度がより速く上昇します。\n- **分母 10 → 9。** これによりブロック時間の平均はほぼ同じに保たれます。仕様書では、当時のアンクル率（約 7%）でブロック時間が約 3% 短くなると見込んでいます。\n\n厳密な版では `len(parent.uncles)` を加算し、`k` 個のアンクルを持つブロックを、同じタイムスタンプの `k + 1` 個のブロックとして扱うことになります。仕様書は代わりに、アンクルが*あるかどうか*だけを使います。これならヘッダーだけで確認できるからです。アンクルハッシュを空のリストのハッシュと比較します。クライアントはブロック本体全体を必要としません。\n\n## サンプルコード\n\nEIP-100 適用後の難易度計算の簡略版（難易度爆弾の項は省略）:\n\n```python\nBLOCK_DIFF_FACTOR = 2048\nEMPTY_UNCLE_HASH = keccak256(rlp_encode([]))\n\ndef calc_difficulty(parent, timestamp):\n    has_uncles = parent.uncles_hash != EMPTY_UNCLE_HASH\n    adj_factor = max((2 if has_uncles else 1) - (timestamp - parent.timestamp) // 9, -99)\n    return parent.difficulty + (parent.difficulty // BLOCK_DIFF_FACTOR) * adj_factor\n    # + difficulty bomb component\n```\n\n## 知っておくべきこと\n\n- Byzantium ハードフォーク（[EIP-609](/eip-609/)）で有効化されました。[EIP-649](/eip-649/) のブロック報酬の削減と爆弾の先送りも同時です。\n- 必要なのは親ブロックのヘッダーだけです。そのため、ライトクライアントや fast sync のクライアントでも実装が単純なままです。\n- The Merge（[EIP-3675](/eip-3675/)）以降、Ethereum はプルーフ・オブ・ステークを使っています。難易度は 0 に固定され、アンクルも存在しないため、このルールが意味を持つのは、過去のプルーフ・オブ・ワークのチェーンと、今も Ethash を使うチェーンだけです。\n"},"ko":{"lang":"ko","tldr":"작업 증명 난이도 조정에 엉클(uncle)을 반영하도록 바꿔, 채굴자가 엉클 블록을 더 많이 만들어 ETH 발행량을 부풀리지 못하게 했다.","tags":["difficulty","mining","uncles","core","byzantium"],"related":[609,649,3675],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-100/","markdown":"## 어떤 문제를 해결하나요?\n\n작업 증명 방식에서 이더리움은 블록 시간을 일정하게 유지하기 위해 블록마다 채굴 난이도를 조정했습니다. 기존 공식은 블록과 부모 블록 사이의 시간 간격만 보았습니다.\n\n이더리움은 **엉클**에도 보상을 지급했습니다. 엉클은 경쟁에서 졌지만 이후 블록에서 참조된 유효한 블록입니다. 엉클은 새로운 ETH를 만들어 내지만 기존 공식은 이를 무시했습니다. 그래서 채굴자는 엉클을 더 많이 만들어 총 발행량을 늘릴 수 있었고, 난이도는 이에 반응하지 않았습니다. 제안서의 참고 자료는 이를 합의상의 결함(\"엉클 마이닝\")이라고 설명합니다.\n\nEIP-100은 난이도가 **엉클을 포함한** 블록의 평균 생성 속도를 일정하게 유지하도록 만듭니다. 그러면 발행량이 예측 가능한 상태로 유지되고, 엉클 비율을 조작해 끌어올릴 수 없습니다.\n\n## 어떻게 동작하나요?\n\n기존 조정 계수는 다음과 같았습니다.\n\n```python\nadj_factor = max(1 - ((timestamp - parent.timestamp) // 10), -99)\n```\n\nByzantium 포크부터는 다음과 같이 바뀌었습니다.\n\n```python\nadj_factor = max((2 if len(parent.uncles) else 1) - ((timestamp - parent.timestamp) // 9), -99)\n```\n\n바뀐 것은 두 가지입니다.\n\n- **엉클을 반영하는 목표.** 부모 블록에 엉클이 하나라도 포함되어 있으면 기본값이 1이 아닌 2가 됩니다. 엉클이 나타나면, 네트워크가 그 기간에 블록을 더 많이 생산한 것처럼 난이도가 더 빠르게 올라갑니다.\n- **분모 10 → 9.** 이렇게 하면 평균 블록 시간이 거의 그대로 유지됩니다. 명세서는 당시의 엉클 비율(약 7%)에서 블록 시간이 약 3% 줄어들 것으로 예상합니다.\n\n정확한 버전은 `len(parent.uncles)`를 더해, 엉클 `k`개를 가진 블록을 같은 타임스탬프의 블록 `k + 1`개로 취급할 것입니다. 명세서는 대신 엉클이 *있는지 여부*만 사용합니다. 헤더만으로 확인할 수 있기 때문입니다. 엉클 해시를 빈 리스트의 해시와 비교하면 됩니다. 클라이언트는 전체 블록 본문이 필요하지 않습니다.\n\n## 샘플 코드\n\nEIP-100 이후의 단순화한 난이도 계산(난이도 폭탄 항 생략):\n\n```python\nBLOCK_DIFF_FACTOR = 2048\nEMPTY_UNCLE_HASH = keccak256(rlp_encode([]))\n\ndef calc_difficulty(parent, timestamp):\n    has_uncles = parent.uncles_hash != EMPTY_UNCLE_HASH\n    adj_factor = max((2 if has_uncles else 1) - (timestamp - parent.timestamp) // 9, -99)\n    return parent.difficulty + (parent.difficulty // BLOCK_DIFF_FACTOR) * adj_factor\n    # + difficulty bomb component\n```\n\n## 알아둘 점\n\n- Byzantium 하드포크([EIP-609](/eip-609/))에서 활성화되었으며, [EIP-649](/eip-649/)의 블록 보상 삭감 및 폭탄 지연과 함께 적용되었습니다.\n- 부모 블록 헤더만 있으면 됩니다. 그래서 라이트 클라이언트와 fast sync 클라이언트도 단순하게 유지됩니다.\n- The Merge([EIP-3675](/eip-3675/)) 이후 이더리움은 지분 증명을 사용합니다. 난이도는 0으로 고정되고 엉클도 더 이상 존재하지 않으므로, 이 규칙은 과거의 작업 증명 체인과 여전히 Ethash를 쓰는 체인에서만 의미가 있습니다.\n"},"zh":{"lang":"zh","tldr":"修改工作量证明的难度调整，将叔块计算在内，使矿工无法通过制造更多叔块来推高 ETH 增发量。","tags":["difficulty","mining","uncles","core","byzantium"],"related":[609,649,3675],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-100/","markdown":"## 它解决什么问题？\n\n在工作量证明下，以太坊每个区块之后都会调整挖矿难度，以保持出块时间稳定。旧公式只看区块与其父区块之间的时间间隔。\n\n以太坊还会为**叔块**（uncle）支付奖励。叔块是在竞争中落败、但仍被后续区块引用的有效区块。叔块会带来新增的 ETH，但旧公式却忽略了它们。因此矿工可以通过制造更多叔块来提高总增发量，而难度不会作出响应。该提案的参考资料把这称为共识缺陷（\"叔块挖矿\"）。\n\nEIP-100 让难度以**包括叔块在内**的稳定平均出块速率为目标。这样增发量保持可预测，也无法通过操纵叔块率来推高。\n\n## 它如何运作\n\n旧的调整系数是：\n\n```python\nadj_factor = max(1 - ((timestamp - parent.timestamp) // 10), -99)\n```\n\n从 Byzantium 分叉起，变为：\n\n```python\nadj_factor = max((2 if len(parent.uncles) else 1) - ((timestamp - parent.timestamp) // 9), -99)\n```\n\n有两处变化：\n\n- **感知叔块的目标。** 如果父区块包含任何叔块，基础值是 2 而不是 1。出现叔块时难度上升得更快，就好像网络在这段时间里产生了更多区块。\n- **分母 10 → 9。** 这使平均出块时间大致保持不变。规范预计，按当时的叔块率（约 7%），出块时间会缩短约 3%。\n\n精确的版本会加上 `len(parent.uncles)`，把带有 `k` 个叔块的区块视为 `k + 1` 个时间戳相同的区块。规范则只使用*是否存在*叔块，因为这只需区块头就能检查：把叔块哈希与空列表的哈希比较即可。客户端不需要完整的区块体。\n\n## 示例代码\n\nEIP-100 之后的简化难度计算（省略难度炸弹项）：\n\n```python\nBLOCK_DIFF_FACTOR = 2048\nEMPTY_UNCLE_HASH = keccak256(rlp_encode([]))\n\ndef calc_difficulty(parent, timestamp):\n    has_uncles = parent.uncles_hash != EMPTY_UNCLE_HASH\n    adj_factor = max((2 if has_uncles else 1) - (timestamp - parent.timestamp) // 9, -99)\n    return parent.difficulty + (parent.difficulty // BLOCK_DIFF_FACTOR) * adj_factor\n    # + difficulty bomb component\n```\n\n## 需要注意\n\n- 在 Byzantium 硬分叉（[EIP-609](/eip-609/)）中激活，同时激活的还有 [EIP-649](/eip-649/) 中的区块奖励削减和炸弹推迟。\n- 只需要父区块头。这让轻客户端和快速同步客户端保持简单。\n- 自 The Merge（[EIP-3675](/eip-3675/)）以来，以太坊使用权益证明。难度固定为 0，叔块也不复存在，因此这条规则现在只对历史上的工作量证明链以及仍在使用 Ethash 的链有意义。\n"}},"requiredBy":[609]}
