Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Propose the new merkled index storage engine #100

Closed
imotai opened this issue Oct 14, 2022 · 0 comments
Closed

WIP: Propose the new merkled index storage engine #100

imotai opened this issue Oct 14, 2022 · 0 comments

Comments

@imotai
Copy link
Contributor

imotai commented Oct 14, 2022

Motivation

Currently, db3 uses merk as merkled index storage engine.
the advantage of merk

  • an ordered kv store, db3 use merk to query a single key or query data with a range of keys
  • support proof of query, merk can prove the seeking operation and range query
  • memory management according to the tree level, when the level of children nodes is greater than the limit, merk will remove the nodes from memory

the shortcomings

  • AVL tree that merk uses is not good for persistence storage
  • inactive community

the unsupported feature that db3 needs

  • namespace, in db3 every account is a namespace and every namespace has its root hash

the namespaced Merkle tree is proposed by Celestia in the LazyLedger academic paper.so I want to propose a new merkled index storage engine called merkdb based on merk and merkdb has the following improvements

  • replace AVL tree with b+tree to improve the performance on persistence storage, the berkletree has made some good experiments
  • support namespace level root hash

and you can consider merkdb as rocksdb in crypto

The Instruction set of the storage engine

The poof of query

  • proof of membership
  • proof of range
  • proof of efficiency

Reference

@imotai imotai self-assigned this Oct 14, 2022
@imotai imotai added the dip label Nov 22, 2022
@imotai imotai changed the title design the storage engine of db3 WIP: design the merkled index storage engine Nov 22, 2022
@imotai imotai added this to the M3 milestone Nov 22, 2022
@imotai imotai changed the title WIP: design the merkled index storage engine WIP: Propose the new merkled index storage engine Nov 22, 2022
@imotai imotai removed this from the M3 milestone Nov 22, 2022
@imotai imotai closed this as completed Jun 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant