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

Implement decoupled state commitments and storage #11

Merged
merged 16 commits into from
Jun 11, 2021
Merged

Implement decoupled state commitments and storage #11

merged 16 commits into from
Jun 11, 2021

Commits on May 14, 2021

  1. Add SMT store type (cosmos#8507)

    * Initial SMT store type
    
    SMT (Sparse Merkle Tree) is intended to replace IAVL. New type
    implements same interfaces as iavl.Store.
    
    * Add iteration support to SMT
    
    Sparse Merkle Tree does not support iteration over keys in order.
    To provide drop-in replacement for IAVL, Iterator and ReverseIterator
    has to be implemented.
    SMT Store implementation use the underlying KV store to:
     - maintain a list of keys (under a prefix)
     - iterate over a keys
    Values are stored only in SMT.
    
    * Migrate to smt v0.1.1
    
    * Extra test for SMT iterator
    
    * CommitStore implementation for SMT store
    
    * Use interface instead of concrete type
    
    * Add telemetry to SMT store
    
    * SMT: version->root mapping, cleanup
    
    * SMT proofs - initial code
    
    * Tests for SMT store ProofOp implementation
    
    * Fix linter errors
    
    * Use simple 1 byte KV-store prefixes
    
    * Improve assertions in tests
    
    * Use mutex properly
    
    * Store data in ADR-040-compatible way
    
    SMT stores:
     * key -> hash(key, value)
    
    KV store stores:
     * key->value in "bucket 1",
     * hash(key, value) -> key in "bucket 2".
    tzdybal authored May 14, 2021
    Configuration menu
    Copy the full SHA
    5ef2364 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6698424 View commit details
    Browse the repository at this point in the history

Commits on May 24, 2021

  1. [WIP] skeleton of decoupled.Store

    Outline of new store following ADR-040 pattern of decoupled
    commitment/data concerns
    
    Largely adapted from store/ll-smt branch
    roysc committed May 24, 2021
    Configuration menu
    Copy the full SHA
    53a0d40 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    08c86e7 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    8b64bde View commit details
    Browse the repository at this point in the history
  4. fix test

    roysc committed May 24, 2021
    Configuration menu
    Copy the full SHA
    3b2d360 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    e7095d5 View commit details
    Browse the repository at this point in the history
  6. test basic merkle hash

    roysc committed May 24, 2021
    Configuration menu
    Copy the full SHA
    98d0377 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    33528d6 View commit details
    Browse the repository at this point in the history
  8. fixup

    roysc committed May 24, 2021
    Configuration menu
    Copy the full SHA
    1811541 View commit details
    Browse the repository at this point in the history

Commits on May 28, 2021

  1. Configuration menu
    Copy the full SHA
    80cb898 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    7d7b8b9 View commit details
    Browse the repository at this point in the history
  3. go mod tidy

    roysc committed May 28, 2021
    Configuration menu
    Copy the full SHA
    d58c8e7 View commit details
    Browse the repository at this point in the history

Commits on Jun 9, 2021

  1. Refactor for new DB interface

    - Move tm-db code in from external repo
    - Refactor store/ and types/ packages
    - leaves out IAVL and multistore code pending confirmed deprecation
    - some hacks to glue existing tmdb usage and get compile/tests working
    roysc committed Jun 9, 2021
    Configuration menu
    Copy the full SHA
    03aed4d View commit details
    Browse the repository at this point in the history
  2. Update modules

    roysc committed Jun 9, 2021
    Configuration menu
    Copy the full SHA
    91ca92c View commit details
    Browse the repository at this point in the history
  3. [wip] decoupled.Store

    - Update to new db interface
    - Use smt as SC structure
    - Refactor smt to BasicKVStore
    roysc committed Jun 9, 2021
    Configuration menu
    Copy the full SHA
    878a1eb View commit details
    Browse the repository at this point in the history