Commit Graph

15 Commits

Author SHA1 Message Date
Lucas Menendez
ad9158e682 debug traces removed 2025-04-11 09:08:06 +02:00
Lucas Menendez
fe46bde657 fix key encoding 2025-04-10 10:11:10 +02:00
Lucas Menendez
32eb6a6930 update multiposeidon to work with large bigints 2025-04-08 08:34:14 +02:00
Lucas Menendez
10be9eebaa tests fixed 2025-03-28 14:29:13 +01:00
Lucas Menendez
7f346d7909 fix issues with multiple large values with some hashes 2025-03-28 13:10:28 +01:00
Lucas Menendez
d3c9062d6e gnark proof generation and test 2025-03-26 22:28:59 +01:00
Lucas Menendez
396e933ebd linter suggestions 2025-03-26 12:52:22 +01:00
Lucas Menendez
72ab6fc585 new internal datase to store large and multiple values encoded, new methods to handle big ints as keys and multiple big ints as values of tree leaves 2025-03-26 12:49:13 +01:00
Lucas Menéndez
8e1cc943f4 feature: mimc bls12 377 (#31)
add mimc hash implementation over bls12_377 ecc from gnark
2024-11-20 12:26:23 +01:00
p4u
3554342282 update dependencies, upgrade code and add a memory database
Signed-off-by: p4u <pau@dabax.net>
2024-11-06 09:45:28 +01:00
arnaucube
4b6d6efdca 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.
2021-11-23 06:59:33 +01:00
arnaucube
6cf1e58d9f 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.
2021-10-25 14:55:42 +02:00
arnaucube
30d8b42fd3 Add checks that len(key)<=maxKeyLen
Add checks that the key is not bigger than maximum key length for the tree
maxLevels size, where maximum key len = ceil(maxLevels/8).

This is because if the key bits length is bigger than the maxLevels of the
tree, two different keys that their difference is at the end, will collision in
the same leaf of the tree (at the max depth).
2021-10-04 14:33:49 +02:00
arnaucube
2514b3188f Update db usage to new dvote.db interface version 2021-08-06 18:41:13 +02:00
arnaucube
a8c7ea9808 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.
2021-06-16 09:25:04 +02:00