Eth2.0-specs: Justifed state in LMD GHOST

Created on 13 Mar 2019  路  3Comments  路  Source: ethereum/eth2.0-specs

Issue

justified_head_state which is used to get the active validator set for lmd_ghost is currently defined as "the resulting BeaconState object from processing the chain up to the justified_head".

This is correct in the "happy" case in which no slots were skipped between the justified_head and the epoch boundary that was justified, but in the case that slots were skipped between the head and epoch boundary slot (% epoch_length == 0), the justified head is actually the block from a prior slot but at the state at the epoch boundary slot. For example, if a block at slot 63 (epoch 0) is justified for epoch 1 (epoch boundary @ slot 64) in the case that there was no block for slot 64, then the state associated with this (justified_block, justified_epoch) tuple is actually the justified block from slot 63 transitioned through an additional slot to slot 64.

Solution

Define justified_head_state as "the resulting BeaconState object from processing the chain up to the justified_head through the start slot of justified_epoch"

June 30 freeze 馃ザ fork-choice

Most helpful comment

We probably also want to make the fork choice rule spec executable.

All 3 comments

We probably also want to make the fork choice rule spec executable.

That would be great to produce test vectors.

The only existing reference code in Python is unfortunately outdated:

This was addressed in 1198

Was this page helpful?
0 / 5 - 0 ratings