N
N
Ninazu2019-11-29 12:30:41
Algorithms
Ninazu, 2019-11-29 12:30:41

Variant of MerkleTree with dynamic height?

Is there some sort of hashing algorithm that allows you to add and remove elements dynamically, and check if an element is in the chain?
Something similar to a Merkle tree, but which is built dynamically and for which you do not need to have all the values

Root1 = Hash(Value1);
Root2 = Hash(Root1 + Value2);
Root3 = Hash(Root2 + Value3);
Root4 = Hash(Root3 + Value4);

That is, at the output we have the height of the hash (In our case 4), the root hash (In our case Root4) and the value whose occurrence must be recursively checked in this chain (In our case Value2)
Root4->Exist(Value2)
And the second very important point. Is it possible to remove values ​​from the chain.
Root3 = Root4->Remove(Value1)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
U
uvelichitel, 2019-11-29
@uvelichitel

Is there some sort of hashing algorithm that allows you to add and remove elements dynamically, and check if an element is in the chain?
The Bloom Filter is perhaps the most effective, but false positives are possible.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question