Commit history
a
port db package, update go deps, replace golint by revive
0dc1449arnaucube committed on Oct 23, 2023
a
Update value len limit,add checks on leaf addition
Update value length limit to 2^16-1, add checks on leaf addition for key
& value length.
c3e910earnaucube committed on Sep 3, 2022
a
Merge pull request #29 from vocdoni/use_io_writer
use io.Writer interface for Dump methods
c31f1a5arnaucube committed on Aug 26, 2022
P
Merge pull request #28 from vocdoni/feature/dump-writer-reader
Extend Dump methods to work with Writer&Reader
40a0fb9Pau committed on Aug 25, 2022
a
Use DefaultThresholdNLeafs if cfg.ThresholdNLeafs is not defined
d56ab85arnaucube committed on Dec 17, 2021
a
Merge pull request #26 from vocdoni/feature/addbatch-bigtrees-indisk
Feature/addbatch bigtrees indisk
96ccfdbarnau committed on Dec 17, 2021
a
Merge pull request #24 from vocdoni/feature/addbatch-invalids-error-struct
Update AddBatch to return invalids index + error
3f7e769arnau committed on Oct 11, 2021
a
Merge pull request #21 from vocdoni/feature/keyPath-key-len-check
Update keyPath to ceil(maxLvl/8), add checks that len(key)<=maxKeyLen
63f7e88arnau committed on Oct 5, 2021
a
Merge pull request #19 from vocdoni/feature/panic-toobig
Return err before silently discarding bytes
9eb7c8earnau committed on Sep 30, 2021
a
Merge pull request #20 from vocdoni/feature/SetRoot
Add tree.SetRoot (& WithTx)
d7c7563arnau committed on Sep 27, 2021
a
Merge pull request #16 from vocdoni/feature/rlocks
Update VT goroutines errs & Update Pack&UnpackSibl
4227039arnau committed on Sep 21, 2021
a
Merge pull request #14 from vocdoni/fix/missing-emptyHash-in-snapshottree
Add missing emptyHash in Snapshot Tree
f09b0b0arnau committed on Sep 9, 2021
a
Merge pull request #11 from vocdoni/fix/incNLeafs
Fix: Use GetNLeafsWithTx in incNLeafs
de5914farnau committed on Aug 31, 2021
a
Merge pull request #9 from vocdoni/fix/level
Fix level when going down & in computeHashes
4836f19arnau committed on Aug 31, 2021
a
Merge pull request #8 from vocdoni/fix/vt-addbatch
Fix/vt addbatch
61b823darnau committed on Aug 30, 2021
a
Small update on errors of UpdateWithTx, GenProofWithTx, ImportDump
5b1a40farnaucube committed on Aug 24, 2021
a
Add option to input empty values at AddBatch
Add option to input empty values at AddBatch & different number of keys
& values.
df896f6arnaucube committed on Jul 2, 2021
a
Add circom test w/ circuit for CircomVerifierProof
Add circom test with circuit for CircomVerifierProofs, which allows to
automatically check that the data generated from arbo matches the circom
circuit of a SMTVerifierProof.
Added also GHA workflow to test the circuits with the output of arbo
code.
a8c7ea9arnaucube committed on Jun 16, 2021
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
a
Use Prefix consts instead of hardcoded values in newLeafValue & newIntermediate methods
01408fbarnaucube committed on Aug 29, 2021
a
Fix level when going down & in computeHashes
Fix level when going down & in computeHashes, this affected the methods
Get, GenProof & AddBatch.
dff11f4arnaucube committed on Aug 31, 2021
a
Update VT goroutines errs & Update Pack&UnpackSibl
- Update VT goroutines errs to avoid race condition
- Update pack & unpack siblings to use 2-byte for full length & bitmap
bytes length
- Add check in UnpackSiblings to avoid panic
ed0cf70arnaucube committed on Sep 20, 2021
a
Update err msgs,update maxUint8&16, comment checks
- Update err msgs
- Update maxUint8&16
- Comment the keyPath len checks temporary to avoid external usage
errors (will be refactored in a near-future commit)
- Add missing len check on GetWithTx (commented)
cb14f1carnaucube committed on Sep 30, 2021
a
Add thresholdNLeafs configurable
ThresholdNLeafs defines the threshold number of leafs in the tree that
determines if AddBatch will work in memory or in disk. It is defined
when calling NewTree, and if set to 0 it will work always in disk.
4b6d6efarnaucube committed on Nov 22, 2021
a
Implement addBatchInDisk for big trees
Implement addBatchInDisk for big trees, which does not puts the tree in
memory, and works directly over the db data, parallelizing for each CPU.
6cf1e58arnaucube committed on Oct 14, 2021
a
Extend Dump methods to work with Writer&Reader
Add methods DumpWriter & ImportDumpReader to allow generating tree
dumps and reading them working with Reader & Writer, in order to write
and read them directly from a file (internally line by line).
2380214arnaucube committed on Aug 25, 2022
p
use io.Writer interface for Dump methods
Signed-off-by: p4u <pau@dabax.net>
c965055p4u committed on Aug 25, 2022