Commit Graph

8 Commits

Author SHA1 Message Date
Lucas Menendez
710bece00a make required bigint helper public and remove ExplicitZero from SwapEndianess 2025-04-11 13:35:01 +02:00
Lucas Menendez
7da2881324 final changes 2025-04-11 09:37:34 +02:00
Lucas Menendez
32eb6a6930 update multiposeidon to work with large bigints 2025-04-08 08:34:14 +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
0b2c3b07ed 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
2021-05-26 17:01:09 +02:00
arnaucube
a3473079de Add AddBatch CaseC
CASE C: ALMOST CASE B --> if Tree has few Leafs (but numLeafs>=minLeafsThreshold)
==============================================================================
- Use A, B, G, F as Roots of subtrees
- Do CASE B for each subtree
- Then go from L to the Root

              R
             /  \
            /    \
           /      \
          *        *
         / |      / \
        /  |     /   \
       /   |    /     \
L:    A    B   G       D
              / \
             /   \
            /     \
           C      *
                 / \
                /   \
               /     \
              ...    ... (nLeafs >= minLeafsThreshold)
2021-04-25 17:55:46 +02:00
arnaucube
e1d2173dc9 Add HashFunction interface (w/ Poseidon & Sha256) 2021-03-30 21:59:24 +02:00