Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Justifed state in LMD GHOST #768

Closed
djrtwo opened this issue Mar 13, 2019 · 3 comments
Closed

Justifed state in LMD GHOST #768

djrtwo opened this issue Mar 13, 2019 · 3 comments
Labels
milestone:June 30 freeze 🥶 Phase 0 spec freeze for long-lived cross-client testnet scope:fork-choice

Comments

@djrtwo
Copy link
Contributor

djrtwo commented Mar 13, 2019

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"

@JustinDrake
Copy link
Contributor

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

@mratsim
Copy link
Contributor

mratsim commented Mar 19, 2019

That would be great to produce test vectors.

The only existing reference code in Python is unfortunately outdated:

@JustinDrake
Copy link
Contributor

This was addressed in 1198

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
milestone:June 30 freeze 🥶 Phase 0 spec freeze for long-lived cross-client testnet scope:fork-choice
Projects
None yet
Development

No branches or pull requests

4 participants