Skip to content

Commit

Permalink
chore: redo typo PR by savvar9991 (#11412)
Browse files Browse the repository at this point in the history
Thanks savvar9991 for
#11408. Our policy
is to redo typo changes to dissuade metric farming. This is an automated
script.
  • Loading branch information
AztecBot authored Jan 23, 2025
1 parent 9796e1e commit 53ea3af
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ The insertion protocol is described below:
1. Look for a nullifier's corresponding low_nullifier where:

$$
low\_nullifier_{\textsf{next\_value}} > v
low\_nullifier_{\textsf{next\_value}} > new\_nullifier
$$

> if $new\_nullifier$ is the largest use the leaf:
Expand All @@ -86,7 +86,7 @@ The insertion protocol is described below:
3. Perform a range check on the low nullifier's value and next_value fields:

$$
new\_nullifier > low\_nullifier_{\textsf{value}} \: \&\& \: ( new\_nullifier < low\_nullifier_{\textsf{next\_value}} \: \| \: low\_nullifier_{\textsf{next\_value}} == 0 )
new\_nullifier > low\_nullifier_{\textsf{value}} \: \&\& \: ( new\_nullifier < low\_nullifier_{\textsf{next\_value}} \: || \: low\_nullifier_{\textsf{next\_value}} == 0 )
$$

4. Update the low nullifier pointers
Expand Down Expand Up @@ -217,7 +217,7 @@ In the following example we insert a subtree of size 4 into our tree at step 4.

<Image img={require("/img/indexed-merkle-tree/subtree-insert-7.png")} />

#### Performance gains from subtree insertion
### Performance gains from subtree insertion

Let's go back over the numbers:
Insertions into a sparse nullifier tree involve 1 non membership check (254 hashes) and 1 insertion (254 hashes). If we were performing insertion for 4 values that would entail 2032 hashes.
Expand Down

0 comments on commit 53ea3af

Please sign in to comment.