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

Implement get_expected_withdrawals #11618

Merged
merged 6 commits into from
Nov 7, 2022
Merged

Conversation

potuz
Copy link
Contributor

@potuz potuz commented Nov 4, 2022

This PR implements get_expected_withdrawals as in the specs. It produces the next withdrawals that should be packed in an execution payload.

This PR implements some helpers as pure functions when they are already implemented as ReadOnlyValidator these should be removed in a future PR when the implementation is more clear

#11619

@potuz potuz requested a review from a team as a code owner November 4, 2022 14:46
@potuz potuz added Ready For Review A pull request ready for code review OK to merge labels Nov 4, 2022
beacon-chain/state/state-native/getters_withdrawal_test.go Outdated Show resolved Hide resolved
beacon-chain/state/state-native/getters_withdrawal_test.go Outdated Show resolved Hide resolved
require.Equal(t, true, v.IsPartiallyWithdrawable(params.BeaconConfig().MaxEffectiveBalance+1))
}

func TestExpectedWithdrawals(t *testing.T) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I would like to see a test case where the validator index wraps around.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

All tests do this.

@prylabs-bulldozer prylabs-bulldozer bot merged commit 37108e6 into develop Nov 7, 2022
@delete-merged-branch delete-merged-branch bot deleted the get_expected_withdrawals branch November 7, 2022 14:11
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants