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

Fix period tail in get_eth1_vote #1468

Merged
merged 1 commit into from
Nov 7, 2019
Merged

Fix period tail in get_eth1_vote #1468

merged 1 commit into from
Nov 7, 2019

Conversation

djrtwo
Copy link
Contributor

@djrtwo djrtwo commented Nov 7, 2019

This is a cleanup of get_eth1_vote inspired by @paulhauner's PR #1463 and subsequent conversation.

The previous version was incorrectly assuming that there was an eth1_data_vote per slot, but this is not the case when 100% of proposers don't get blocks into the chain. Instead the period tail should be based upon the actual slot.

This PR simplifies the logic so that in the early slots of a voting period, you only consider new_eth1_data when deciding your vote, but in the period tail to encourage settling on a vote, you consider all_eth1_data.

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

@protolambda protolambda merged commit 28eda5c into v09x Nov 7, 2019
@protolambda protolambda deleted the fix-period-tail branch November 7, 2019 19:28
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.

2 participants