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

remove equivocating votes from forkchoice #10597

Merged
merged 5 commits into from
May 2, 2022

Conversation

potuz
Copy link
Contributor

@potuz potuz commented May 2, 2022

This PR includes the necessary changes and helper functions on forkchoice to implement ethereum/consensus-specs#2845

It does not prune slashed indices (in the worst case scenario of 1/3 of the entire network being slashed it's about 1GB in memory and we have bigger problems).

It does not implement blockchain package changes, it's contained to forkchoice.

@potuz potuz requested a review from a team as a code owner May 2, 2022 00:22
@potuz potuz added Ready For Review A pull request ready for code review Spec labels May 2, 2022
defer f.votesLock.RUnlock()

if index > types.ValidatorIndex(len(f.balances)) {
return
Copy link
Member

Choose a reason for hiding this comment

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

I wonder if these plain returns should really be error returns

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There's no need for an error, these could be for example a new validator who's first transaction is a slashable offense. In this case we would honestly not have these balances in forkchoice.

@prylabs-bulldozer prylabs-bulldozer bot merged commit 4c869fa into develop May 2, 2022
@delete-merged-branch delete-merged-branch bot deleted the remove_equivocating_validators branch May 2, 2022 19:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ready For Review A pull request ready for code review Spec
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants