-
Notifications
You must be signed in to change notification settings - Fork 1k
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
eip7251: Bugfix and more withdrawal tests #14578
Conversation
CHANGELOG.md
Outdated
@@ -43,6 +43,7 @@ The format is based on Keep a Changelog, and this project adheres to Semantic Ve | |||
- Fixed mesh size by appending `gParams.Dhi = gossipSubDhi` | |||
- Fix skipping partial withdrawals count. | |||
- wait for the async StreamEvent writer to exit before leaving the http handler, avoiding race condition panics [pr](https://github.com/prysmaticlabs/prysm/pull/14557) | |||
- EIP7521 - fixing withdrawal bug |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we be more specific with this change log? High level: what is the bug?
@@ -155,6 +158,15 @@ func (b *BeaconState) ExpectedWithdrawals() ([]*enginev1.Withdrawal, uint64, err | |||
if err != nil { | |||
return nil, 0, errors.Wrapf(err, "could not retrieve balance at index %d", validatorIndex) | |||
} | |||
if b.version >= version.Electra { | |||
var partiallyWithdrawnBalance uint64 | |||
for _, w := range withdrawals { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is fine and not really worth optimizing, it's nice to read along the spec, but if you want to optimize it, we could use a map or track the length of withdrawals before entering the for loop and break at that index.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'm not sure if that's worth it, the withdrawals should be pretty short here
need to update devnet 5 spec tests later |
What type of PR is this?
Bug fix
What does this PR do? Why is it needed?
implements ethereum/consensus-specs#3979 for devnet 5
should be updated along with new spec tests.
Which issues(s) does this PR fix?
Fixes #
Other notes for review
Acknowledgements