-
Notifications
You must be signed in to change notification settings - Fork 94
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
refactor: Move nullifier tree batch insertion logic into bberg #564
base: master
Are you sure you want to change the base?
Conversation
* Special Considerations | ||
* | ||
* Short algorithm description: | ||
* When batch inserting values into the tree, we first update their "low_nullifiers" (the node that will insert to the |
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.
"the node that will insert to the inserted value" could perhaps be reworded
Are low nullifiers basically tree leaves? |
} | ||
// If there is a lower value in the tree, we need to check the current low nullifiers for one that can be used | ||
if (has_less_than) { | ||
for (size_t j = 0; j < pending_insertion_tree.size(); ++j) { |
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.
could do for (nullifier_leaf& pending : pending_insertion_tree)
, no?
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.
I gave it a read and a ponder. I think given it has tests, it's been used + has sat for a while I might say take this approve and just introduce a few method extract refactors to make the core algorithm read a bit more like pseudocode and use C++ foreach loops before merging (maybe).
Description
linked to: AztecProtocol/aztec-packages#335
Right now batch insertion info that is used by the circuits is currently implemented within a file called
nullifier_tree_testing_harness
it was placed here during the hackathon to get circuits up and running quickly. This pr moves the logic (just the batch insertion algorithm) into core bb.Checklist:
@brief
describing the intended functionality.include
directives have been added.