EIP-2515 Difficulty freeze implementation (Implement Difficulty Freeze)

No call decision · Consensus & staking · EIP status Stagnant · created 2020-02-10

EIP-2515 proposes freezing mining difficulty at a predetermined block height instead of using the difficulty bomb, and then continuing to increase it by 1% every block after that point.

Why it is needed

The existing difficulty bomb's effect on block time builds up gradually through a complex formula, making it hard to predict. There have been cases, like Muir Glacier, where the bomb appeared at an unexpected time, and when a fork is delayed by technical issues, even miners who are not the bomb's target suffer reduced block rewards. Users are also affected by reduced chain usability as block times grow, but neither miners nor users have any means of resolving this themselves. Because a difficulty freeze happens at a predetermined block height, it is far easier to predict and model, and since the client maintenance teams would be the ones most directly hurt by leaving it unaddressed, a timely response fork is considered more likely.

What changes

Today

After EIP-2515

Who is affected

In depth

Difficulty calculation formula

The core logic branches on block height. While block height is at or below DIFFICULTY_FREEZE_HEIGHT, the existing difficulty adjustment formula is used as is: block_diff = parent_diff + parent_diff // 2048 * max(1 - (block_timestamp - parent_timestamp) // 10, -99). Once that is exceeded, the formula changes to block_diff = parent_diff + parent_diff * 0.01. In other words, past the freeze height, difficulty simply increases by 1% of the previous difficulty every block regardless of block time. This does not stop the chain, but it creates pressure to upgrade before passing this freeze point.

Optional implementation: automatic renewal at each fork

The original text also presents an alternative that, instead of hardcoding DIFFICULTY_FREEZE_HEIGHT as a fixed value, introduces DIFFICULTY_FREEZE_DIFFERENCE (DFD) and LAST_FORK_HEIGHT. As an example it cites DFD = 1,800,000 blocks (about 9 months), changing the condition to BLOCK_HEIGHT <= LAST_FORK_HEIGHT + DIFFICULTY_FREEZE_DIFFERENCE. This approach has the advantage that the freeze point is automatically recalculated at every fork, but the original text notes that the verification logic becomes more complex and would need further analysis and test cases.

Why the 1% increase was added

The original Rationale explains that because block height is a value that is easy to predict and evaluate, the freeze approach simplifies the difficulty adjustment logic. Initially the plan was to keep difficulty fixed after the freeze, but after receiving feedback that this alone would not reliably drive upgrades, a provision was added to keep increasing difficulty by 1% even after the freeze.

Backward compatibility and tests

The original text explicitly states there are no backward compatibility issues. However, the Test Cases and Implementation sections remain TBD, so this EIP was never completed with actual implementation or test code.

Security risk after the freeze

The Security Considerations section identifies as the key risk that, once past the freeze, the protocol can no longer adapt to changes in hashrate. If hashrate increases, block time keeps growing until difficulty becomes so high that new miners struggle to join, and even if hashrate decreases or stays flat, block time still keeps growing steadily. The original text stresses that because clients have a strong incentive to stay fully synced with the network, the client teams themselves are also the ones best positioned to most efficiently implement measures to delay the freeze.

Effect on issuance

According to Economic Considerations, under the existing difficulty bomb (Ice Age), growing block times had the effect of reducing ETH issuance. Under a difficulty freeze, the opposite could happen, issuance could temporarily increase, but the original text considers this unlikely in practice because clients have a strong incentive to prevent it. Over time, as the 1% difficulty increases keep accumulating, both block time and issuance eventually decrease again. It also notes that because the freeze point is predictable, ETH holders can watch it and hold client developers accountable.

Status: Stagnant

This EIP's status is Stagnant, having seen no further progress since it was written in February 2020. This is also why Test Cases and Implementation remain TBD. No separate fork-inclusion decision has been found in call records.

Original EIP · ← EIPs