Commit history
a
Add Tree Circom Verifier Proofs
Circom Verifier Proofs allow to verify through a zkSNARK proof the
inclusion/exclusion of a leaf in a tree. This commit adds the needed
code in go to generate the circuit inputs for a CircomVerifierProof.
43cad71arnaucube committed on Jun 16, 2021
a
Update upFromNodes function for unbalanced tree
- Update upFromNodes function for unbalanced tree case
- Add AddBatchTestVector2 & 3 with some edge cases
- Add checkRoots test method, which stores the Dump of the tree to file for after-debug
2c62f31arnaucube committed on Jun 3, 2021
a
Update check of already existing key on add
- Update check of already existing key on add
- Update docs of methods
467f063arnaucube committed on Jun 2, 2021
a
Update public methods signatures
- Update public methods signatures
- Remove 'lastAccess' param
- Add option to pass root for tree.Dump, Iterate, IterateWithStop,
Graphviz (and related)
- Move error messages to const defined error messages for external usage
0b2c3b0arnaucube committed on May 26, 2021
a
Add TestAddBatchBench
TestAddBatchBench
nCPU: 4, nLeafs: 50000, hash: Blake2b, db: leveldb
Add loop: 9.304195479s
AddBatch: 817.590526ms
2a57e22arnaucube committed on May 20, 2021
a
Remove cropping on pow of two the kvs for AddBatch
- Remove cropping on power of two the kvs for AddBatch
- As not needed to be power of two length with the Virtual Tree
- Fix keyValuesToKvs keyPath
13378d3arnaucube committed on May 19, 2021
a
AddBatch use Virtual Tree for empty trees/subtrees
- AddBatch use Virtual Tree for cases A,B,C
- ImportDump use AddBatch instead of adding one by one
- Reorg & add more virtual tree tests
03bb9f7arnaucube committed on May 18, 2021
a
Implement Virtual Tree construction
VirtualTree (vt) computes a tree without computing any hash. With the
idea of once all the leafs are placed in their positions, the hashes can
be computed, avoiding computing a node hash more than one time.
8a8ec8carnaucube committed on May 17, 2021
a
Replace naive AddBatch by optimized AddBatch
- Replace naive AddBatch by optimized AddBatch
- Add blake2b hash support
- Expose needed methods for external usage (ReadLeafValue,
ReadIntermediateChilds)
- Return 'value' in GenProof
6dcbbdfarnaucube committed on May 8, 2021
a
Update CaseB to handle repeated keys cases
- Update CaseB to handle repeated keys cases
- Add test for AddBatch/CaseB with repeated keys
- AddBatch-tests abstract code reusage
0eda440arnaucube committed on May 8, 2021
a
Add CPU parallelization to AddBatch CaseD
AddBatch in CaseD, is parallelized (for each CPU) until almost the top
level, almost dividing the needed time by the number of CPUs.
1c2b7d6arnaucube committed on Apr 24, 2021
a
Add AddBatch CaseD
CASE D: Already populated Tree
==============================
- Use A, B, C, D as subtree
- Sort the Keys in Buckets that share the initial part of the path
- For each subtree add there the new leafs
R
/ \
/ \
/ \
* *
/ | / \
/ | / \
/ | / \
L: A B C D
/\ /\ / \ / \
... ... ... ... ... ...
890057carnaucube committed on Apr 24, 2021
a
Start to impl AddBatch efficient algorithm Case A
In case that the tree is empty, build the full tree from bottom to top
(from all the leaf to the root).
02b141darnaucube committed on Apr 17, 2021
a
Tests migrate from stretchr/testify to frankban/quicktest
f8ac4bearnaucube committed on Apr 3, 2021