Electra: EIP-7251 implement process_withdrawal updates#14181
Merged
Conversation
f4c98b6 to
6852f64
Compare
prestonvanloon
commented
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 |
Member
Author
There was a problem hiding this comment.
These changes are just updating the spec definition after #14091
prestonvanloon
commented
Jul 3, 2024
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)) | ||
| } |
Member
Author
There was a problem hiding this comment.
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.
143d472 to
968ea8b
Compare
968ea8b to
5757e0b
Compare
james-prysm
approved these changes
Jul 11, 2024
Contributor
james-prysm
left a comment
There was a problem hiding this comment.
went through it, all changes made sense to me, mostly focused on the partialWithdrawalsCount usage
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.