crdt-example-app icon indicating copy to clipboard operation
crdt-example-app copied to clipboard

Merkle tree size

Open ntoljic opened this issue 3 years ago • 2 comments

First of all thank you for providing this insightful example. One thing I cannot quite wrap my head around is the merkle tree used for data consistency. The way I understand it is that the tree contains hashes for all events from all clients ever. Wouldn't this lead to an ever growing data structure which is passed back and forth on each sync? Or am I missing something and the size of the tree is somehow bounded?

ntoljic avatar Aug 12 '21 07:08 ntoljic

One more observation: There is a prune method on the merkle tree but it seems it is never used...

ntoljic avatar Aug 12 '21 09:08 ntoljic

Hey @ntoljic we had the same question regarding merkle tree sizes but after adding 10,000 messages the tree didn't grow much. I am still trying to understand it since I think its the more complex part of the project to understand. If it helps this fork helped me understand it better:

https://github.com/clintharris/crdt-example-app_annotated/ https://github.com/clintharris/crdt-example-app_annotated/blob/master/NOTES.md

lcarrasco avatar Sep 01 '21 16:09 lcarrasco