-
Notifications
You must be signed in to change notification settings - Fork 997
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
Decouple justification and finalization processing #925
Conversation
More readable and saves a few lines.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving but I hope someone can figure out another name than previous_previous_justified_epoch
. 😆
I guess |
state.finalized_epoch = antepenultimate_justified_epoch | ||
state.finalized_root = get_block_root(state, get_epoch_start_slot(state.finalized_epoch)) | ||
# The 1st/2nd/3rd most recent epochs are justified, the 1st using the 3rd as source | ||
if (bitfield >> 0) % 8 == 0b111 and state.previous_justified_root == current_epoch - 2: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a bug. making new PR
I'm pretty sure we used to do it in a similar way but this was seen as difficult to analyze because we were changing things around in the state before running the comparisons.. For example parsing what |
Addresses @djrtwo's comment [here](#925 (comment)).
Addresses @djrtwo's comment [here](#925 (comment)).
More readable and saves a few lines.