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

Fork choice fix issue 1574 #1580

Merged
merged 1 commit into from
Jan 22, 2020
Merged

Fork choice fix issue 1574 #1580

merged 1 commit into from
Jan 22, 2020

Conversation

djrtwo
Copy link
Contributor

@djrtwo djrtwo commented Jan 21, 2020

Fixes #1574

Ensure justified checkpoint in store updates when finalized checkpoint updates if either of the following:

  • new justified is higher epoch than previous in store
  • previous justified checkpoint in store is not in the chain with the new finalized checkpoint

Built off of branch epochs-in-fork-choice to use the fixed get_ancestor logic. Will switch to v010x once #1579 is merged

@djrtwo
Copy link
Contributor Author

djrtwo commented Jan 21, 2020

cc @paulhauner

Copy link
Collaborator

@protolambda protolambda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, and not nice use of get_ancestor for checking the chain. Should be a simple O(1) check with the proto-array implementations of prysm and lighthouse, and close to that with the old stateful approach of lodestar.

@djrtwo djrtwo changed the base branch from epochs-in-fork-choice to v010x January 22, 2020 23:55
@djrtwo djrtwo merged commit eed3f60 into v010x Jan 22, 2020
@djrtwo djrtwo deleted the fork-choice-fix-1574 branch January 22, 2020 23:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants