-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Updated months to be more accurate for the iceage #3563
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
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
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 hidden or 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 |
|---|---|---|
|
|
@@ -5,15 +5,15 @@ author: James Hancock (@madeoftin) | |
| discussions-to: https://ethereum-magicians.org/t/eip-3554-ice-age-delay-targeting-december-2021/6188 | ||
| type: Standards Track | ||
| category: Core | ||
| status: Draft | ||
| status: Review | ||
| created: 2021-05-06 | ||
| --- | ||
|
|
||
| ## Simple Summary | ||
| Delays the difficulty bomb to show effect the first week of December 2021. | ||
|
|
||
| ## Abstract | ||
| Starting with `FORK_BLOCK_NUMBER` the client will calculate the difficulty based on a fake block number suggesting to the client that the difficulty bomb is adjusting 9,500,000 blocks later than the actual block number. | ||
| Starting with `FORK_BLOCK_NUMBER` the client will calculate the difficulty based on a fake block number suggesting to the client that the difficulty bomb is adjusting 9,666,666 blocks later than the actual block number. | ||
|
|
||
| ## Motivation | ||
| Targeting for the Shanghai upgrde and/or the Merge to occur before Decemember 2021. Either the bomb can be readjusted at that time, or removed all together. | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. there is a typo in upgrde, should be upgrade |
||
|
|
@@ -22,11 +22,11 @@ Targeting for the Shanghai upgrde and/or the Merge to occur before Decemember 20 | |
| #### 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: | ||
| ```py | ||
| fake_block_number = max(0, block.number - 9_500_000) if block.number >= FORK_BLOCK_NUMBER else block.number | ||
| fake_block_number = max(0, block.number - 9_700_000) if block.number >= FORK_BLOCK_NUMBER else block.number | ||
| ``` | ||
| ## Rationale | ||
|
|
||
| The following script predicts a 0.2 second delay to blocktime the first week of december and a 1 second delay by the end of the month. This gives reason to address because the effect will be seen, but not so much urgency we don't have space to work around if needed. | ||
| The following script predicts a .1 second delay to blocktime the first week of december and a 1 second delay by the end of the month. This gives reason to address because the effect will be seen, but not so much urgency we don't have space to work around if needed. | ||
|
|
||
| ```python | ||
| def predict_diff_bomb_effect(current_blknum, current_difficulty, block_adjustment, months): | ||
|
|
@@ -35,17 +35,17 @@ def predict_diff_bomb_effect(current_blknum, current_difficulty, block_adjustmen | |
| Vars used in last prediction: | ||
| current_blknum = 12382958 | ||
| current_difficulty = 7393633000000000 | ||
| block adjustment = 9500000 | ||
| months = 5 | ||
| block adjustment = 9700000 | ||
| months = 6 | ||
| ''' | ||
| blocks_per_month = (86400 * 30) // 13 | ||
| blocks_per_month = (86400 * 30) // 13.3 | ||
| future_blknum = current_blknum + blocks_per_month * months | ||
| diff_adjustment = 2 ** ((future_blknum - block_adjustment) // 100000 - 2) | ||
| diff_adjust_coeff = diff_adjustment / current_difficulty * 2048 | ||
| return diff_adjust_coeff | ||
|
|
||
|
|
||
| diff_adjust_coeff = predict_diff_bomb_effect(12382958,7393633000000000,9500000,5) | ||
| diff_adjust_coeff = predict_diff_bomb_effect(12382958,7393633000000000,9700000,6) | ||
| ``` | ||
|
|
||
| ## Backwards Compatibility | ||
|
|
||
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.
Uh oh!
There was an error while loading. Please reload this page.
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.
Missed this spot, @MadeofTin: should be
9 700 000like the rest.