You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The code in this project shows recursive verification of Noir functions.
6
6
7
-
## Compile all the things
7
+
The primary function is simply addition, and verifies the re-calculation of one path up a binary tree from two leaf nodes.
8
+
A more useful application of this design would be proving the hash of data in a merkle tree (leaf nodes), up to the merkle root. Amortizing the cost of proving each hash per nested call.
8
9
9
-
`yarn compile:all`
10
+
## The circuits
11
+
The function doing the calculation, in this case addition, is in the sumLib. It is used in both recursive circuits: `sum` and `recursiveLeaf`.
10
12
11
-
## Run main typescript
13
+
## Verification
14
+
Results of a call to `sum` are verified in `recursiveLeaf`, which itself also calls `sum` again. The results of the `recursiveLeaf` call are then verified in `recursiveNode`.
0 commit comments