anoma / anoma-archive

Reference implementation of the Anoma protocols in Rust.
https://anoma.net
GNU General Public License v3.0
425 stars 176 forks source link

[ledger] sparse merkle tree #4

Open tzemanovic opened 3 years ago

tzemanovic commented 3 years ago

We're currently using this library https://github.com/heliaxdev/sparse-merkle-tree/tree/tomas/encoding. We only store the hashes (H256) of the key and values in the tree (more details in https://github.com/heliaxdev/rd-pm/blob/master/tech-specs/src/explore/design/db.md). The fork has added a borsh encoding.

TODOs:

┆Issue is synchronized with this Asana task by Unito

tzemanovic commented 3 years ago

it would be nice to also compare this with https://github.com/lazyledger/smt (as suggested in collab-cosmos-crypto channel https://heliax.slack.com/archives/C01CLNU56D7/p1615904669004400)

tzemanovic commented 3 years ago

also Diem is using sparse merkle tree https://github.com/diem/diem/blob/be4811ee515407175be79cbfcc333fa43ae548d9/storage/scratchpad/src/sparse_merkle/mod.rs