Skip to content

Commit

Permalink
Merge pull request #1023 from ethereum/ralexstokes-patch-1
Browse files Browse the repository at this point in the history
Add notes to compute fork choice at genesis
  • Loading branch information
djrtwo committed May 6, 2019
2 parents ef90e23 + 7d0a619 commit 148f18c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions specs/core/0_fork-choice.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
- [Time parameters](#time-parameters)
- [Beacon chain processing](#beacon-chain-processing)
- [Beacon chain fork choice rule](#beacon-chain-fork-choice-rule)
- [Implementation notes](#implementation-notes)
- [Justification and finality at genesis](#justification-and-finality-at-genesis)

<!-- /TOC -->

Expand Down Expand Up @@ -99,3 +101,9 @@ def lmd_ghost(store: Store, start_state: BeaconState, start_block: BeaconBlock)
# Ties broken by favoring block with lexicographically higher root
head = max(children, key=lambda x: (get_vote_count(x), hash_tree_root(x)))
```

## Implementation notes

### Justification and finality at genesis

During genesis, justification and finality root fields within the `BeaconState` reference `ZERO_HASH` rather than a known block. `ZERO_HASH` in `previous_justified_root`, `current_justified_root`, and `finalized_root` should be considered as an alias to the root of the genesis block.

0 comments on commit 148f18c

Please sign in to comment.