arnaucube 600fd212cc Add AddBatch CaseB
CASE B: ALMOST CASE A, Almost empty Tree --> if Tree has numLeafs < minLeafsThreshold
==============================================================================
- Get the Leafs (key & value) (iterate the tree from the current root getting
the leafs)
- Create a new empty Tree
- Do CASE A for the new Tree, giving the already existing key&values (leafs)
from the original Tree + the new key&values to be added from the AddBatch call

       R                 R
      / \               /  \
     A   *             /    \
        / \           /      \
       B   C         *        *
                    / |      / \
                   /  |     /   \
                  /   |    /     \
           L:    A    B   G       D
                         / \
                        /   \
                       /     \
                      C      *
                            / \
                           /   \
                          /     \
                         ...     ... (nLeafs < minLeafsThreshold)
2021-04-25 17:55:34 +02:00
2021-03-30 22:03:26 +02:00
2021-04-25 17:55:34 +02:00
2021-04-25 17:55:34 +02:00
2021-03-30 21:56:05 +02:00
2021-03-30 21:56:05 +02:00
2021-04-25 17:55:34 +02:00

arbo GoDoc Go Report Card Test

MerkleTree implementation in Go. Compatible with the circomlib implementation of the MerkleTree (when using the Poseidon hash function), following the specification from https://docs.iden3.io/publications/pdfs/Merkle-Tree.pdf and https://eprint.iacr.org/2018/955.

Allows to define which hash function to use. So for example, when working with zkSnarks the Poseidon hash function can be used, but when not, it can be used the Blake3 hash function, which improves the computation time.

Description
No description provided
Readme GPL-3.0 330 KiB
Languages
Go 97.9%
TypeScript 2.1%