Add notes in merge/fork.md

This commit is contained in:
lsankar4033 2021-09-08 13:03:05 -07:00
parent 01fe3cdb08
commit 0f7d8e5552
1 changed files with 5 additions and 2 deletions

View File

@ -103,7 +103,7 @@ def upgrade_to_merge(pre: altair.BeaconState) -> BeaconState:
### Initializing transition store
If `state.slot % SLOTS_PER_EPOCH == 0` and `compute_epoch_at_slot(state.slot) == MERGE_FORK_EPOCH`, a transition store is initialized to be further utilized by the transition process of the Merge.
If `state.slot % SLOTS_PER_EPOCH == 0`, `compute_epoch_at_slot(state.slot) == MERGE_FORK_EPOCH`, and the transition store has not already been initialized, a transition store is initialized to be further utilized by the transition process of the Merge.
Transition store initialization occurs after the state has been modified by corresponding `upgrade_to_merge` function.
@ -127,3 +127,6 @@ def initialize_transition_store(state: BeaconState) -> TransitionStore:
pow_block = get_pow_block(state.eth1_data.block_hash)
return get_transition_store(pow_block)
```
Note that transition store can also be initialized at client startup by [overriding terminal total
difficulty](specs/merge/client_settings.md#override-terminal-total-difficulty).