Skip to content

Commit

Permalink
commit
Browse files Browse the repository at this point in the history
  • Loading branch information
workingdoge committed Nov 12, 2023
1 parent a3fb04a commit 5caa08b
Show file tree
Hide file tree
Showing 9 changed files with 375 additions and 217 deletions.
38 changes: 19 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
# Mina zkApp: Index Merkle Tree

This template uses TypeScript.

## How to build
- more efficient proofs

```sh
npm run build
```
- two tree model -> one tree for storing (commitments to) data
-> another tree for signalling if data is stale (nullifier tree)
- consuming data emits a nullifier
- nullifier has a deterministic derivation from original state

## How to run tests
- legacy approach: sparse merkle trees
- updatable merkle tree with as many leaves as values
- membership proofs for null values
- tree blows up in size (2**254) (lots of hashing)

```sh
npm run test
npm run testw # watch mode
```
- use a linked list of nodes to prove what is missing

## How to run coverage
Node 1 -- next higher value --> Node 2
1 -> 10 (then 2-9 doesn't exist)

```sh
npm run coverage
```

## License

[Apache-2.0](LICENSE)
- we extend append only trees
- at each leaf we store 3 values
- Val
- Next index
- Next Value
- Val -> nextVal will have nothing in it
- we have a proof of non-inclusion of a value $x$ by a proof of inclusion of a node where val < $x$ < nextVal
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "index-merkle-tree",
"name": "nullifier-tree",
"version": "0.1.0",
"description": "",
"author": "",
Expand Down
67 changes: 0 additions & 67 deletions src/Add.test.ts

This file was deleted.

25 changes: 0 additions & 25 deletions src/Add.ts

This file was deleted.

3 changes: 0 additions & 3 deletions src/index.ts

This file was deleted.

100 changes: 0 additions & 100 deletions src/interact.ts

This file was deleted.

Loading

0 comments on commit 5caa08b

Please sign in to comment.