cosmos-sdk/store
Aleksandr Bezobchuk a86c2a9980
feat(store/v2): support rocksdb and pebbledb as RawDB (#19607)
Co-authored-by: cool-developer <51834436+cool-develope@users.noreply.github.com>
Co-authored-by: Marko <marbar3778@yahoo.com>
Co-authored-by: sontrinh16 <trinhleson2000@gmail.com>
2024-03-19 14:34:14 +00:00
..
commitment docs(store/v2): update store v2 docs (#19502) 2024-02-23 16:57:57 +00:00
db feat(store/v2): support rocksdb and pebbledb as RawDB (#19607) 2024-03-19 14:34:14 +00:00
errors refactor(store/v2): remove SDK error registration (#19708) 2024-03-08 18:52:38 +00:00
internal/encoding feat(store/v2): Implement the GetProof for multi store (#18736) 2024-01-17 13:52:12 +00:00
metrics feat(store/v2): basic metrics (#18529) 2023-11-28 17:29:02 +00:00
migration feat(store): remove RawDB dependency from snapshot store (#19608) 2024-03-01 16:17:48 +00:00
proof refactor(storev2): change error namespace (#19698) 2024-03-08 17:25:21 +00:00
root feat(core): match store interfaces (#19762) 2024-03-18 12:46:55 +00:00
snapshots chore: fix the flaky test in store/snapshots (#19774) 2024-03-18 16:23:22 +00:00
storage refactor(storev2): change error namespace (#19698) 2024-03-08 17:25:21 +00:00
batch.go feat(store/v2): remove cosmos-db depdency from store (#19229) 2024-01-29 20:21:20 +00:00
CHANGELOG.md fix(store/commitment/iavl): honor tree.Remove error firstly (#18651) 2023-12-08 13:59:12 +00:00
changeset.go feat(store/v2): Modify RootStore to Support Multi StoreKeys (#18968) 2024-01-09 15:38:24 +00:00
database.go feat(store/v2): remove the pruning manager (#19411) 2024-02-13 21:17:19 +00:00
go.mod feat(store/v2): support rocksdb and pebbledb as RawDB (#19607) 2024-03-19 14:34:14 +00:00
go.sum feat(store/v2): support rocksdb and pebbledb as RawDB (#19607) 2024-03-19 14:34:14 +00:00
options.go feat(store/v2): remove the pruning manager (#19411) 2024-02-13 21:17:19 +00:00
README.md docs(store/v2): update store v2 docs (#19502) 2024-02-23 16:57:57 +00:00
sonar-project.properties refactor: create go.mod for store (#14746) 2023-01-25 13:31:56 +00:00
store.go feat(core): match store interfaces (#19762) 2024-03-18 12:46:55 +00:00
trace.go feat(store/v2): Merge Feature Branch (#18150) 2023-10-18 18:03:43 +00:00
validation.go feat(store/v2): Merge Feature Branch (#18150) 2023-10-18 18:03:43 +00:00

Store

The store package contains the implementation of store/v2, which is the SDK's abstraction around managing historical and committed state. See ADR-065 and Store v2 Design for a high-level overview of the design and rationale.

Migration

Pruning

The root.Store is NOT responsible for pruning. Rather, pruning is the responsibility of the underlying SS and SC layers. This means pruning can be implementation specific, such as being synchronous or asynchronous.

Usage

The store package contains a root.Store type which is intended to act as an abstraction layer around it's two primary constituent components - state storage (SS) and state commitment (SC). It acts as the main entry point into storage for an application to use in server/v2. Through root.Store, an application can query and iterate over both current and historical data, commit new state, perform state sync, and fetch commitment proofs.

A root.Store is intended to be initialized with already constructed SS and SC backends (see relevant package documentation for instantiation details). Note, from the perspective of root.Store, there is no notion of multi or single tree/store, rather these are implementation details of SS and SC. For SS, we utilize store keys to namespace raw key/value pairs. For SC, we utilize an abstraction, commitment.CommitStore, to map store keys to a commitment trees.