3 ms·
Can someone ELI5 what happens when I want to change a piece of data in a tree? What if I have a document, and I notice a typo, and I want to fix it?
by yosito 9y ago
Can someone ELI5 what happens when I want to change a piece of data in a tree? What if I have a document, and I notice a typo, and I want to fix it?
- tbv 9y agoNot quite ELI5, but Blahah explained how Dat handles changes below: https://news.ycombinator.com/item?id=15541392 https://news.ycombinator.com/item?id=15541392
- toomim 9y agoExactly. Then merkle trees don't help you. They only work for static documents.
- letlambda 9y agoThey certainly don't make that easier. But if the system supports a mutable link, you can have documents that always link to their own latest version. IPFS does this by storing (mutable link, contentID) pairs in the DHT, which can be updated if you know the private key for the mutable link.
- pfraze 9y agoletlambda's explanation for IPFS is right. In Dat, that method is used to produce an append only log out of a merkle tree. Each time you add an entry, a leaf is added to the tree, and the new head is signed. I wrote about it here [1] and have some gifs demonstrating the process. Merkle trees can work just fine for dynamic content. You just need to use a pubkey pointer. 1. https://beakerbrowser.com/2017/06/19/cryptographically-secure-change-feeds.html https://beakerbrowser.com/2017/06/19/cryptographically-secur...
- nattmat 9y agoBy using an append-only Merkle tree, you make 'edits' by adding a new piece of data with information on what was changed in the older data. You get the benefit of also keeping a version history. I think Git works like this.