forked from visoftsolutions/noir_rs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: public data tree as indexed tree (AztecProtocol#3566)
Resolves AztecProtocol#501 This PR changes the Public Data tree to an indexed tree of height 40. This optimizes insertions at the base rollup, reducing hashing and allowing batch insertion. In order to do this: - Now blocks use a snapshot for the public data tree, not just a root - Now indexed leaves have an updateTo method that allows updates. Nullifiers disallow updates. - The standard indexed tree realizes when a low leaf is an exact match and updates the low leaf instead. - The base rollup does indexed tree insertions for the public data tree, applying the update logic. - When fetching a slot from the public data tree, we get the low leaf for the given slot. If the low leaf is not an exact match, the value hasn't been inserted and the stored value is zero. If it's an exact match, the latest value is contained in the leaf.
- Loading branch information
1 parent
260c7c3
commit 4711ef7
Showing
78 changed files
with
2,175 additions
and
789 deletions.
There are no files selected for viewing
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
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
Oops, something went wrong.