cosmos-sdk/store/v2
dependabot[bot] 5d66cf9450
build(deps): Bump google.golang.org/grpc from 1.64.0 to 1.64.1 (#20920)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-07-10 08:09:24 +00:00
..
commitment refactor(store): fetch store keys from commit store if not provided (#20801) 2024-07-01 15:24:10 +00:00
db chore: upstream runtime/v2 (#20320) 2024-05-14 12:43:28 +00:00
errors chore: upstream runtime/v2 (#20320) 2024-05-14 12:43:28 +00:00
internal chore: upstream runtime/v2 (#20320) 2024-05-14 12:43:28 +00:00
metrics chore: bring back store v1 to main (#20263) 2024-05-03 12:21:16 +00:00
migration refactor(store): add miss defer (#20602) 2024-06-11 09:02:36 +00:00
proof refactor(store): fetch store keys from commit store if not provided (#20801) 2024-07-01 15:24:10 +00:00
pruning chore(store/v2): refactor the pruning option (#20730) 2024-06-26 14:59:54 +00:00
root build(deps): Bump github.com/cometbft/cometbft from 1.0.0-alpha.2.0.20240530055211-ae27f7eb3c08 to 1.0.0-rc1 in /x/auth (#20851) 2024-07-03 10:42:28 +00:00
snapshots fix(store): avoid nil error on not exhausted payload stream (#20644) 2024-06-12 17:48:08 +00:00
storage chore(store/v2): refactor the pruning option (#20730) 2024-06-26 14:59:54 +00:00
batch.go chore: cleanup store/v2 interface (#20280) 2024-05-13 11:14:01 +00:00
CHANGELOG.md chore: bring back store v1 to main (#20263) 2024-05-03 12:21:16 +00:00
database.go feat(store/v2): add WorkingHash (#20706) 2024-06-27 17:50:58 +00:00
go.mod build(deps): Bump google.golang.org/grpc from 1.64.0 to 1.64.1 (#20920) 2024-07-10 08:09:24 +00:00
go.sum build(deps): Bump google.golang.org/grpc from 1.64.0 to 1.64.1 (#20920) 2024-07-10 08:09:24 +00:00
options.go chore(store/v2): refactor the pruning option (#20730) 2024-06-26 14:59:54 +00:00
README.md chore: bring back store v1 to main (#20263) 2024-05-03 12:21:16 +00:00
sonar-project.properties chore: force reload sonar cloud (#20480) 2024-05-29 11:12:09 +00:00
store.go feat(store/v2): add WorkingHash (#20706) 2024-06-27 17:50:58 +00:00
trace.go chore: bring back store v1 to main (#20263) 2024-05-03 12:21:16 +00:00
validation.go chore: bring back store v1 to main (#20263) 2024-05-03 12:21:16 +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.