cosmos-sdk/store/v2
2024-05-13 12:37:55 +00:00
..
commitment chore: cleanup store/v2 interface (#20280) 2024-05-13 11:14:01 +00:00
db chore: cleanup store/v2 interface (#20280) 2024-05-13 11:14:01 +00:00
errors chore: bring back store v1 to main (#20263) 2024-05-03 12:21:16 +00:00
internal chore: bring back store v1 to main (#20263) 2024-05-03 12:21:16 +00:00
metrics chore: bring back store v1 to main (#20263) 2024-05-03 12:21:16 +00:00
migration chore(store/v2): cleanup the migration API (#20298) 2024-05-13 12:37:55 +00:00
proof chore: bring back store v1 to main (#20263) 2024-05-03 12:21:16 +00:00
root chore(store/v2): cleanup the migration API (#20298) 2024-05-13 12:37:55 +00:00
snapshots chore: cleanup store/v2 interface (#20280) 2024-05-13 11:14:01 +00:00
storage chore: make fmt.Errorf use %w to wrap error instead of %v (#20350) 2024-05-12 08:11:25 +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 chore: cleanup store/v2 interface (#20280) 2024-05-13 11:14:01 +00:00
go.mod build(deps): Bump github.com/hashicorp/go-metrics from 0.5.1 to 0.5.3 in /store (#20335) 2024-05-10 12:29:33 +00:00
go.sum build(deps): Bump github.com/hashicorp/go-metrics from 0.5.1 to 0.5.3 in /store (#20335) 2024-05-10 12:29:33 +00:00
options.go chore: bring back store v1 to main (#20263) 2024-05-03 12:21:16 +00:00
README.md chore: bring back store v1 to main (#20263) 2024-05-03 12:21:16 +00:00
sonar-project.properties chore: bring back store v1 to main (#20263) 2024-05-03 12:21:16 +00:00
store.go chore(store/v2): cleanup the migration API (#20298) 2024-05-13 12:37:55 +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.