cosmos-sdk/store
Marko b15732a594
refactor: migrate to query Consensus Params (#19600)
Co-authored-by: Julien Robert <julien@rbrt.fr>
Co-authored-by: Facundo <facundomedica@gmail.com>
Co-authored-by: Facundo Medica <14063057+facundomedica@users.noreply.github.com>
Co-authored-by: Matt Kocubinski <mkocubinski@gmail.com>
Co-authored-by: Hieu Vu <72878483+hieuvubk@users.noreply.github.com>
2024-04-25 15:26:43 +00:00
..
commitment style: remove redundant import alias (#20109) 2024-04-21 19:03:43 +00:00
db refactor: migrate to query Consensus Params (#19600) 2024-04-25 15:26:43 +00:00
errors refactor(store/v2): remove SDK error registration (#19708) 2024-03-08 18:52:38 +00:00
internal fix(x/tx): default to using gogoproto.HybridResolver wherever possible (#19845) 2024-03-25 09:45:15 +00:00
metrics feat(store/v2): basic metrics (#18529) 2023-11-28 17:29:02 +00:00
migration fix(store/v2): clean up resources after the migration is completed (#19800) 2024-03-21 12:12:56 +00:00
proof chore: linting fixes (#19855) 2024-03-25 16:57:34 +00:00
root chore: linting fixes (#19978) 2024-04-08 18:12:10 +00:00
snapshots style: remove redundant import alias (#20109) 2024-04-21 19:03:43 +00:00
storage chore: remove repetitive words (#20180) 2024-04-25 07:29:09 +00:00
batch.go feat(store/v2): add the catch up process in the migration (#19454) 2024-03-20 22:23:41 +00:00
CHANGELOG.md fix(store/commitment/iavl): honor tree.Remove error firstly (#18651) 2023-12-08 13:59:12 +00:00
database.go fix(x/tx): default to using gogoproto.HybridResolver wherever possible (#19845) 2024-03-25 09:45:15 +00:00
go.mod build(deps): Bump github.com/prometheus/common from 0.52.2 to 0.53.0 (#20115) 2024-04-23 14:42:36 +00:00
go.sum build(deps): Bump github.com/prometheus/common from 0.52.2 to 0.53.0 (#20115) 2024-04-23 14:42:36 +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): add the catch up process in the migration (#19454) 2024-03-20 22:23:41 +00:00
trace.go refactor(store,x/params): using maps.Copy (#19889) 2024-03-28 10:44:33 +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.