-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
7 changed files
with
81 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,20 @@ | ||
//! Defines the database used by the Sovereign SDK. | ||
//! | ||
//! - Types and traits for storing and retrieving ledger data can be found in the [`ledger_db`] module | ||
//! - DB "Table" definitions can be found in the [`schema`] module | ||
//! - Types and traits for storing state data can be found in the [`state_db`] module | ||
//! - The default db configuration is generated in the [`rocks_db_config`] module | ||
#![forbid(unsafe_code)] | ||
#![deny(missing_docs)] | ||
|
||
use state_db::StateDB; | ||
|
||
/// Implements a wrapper around RocksDB meant for storing rollup history ("the ledger"). | ||
/// This wrapper implements helper traits for writing blocks to the ledger, and for | ||
/// serving historical data via RPC | ||
pub mod ledger_db; | ||
/// Implements helpers for configuring RocksDB. | ||
pub mod rocks_db_config; | ||
/// Defines the tables used by the Sovereign SDK. | ||
pub mod schema; | ||
/// Implements a wrapper around RocksDB meant for storing rollup state. This is primarily used | ||
/// as the backing store for the JMT. | ||
pub mod state_db; | ||
|
||
pub struct SovereignDB { | ||
_state_db: StateDB, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
pub mod tables; | ||
/// Defines the on-disk representation of all types which are stored by the SDK in a format other than | ||
/// their native format. Notable examples including slots, blocks, transactions and events, which | ||
/// are split into their constituent parts and stored in separate tables for easy retrieval. | ||
pub mod types; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters