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

eip-7251: queue_entire_balance_and_reset_validator, queue_excess_active_balance, and switch_to_compounding_validator #13982

Merged
merged 1 commit into from
May 13, 2024

Conversation

return err
}
if len(v.WithdrawalCredentials) == 0 {
return errors.New("validator has no withdrawal credentials")
Copy link
Contributor

@kasey kasey May 10, 2024

Choose a reason for hiding this comment

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

Are you sure this should be an error and not just return nil? I think it is valid for a consolidation to come from a validator where has_compounding_withdrawal_credential is true and has_eth1_withdrawal_credential is false. I think this would be the case where you decide to consolidate 2 validators that were created with compounding withdrawal credentials? But this function would treat the presence of such a pending consolidation as an error.

Copy link
Contributor

Choose a reason for hiding this comment

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

Strike that, I see this is protecting against an out of bound index panic. It should be impossible for a validator without a credential to even get in the consolidations queue. Makes sense to be defensive here even though something is deeply messed up if we hit this case.

kasey
kasey previously approved these changes May 13, 2024
kasey
kasey previously approved these changes May 13, 2024
…ve_balance, and switch_to_compounding_validator with tests
@prestonvanloon prestonvanloon added this pull request to the merge queue May 13, 2024
Merged via the queue into develop with commit c5a36d4 May 13, 2024
16 of 17 checks passed
@prestonvanloon prestonvanloon deleted the eip-7251-validator-processing branch May 13, 2024 18:19
ErnestK pushed a commit to ErnestK/prysm that referenced this pull request May 19, 2024
…ve_balance, and switch_to_compounding_validator with tests (prysmaticlabs#13982)
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