From 038edb5b34fe944a2025bfe0c4298dae97fd2b96 Mon Sep 17 00:00:00 2001 From: Mikhail Kalinin Date: Tue, 8 Jun 2021 17:16:52 +0600 Subject: [PATCH] Rename SECONDS_SINCE_MERGE_FORK -> TARGET_SECONDS_TO_MERGE --- specs/merge/fork.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/specs/merge/fork.md b/specs/merge/fork.md index 141b05faa..1f2ea7fff 100644 --- a/specs/merge/fork.md +++ b/specs/merge/fork.md @@ -29,7 +29,7 @@ Warning: this configuration is not definitive. | `MERGE_FORK_VERSION` | `Version('0x02000000')` | | `MERGE_FORK_EPOCH` | `Epoch(18446744073709551615)` **TBD** | | `MIN_ANCHOR_POW_BLOCK_DIFFICULTY` | **TBD** | -| `SECONDS_SINCE_MERGE_FORK` | `uint64(7 * 86400)` = (604,800) | +| `TARGET_SECONDS_TO_MERGE` | `uint64(7 * 86400)` = (604,800) | ## Fork to Merge @@ -103,11 +103,11 @@ Transition store initialization occurs after the state has been modified by corr def compute_transition_total_difficulty(anchor_pow_block: PowBlock) -> uint256: seconds_per_voting_period = EPOCHS_PER_ETH1_VOTING_PERIOD * SLOTS_PER_EPOCH * SECONDS_PER_SLOT pow_blocks_per_voting_period = seconds_per_voting_period // SECONDS_PER_ETH1_BLOCK - pow_blocks_since_merge_fork = SECONDS_SINCE_MERGE_FORK // SECONDS_PER_ETH1_BLOCK - pow_blocks_to_transition = ETH1_FOLLOW_DISTANCE + pow_blocks_per_voting_period + pow_blocks_since_merge_fork + pow_blocks_to_merge = TARGET_SECONDS_TO_MERGE // SECONDS_PER_ETH1_BLOCK + pow_blocks_after_anchor_block = ETH1_FOLLOW_DISTANCE + pow_blocks_per_voting_period + pow_blocks_to_merge anchor_difficulty = max(MIN_ANCHOR_POW_BLOCK_DIFFICULTY, anchor_pow_block.difficulty) - return anchor_pow_block.total_difficulty + anchor_difficulty * pow_blocks_to_transition + return anchor_pow_block.total_difficulty + anchor_difficulty * pow_blocks_after_anchor_block def get_transition_store(anchor_pow_block: PowBlock) -> TransitionStore: