-
Notifications
You must be signed in to change notification settings - Fork 315
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 more memory efficient deposit merkle tree #5501
Merged
Merged
Conversation
This file contains 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
As per EIP-4881.
Use hard reference to finalized state rather than retrieveBlockState.
…its but there aren't.
rolfyone
approved these changes
May 16, 2022
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.
LGTM, caveat that discussion about left
and code analysis
ajsutton
added a commit
that referenced
this pull request
May 27, 2022
ajsutton
added a commit
to ajsutton/teku
that referenced
this pull request
May 27, 2022
…ys#5501)" (Consensys#5603)" This reverts commit dcd3bc0.
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.
PR Description
Switches our merkle tree implementation to a more memory efficient approach that supports smaller snapshots, as per EIP-4881.
Currently storage is unchanged so we aren't taking actually advantage of the snapshot functionality but still benefit from a reduction in memory and likely slightly improved performance when creating a block with deposits (we create the required deposit tree once instead of dynamically restricting the "view" to create the proof for each deposit included in the block.
The old merkle tree implementation has been moved to testFixtures since it's used in tests (and inlined the abstract parent class since it only had one subclass). This provides confirmation that we're getting the same results with the new and old implementation, but in the future we can probably remove it entirely and just use the one implementation.
Fixed Issue(s)
First step towards #5432
Documentation
doc-change-required
label to this PR if updates are required.Changelog