aztec-packages
aztec-packages copied to clipboard
refactor: partial notes optimization with nullifier
Fixes #14365
Instead of storing partial note validity commitment in public storage we store it in the nullifier tree. This yields the following savings:
- One less public function call since we can insert the nullifier directly from private (as opposed to us enqueueing a public call to write the info to pub storage),
- only 1 fields sent to DA instead of 2 since nullifier tree write does not need an index (unlike pub tree write).
What tests did I decide to write
- I decided to not write any new single tx tests because that is already tested in the token contract in the
transfer_to_private.nr::transfer_to_private_internal_orchestrationtest case. - I decided to not write any new multi tx tests because that is already tested in the token contract in the
transfer_to_private.nr::transfer_to_private_external_orchestrationtest case.
Seems to be that it's all sufficiently covered already and hence no new test was needed.
-
#14432
👈 (View in Graphite)
-
#14383
-
#14379
-
master
This stack of pull requests is managed by Graphite. Learn more about stacking.