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

Electra: EIP-7251 implement process_withdrawal updates #14181

Merged
merged 2 commits into from
Jul 12, 2024

Conversation

prestonvanloon
Copy link
Member

@prestonvanloon prestonvanloon commented Jul 3, 2024

What type of PR is this?

Feature

What does this PR do? Why is it needed?

Part of ethereum/consensus-specs#3668

Which issues(s) does this PR fix?

Other notes for review

Draft until unit tests are added for the DequeuePendingPartialWithdrawals call.

@prestonvanloon prestonvanloon added the Electra electra hardfork label Jul 3, 2024
// # If partial withdrawal queue is full, only full exits are processed
// if len(state.pending_partial_withdrawals) == PENDING_PARTIAL_WITHDRAWALS_LIMIT and not is_full_exit_request:
// return
// amount = withdrawal_request.amount
Copy link
Member Author

Choose a reason for hiding this comment

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

These changes are just updating the spec definition after #14091

Comment on lines +169 to +171
if len(wds) != len(expectedWithdrawals) {
return nil, fmt.Errorf("execution payload header has %d withdrawals when %d were expected", len(wds), len(expectedWithdrawals))
}
Copy link
Member Author

Choose a reason for hiding this comment

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

Discussed offline with Potuz. This check isn't technically required since the withdrawal roots won't match if the length of withdrawals are different. However, I found it very helpful in debugging and it is essentially free to access the length of the slices.

@prestonvanloon prestonvanloon marked this pull request as ready for review July 11, 2024 18:38
@prestonvanloon prestonvanloon requested a review from a team as a code owner July 11, 2024 18:38
Copy link
Contributor

@james-prysm james-prysm left a comment

Choose a reason for hiding this comment

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

went through it, all changes made sense to me, mostly focused on the partialWithdrawalsCount usage

@prestonvanloon prestonvanloon added this pull request to the merge queue Jul 12, 2024
Merged via the queue into develop with commit c238c00 Jul 12, 2024
16 of 17 checks passed
@prestonvanloon prestonvanloon deleted the electra-process_withdrawal branch July 12, 2024 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Electra electra hardfork
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants