-
Notifications
You must be signed in to change notification settings - Fork 17
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
docs: sparse merkle trees #105
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
ACK |
SWvheerden
reviewed
Sep 13, 2023
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.
ACK
AaronFeickert
suggested changes
Sep 13, 2023
Co-authored-by: Aaron Feickert <66188213+AaronFeickert@users.noreply.github.com>
CjS77
commented
Sep 14, 2023
AaronFeickert
approved these changes
Sep 14, 2023
stringhandler
pushed a commit
to tari-project/tari
that referenced
this pull request
Oct 12, 2023
Description --- This replaces the UTXO MMR and the Roaring bitmap with a single SMT. Motivation and Context --- See: tari-project/rfcs#105 as to why the SMT is the better choice. How Has This Been Tested? --- Manual
SWvheerden
added a commit
to tari-project/tari
that referenced
this pull request
Oct 25, 2023
Description --- This replaces the UTXO MMR and the Roaring bitmap with a single SMT. Motivation and Context --- See: tari-project/rfcs#105 as to why the SMT is the better choice. How Has This Been Tested? --- Manual
SWvheerden
added a commit
to tari-project/tari
that referenced
this pull request
Nov 1, 2023
Description --- This replaces the UTXO MMR and the Roaring bitmap with a single SMT. Motivation and Context --- See: tari-project/rfcs#105 as to why the SMT is the better choice. How Has This Been Tested? --- Manual
SWvheerden
added a commit
to tari-project/tari
that referenced
this pull request
Nov 2, 2023
Description --- This replaces the UTXO MMR and the Roaring bitmap with a single SMT. Motivation and Context --- See: tari-project/rfcs#105 as to why the SMT is the better choice. How Has This Been Tested? --- Manual
SWvheerden
added a commit
to tari-project/tari
that referenced
this pull request
Nov 2, 2023
Description --- This replaces the UTXO MMR and the Roaring bitmap with a single SMT. Motivation and Context --- See: tari-project/rfcs#105 as to why the SMT is the better choice. How Has This Been Tested? --- Manual
SWvheerden
added a commit
to tari-project/tari
that referenced
this pull request
Nov 2, 2023
Description --- This replaces the UTXO MMR and the Roaring bitmap with a single SMT. Motivation and Context --- See: tari-project/rfcs#105 as to why the SMT is the better choice. CRoaring, the library that is used by Tari for the roaring bitmap also has a few security issues such as panicking on certain random inputs. How Has This Been Tested? --- Manual, and unit tests What process can a PR reviewer use to test or verify this change? --- --------- Co-authored-by: Hansie Odendaal <39146854+hansieodendaal@users.noreply.github.com>
CjS77
added a commit
that referenced
this pull request
Dec 19, 2023
This Request for Comment (RFC) proposes replacing the current Mutable Merkle Mountain Range (MMMR) data structure used for tracking the commitment to the UTXO set, with a Sparse Merkle tree (SMT). A sparse Merkle tree ([SMT]) is a Merkle-type structure, except the contained data is indexed, and each datapoint is placed at the leaf that corresponds to that datapoint’s index. Empty nodes are represented by a predefined "null" value. Since every empty node has the same hash, and the tree is sparse, it is possible to prune the tree in a way such that only the non-zero leaf nodes and placeholders marking the empty sub-trees are stored. Therefore, SMTs are relatively compact. --------- Co-authored-by: Aaron Feickert <66188213+AaronFeickert@users.noreply.github.com>
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.
This Request for Comment (RFC) proposes replacing the current Mutable Merkle Mountain Range (MMMR) data structure
used for tracking the commitment to the UTXO set, with a Sparse Merkle tree (SMT).
A sparse Merkle tree ([SMT]) is a Merkle-type structure, except the contained data is indexed, and each datapoint is
placed at the leaf that corresponds to that datapoint’s index. Empty nodes are represented by a predefined "null" value.
Since every empty node has the same hash, and the tree is sparse, it is possible to prune the tree in a way such
that only the non-zero leaf nodes and placeholders marking the empty sub-trees are stored. Therefore, SMTs are
relatively compact.