jellyfish icon indicating copy to clipboard operation
jellyfish copied to clipboard

Compare against JMT

Open alxiong opened this issue 1 year ago • 1 comments

We should compare our SMT with Jellyfish MT (JMT 😢 name collision) by Diem, used by Aptos for their key-value map.

alxiong avatar Feb 06 '23 14:02 alxiong

I just took a glimpse, ignoring the arity, the difference is already illustrated in page 3 figure 2, the graph 2 vs 3. The key trick here is, just shortcut it if a subtree contains only one leaf. It will greatly reduce the storage, and improve the efficiency by reducing the number of hash/digest evaluations when the MT is sparse. There's a small overhead added to the insertion / exclusion verification, but it mainly affect the circuit implementation and I don't think it compares to the hash evaluation cost.

Looks like an interesting trick that we could adapt in the future.

mrain avatar Feb 06 '23 17:02 mrain