sov-db

Crates.iosov-db
lib.rssov-db
version0.3.0
sourcesrc
created_at2023-05-31 15:54:46.32197
updated_at2023-10-20 16:58:07.889468
descriptionA high-level DB interface for the Sovereign SDK
homepagehttps://www.sovereign.xyz
repositoryhttps://github.com/sovereign-labs/sovereign-sdk
max_upload_size
id878916
size74,473
Preston Evans (preston-evans98)

documentation

README

Sovereign DB

This package provides a high-level interface to a Schema DB designed specifically for use with the Sovereign SDK. It exposes two db types: LedgerDB, and StateDB.

LedgerDB

As the name implies, the LedgerDB is designed to store ledger history. It has tables for slots, batches, transactions, and events. The LedgerDB also implements the LedgerRpcProvider trait, allowing it to easily serve chain history over RPC.

StateDB

The StateDB is intended to be used with the Jellyfish Merkle Tree provided by the Module System. If you aren't using the Module System, chances are that you'll want to implement your own State Database.

StateDB is designed to store Jellyfish Merkle Tree data efficiently. It maintains a flat store mapping (Key, Version) tuples to values, as well as a mapping from JMT NodeKeys to JMT Nodes.

In the Module System, StateDB is abstracted behind the Storage interface, so you won't interact with it directly.

Commit count: 752

cargo fmt