cosmos-sdk/store
Marko d2e40963ed
refactor(modules): adopt appmodulev2.Hasgenesis (#19627)
Co-authored-by: Julien Robert <julien@rbrt.fr>
2024-03-11 10:22:16 +00:00
..
commitment docs(store/v2): update store v2 docs (#19502) 2024-02-23 16:57:57 +00:00
db refactor(storev2): change error namespace (#19698) 2024-03-08 17:25:21 +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(store/v2): remove the pruning manager (#19411) 2024-02-13 21:17:19 +00:00
snapshots refactor(modules): adopt appmodulev2.Hasgenesis (#19627) 2024-03-11 10:22:16 +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 build(deps): Bump protobuf to 1.33.0, x/tx to 0.13.1, grpc to 1.62.1 and prometheus 0.50.0 (#19655) 2024-03-09 07:33:16 +00:00
go.sum build(deps): Bump protobuf to 1.33.0, x/tx to 0.13.1, grpc to 1.62.1 and prometheus 0.50.0 (#19655) 2024-03-09 07:33:16 +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(store/v2): remove the pruning manager (#19411) 2024-02-13 21:17:19 +00:00
trace.go feat(store/v2): Merge Feature Branch (#18150) 2023-10-18 18:03:43 +00:00
upgrade.go refactor: use slices std (#19598) 2024-02-29 09:57:42 +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.