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

State Commitment (SC) API PoC #17226

Closed
5 tasks
Tracked by #17041
alexanderbez opened this issue Jul 31, 2023 · 5 comments
Closed
5 tasks
Tracked by #17041

State Commitment (SC) API PoC #17226

alexanderbez opened this issue Jul 31, 2023 · 5 comments
Assignees
Labels

Comments

@alexanderbez
Copy link
Contributor

alexanderbez commented Jul 31, 2023

The purpose for this issue is to produce a API PoC for State Commitment.

We want to be able to have the SC layer to act independently without any significant changes to the access patterns or behaviour. But also we would like the existing IAVL-backed module KVStores will act as the SC layer

There are 4 options so far for implementation

  • iavl v0.21.1 (legacy node hash key format) backed by leveldb
  • iavl v1, current master (version|sequence key format) backed by leveldb
  • crypto-org-chain/cronos/memiavl
  • iavl v1 backed by an in-memory hash map "mapDb" (for comparison)
  • experimental iavl "version 2", avlite branch of cosmos-sdk/iavl.

Firstly, the benchmarks are being produced for the above, which will be followed by a decision as to which implementation will be used from the above list.

Currently the benchmarks and data set used can be found here

API

@github-actions github-actions bot added the needs-triage Issue that needs to be triaged label Jul 31, 2023
@alexanderbez alexanderbez added C:Store WG: Storage and removed needs-triage Issue that needs to be triaged labels Jul 31, 2023
@alexanderbez
Copy link
Contributor Author

The API for SC should roughly support the following:

  • CRUD
  • Pruning
  • (Reverse)Iteration
  • Snapshots
  • Proofs

@tac0turtle
Copy link
Member

how is pruning and snapshotting being handled? separate interface, behind the scenes of an interface or?

@cool-develope
Copy link
Contributor

we discussed those are handled in the root multi-store but will only manage the config of pruning and snapshotting, and the dedicated db backend will be responsible for the detailed flow.

@alexanderbez
Copy link
Contributor Author

Yeah that more or less sounds accurate @cool-develope 👍

I think the general flow is:

  • The SS interface (VersionedDatabase) has a Prune() method
  • Some sort of config is passed to the (default) multi-store impl and will automatically handle pruning of SS

I'm not really sure about SC though...perhaps we just pass the config to the SC implementation and let it do its thing

@alexanderbez
Copy link
Contributor Author

I think we can close this since we have a PoC API for SC (commitment) package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants