-
Notifications
You must be signed in to change notification settings - Fork 11
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
Feature/stored nodes minimal #71
Merged
matkt
merged 13 commits into
hyperledger:main
from
Quadratic-Labs:feature/stored_nodes_minimal
Oct 1, 2024
Merged
Feature/stored nodes minimal #71
matkt
merged 13 commits into
hyperledger:main
from
Quadratic-Labs:feature/stored_nodes_minimal
Oct 1, 2024
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
Signed-off-by: Thomas Zamojski <[email protected]>
Signed-off-by: Thomas Zamojski <[email protected]>
Stored nodes have encoded values with at least uncompressed commitments and children hashes. All (little-endian) bytes are also tail truncated to compress their representation. Furthermore, null nodes are represented by empty bytes (0x80 in RLP encoding). The commit also includes a major refactoring of location attribute for nodes. Previously, leaf location was their full key, which was a little awkward. Now, node location is truly its location in the trie, no matter what kind of node it is. Among other things, this means that we store a StemNode's depth along its stem, so we can retrieve its location. Coming up is the possibility to store commitments in compressed form, which would save a lot of space (50% on commitments). Signed-off-by: Thomas Zamojski <[email protected]>
Signed-off-by: Thomas Zamojski <[email protected]>
Signed-off-by: Thomas Zamojski <[email protected]>
Signed-off-by: Karim Taam <[email protected]>
Signed-off-by: Thomas Zamojski <[email protected]>
Signed-off-by: Thomas Zamojski <[email protected]>
Signed-off-by: Thomas Zamojski <[email protected]>
Signed-off-by: Thomas Zamojski <[email protected]>
Signed-off-by: Thomas Zamojski <[email protected]>
|
Signed-off-by: Karim Taam <[email protected]>
fix leaf update
matkt
approved these changes
Oct 1, 2024
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
This is a continuation of the previous PR #65
It appeared that the previous PR had some bugs, and meanwhile it was decided to add stem extensions into the DB in order to be able to get stemNodes by stem without requiring a nearest request.
In this PR, InternalNodes include stem extensions into its encodedValues, useful to create the children Stored Nodes including their appropriate keys (location or stem). The key is then used to load the StoredNode.
StoredNode are also separated into Internal and Stem Nodes as well to reflect this difference.
Fixed Issue(s)