Merklizing the key/value store for fun and profit | Joel Gustafson
Suppose you and I each have a local key/value store. We suspect our key/value stores have mostly the same contents, but that there might be a few differences: a couple entries that you have that I don’t, that I have that you don’t, or conflicting values for the same key. What’s the best way for us to compare the content of our databases and identify the differences? Naively, I could send you all of my entries, and you can send me all of your entries. Or I could send you all of my entries, and you could iterate over them and just send me back the diff. But this is still linear in the number of entries. If you and I care enough about making diffs efficient, we can both maintain a special kind of merkle tree called a Prolly Tree that allows us to skip large sections of shared entries and identify conflicts in logarithmic time. This “merkle syncing” capability is a powerful and versatile peer-to-peer primitive and can be used as a natural persistence layer for CRDT systems, an “rsync for k
--> Merklizing the key/value store for fun and profit | Joel Gustafson Merklizing the key/value store for fun and profit Joel Gustafson / Posts / 2023-05-04 Suppose you and I each have a local key/value store. We suspect our key/value stores have mostly the same contents, but that there might be a few differences: a couple entries that you have that I don’t, that I have that you don’t, or conflicting values for the same key. What’s the best way for us to compare the content of our databases and identify the differences? Naively, I could send you all of my entries, and you can send me all of yo
Explore this link on the map →saved by
related reading
- Merkle Tree | Brilliant Math & Science Wikibrilliant.org
- Build Your Own Databasenan.fyi
- How Cursor Indexes Codebases Fast - by Engineer's Codexread.engineerscodex.com
- What is a Merkle Tree?decentralizedthoughts.github.io
- Merkle Trees · tendermint/tendermint Wiki · GitHubgithub.com
- Prolly Trees | DoltHub Blogdolthub.com
- How Dolt Stores Table Data | DoltHub Blogdolthub.com
- Peer-to-Peer Ordered Search Indexes – 0 FPS0fps.net
- opentimestamps-server/doc/merkle-mountain-range.md at master · opentimestamps/opentimestamps-server · GitHubgithub.com
- Merkle Trees & Merkle Roots: Bitcoin & Blockchain | Geminigemini.com
- Building a BFT JSON CRDTjzhao.xyz
- Merkle Patricia Trie | ethereum.orgethereum.org