-
Notifications
You must be signed in to change notification settings - Fork 5.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EIP-1234: Constantinople Difficulty Bomb Delay and Block Reward Adjustment #1234
Merged
Merged
Changes from 6 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
3511a6a
Merge pull request #3 from ethereum/master
5chdn d73b31e
Merge branch 'master' of https://github.com/ethereum/EIPs into a5-eip…
5chdn f8f4d42
difficulty bomb: duplicate eip 649
5chdn ae869be
eip-1234: update spec to match with constantinople requirements
5chdn c8da726
eip-1234: update header
5chdn 2b41a03
Merge branch 'master' into a5-eip-1234
5chdn 02e6ea4
Remove reference to #1227
5chdn File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
--- | ||
eip: 1234 | ||
title: Constantinople Difficulty Bomb Delay and Block Reward Adjustment | ||
author: Afri Schoedon (@5chdn) | ||
discussions-to: https://github.com/ethereum/EIPs/pull/1234 | ||
type: Standards Track | ||
category: Core | ||
status: Draft | ||
created: 2018-07-19 | ||
replaces: 1227 | ||
--- | ||
|
||
## Simple Summary | ||
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 one and a half year and to reduce the block rewards with the Constantinople fork, the second part of the Metropolis fork. | ||
|
||
## Abstract | ||
Starting with `CNSTNTNPL_FORK_BLKNUM` the client will calculate the difficulty based on a fake block number suggesting the client that the difficulty bomb is adjusting around 6 million blocks later than previously specified with the Homestead fork. Furthermore, block rewards will be adjusted to a base of 2 ETH, uncle and nephew rewards will be adjusted accordingly. | ||
|
||
## Motivation | ||
The Casper development and switch to proof-of-stake is delayed, the Ethash proof-of-work should be feasible for miners and allow sealing new blocks every 15 seconds on average for another one and a half years. With the delay of the ice age, there is a desire to not suddenly also increase miner rewards. The difficulty bomb has been known about for a long time and now it's going to stop from happening. In order to maintain stability of the system, a block reward reduction that offsets the ice age delay would leave the system in the same general state as before. Reducing the reward also decreases the likelihood of a miner driven chain split as Ethereum approaches proof-of-stake. | ||
|
||
## Specification | ||
#### Relax Difficulty with Fake Block Number | ||
For the purposes of `calc_difficulty`, simply replace the use of `block.number`, as used in the exponential ice age component, with the formula: | ||
|
||
fake_block_number = max(0, block.number - 6_000_000) if block.number >= CNSTNTNPL_FORK_BLKNUM else block.number | ||
|
||
#### Adjust Block, Uncle, and Nephew rewards | ||
To ensure a constant Ether issuance, adjust the block reward to `new_block_reward`, where | ||
|
||
new_block_reward = 2_000_000_000_000_000_000 if block.number >= CNSTNTNPL_FORK_BLKNUM else block.reward | ||
|
||
(2E18 wei, or 2,000,000,000,000,000,000 wei, or 2 ETH). | ||
|
||
Analogue, if an uncle is included in a block for `block.number >= CNSTNTNPL_FORK_BLKNUM` such that `block.number - uncle.number = k`, the uncle reward is | ||
|
||
new_uncle_reward = (8 - k) * new_block_reward / 8 | ||
|
||
This is the existing pre-Constantinople formula for uncle rewards, simply adjusted with `new_block_reward`. | ||
|
||
The nephew reward for `block.number >= CNSTNTNPL_FORK_BLKNUM` is | ||
|
||
new_nephew_reward = new_block_reward / 32 | ||
|
||
This is the existing pre-Constantinople formula for nephew rewards, simply adjusted with `new_block_reward`. | ||
|
||
## Rationale | ||
This will delay the ice age by 42 million seconds (approximately 1.4 years), so the chain would be back at 30 second block times in summer 2020. An alternate proposal was to add special rules to the difficulty calculation to effectively _pause_ the difficulty between different blocks. This would lead to similar results. | ||
|
||
This was previously discussed at All Core Devs Meeting [#42](https://github.com/ethereum/pm/blob/master/All%20Core%20Devs%20Meetings/Meeting%2042.md) without stating any details. This draft can be used to discuss further changes to the difficulty bomb and issuance in subsequent meetings. This EIP-1234 opposes directly the intent of [EIP-1227](https://github.com/ethereum/EIPs/issues/1227) which should be also considered in discussions. | ||
|
||
## Backwards Compatibility | ||
This EIP is not forward compatible and introduces backwards incompatibilities in the difficulty calculation, as well as the block, uncle and nephew reward structure. Therefore, it should be included in a scheduled hardfork at a certain block number. It's suggested to include this EIP in the second Metropolis hard-fork, _Constantinople_. | ||
|
||
## Test Cases | ||
Test cases shall be created once the specification is to be accepted by the developers or implemented by the clients. | ||
|
||
## Implementation | ||
The implementation in it's logic does not differ from [EIP-649](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-649.md) and can be used as temporary reference. | ||
|
||
## Copyright | ||
Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1227 doesn't appear to be a valid EIP.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now it is #1235? Or do you want me to remove this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, the build was failing because it wasn't merged yet. It should work now.
I don't think this replaces that one, though - they're both drafts, and you can only replace a Final EIP.