mirror of
https://github.com/status-im/EIPs.git
synced 2025-02-21 19:28:08 +00:00
Create Ice Age EIP (#4345)
* Create Ice Age EIP Signed-off-by: Tim Beiko <t.beiko23@gmail.com> * Fix EIP number Signed-off-by: Tim Beiko <t.beiko23@gmail.com> * Fix filename Signed-off-by: Tim Beiko <t.beiko23@gmail.com> * Add EthMag link Signed-off-by: Tim Beiko <t.beiko23@gmail.com> * Fix templating issues Signed-off-by: Tim Beiko <t.beiko23@gmail.com> * Change status Signed-off-by: Tim Beiko <t.beiko23@gmail.com> * Clarify timelines Signed-off-by: Tim Beiko <t.beiko23@gmail.com> * Update EIPS/eip-4345.md Co-authored-by: lightclient <14004106+lightclient@users.noreply.github.com>
This commit is contained in:
parent
332c0c6aaf
commit
b6bc14576a
57
EIPS/eip-4345.md
Normal file
57
EIPS/eip-4345.md
Normal file
@ -0,0 +1,57 @@
|
||||
---
|
||||
eip: 4345
|
||||
title: Difficulty Bomb Delay to May 2022
|
||||
description: Delays the difficulty bomb to be noticeable in May 2022.
|
||||
author: Tim Beiko (@timbeiko)
|
||||
discussions-to: https://ethereum-magicians.org/t/eip-4345-difficulty-bomb-delay-to-may-2022/7209
|
||||
status: Draft
|
||||
type: Standards Track
|
||||
category: Core
|
||||
created: 2021-10-05
|
||||
---
|
||||
|
||||
## 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 10,500,000 blocks later than the actual block number.
|
||||
|
||||
## Motivation
|
||||
Targeting for the Shanghai upgrade and/or the Merge to occur before May 2022. Either the bomb can be readjusted at that time, or removed all together.
|
||||
|
||||
## 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:
|
||||
```py
|
||||
fake_block_number = max(0, block.number - 10_500_000) if block.number >= FORK_BLOCK_NUMBER else block.number
|
||||
```
|
||||
## Rationale
|
||||
|
||||
The following script predicts a 0.25 second delay to block time by May 2022 and a 1 second delay by June. 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):
|
||||
'''
|
||||
Predicts the effect on block time (as a ratio) in a specified amount of months in the future.
|
||||
Vars used for predictions:
|
||||
current_blknum = 13346561
|
||||
current_difficulty = 9191929451665642
|
||||
block adjustment = 10500000
|
||||
months = 7 # May 2022
|
||||
months = 8 # June 2022
|
||||
'''
|
||||
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(13346561,9191929451665642,10500000,6.5)
|
||||
```
|
||||
|
||||
## Backwards Compatibility
|
||||
No known backward compatibility issues.
|
||||
|
||||
## Security Considerations
|
||||
Misjudging the effects of the difficulty can mean longer blocktimes than anticipated until a hardfork is released. Wild shifts in difficulty can affect this number severely. Also, gradual changes in blocktimes due to longer-term adjustments in difficulty can affect the timing of difficulty bomb epochs. This affects the usability of the network but unlikely to have security ramifications.
|
||||
|
||||
## Copyright
|
||||
Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/).
|
Loading…
x
Reference in New Issue
Block a user