-
Notifications
You must be signed in to change notification settings - Fork 1.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
Fix electra state to safe share references on pending fields when append #14895
Conversation
ff8c62b
to
7e2a5a0
Compare
b.markFieldAsDirty(types.PendingConsolidations) | ||
b.rebuildTrie[types.PendingConsolidations] = true | ||
b.addDirtyIndices(types.PendingConsolidations, []uint64{uint64(len(b.pendingConsolidations) - 1)}) |
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.
Remove the dirty indices line, this is only used if we maintain a field trie for the particular field
b.markFieldAsDirty(types.PendingDeposits) | ||
b.rebuildTrie[types.PendingDeposits] = true | ||
b.addDirtyIndices(types.PendingDeposits, []uint64{uint64(len(b.pendingDeposits) - 1)}) |
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.
same here
b.markFieldAsDirty(types.PendingPartialWithdrawals) | ||
b.rebuildTrie[types.PendingPartialWithdrawals] = true | ||
b.addDirtyIndices(types.PendingPartialWithdrawals, []uint64{uint64(len(b.pendingPartialWithdrawals) - 1)}) |
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.
same here
ab62c42
to
74adbe6
Compare
This PR fixes:
uint64
, which should not be rebuilt this way.Note to the reviewers: please review
DequeuePendingPartialWithdrawals
, I added a unit test, the current implementation seems ok as test passes, but please double check no action is needed there