Module disk_db

Source
Expand description

Provides low-level access to RocksDB using some database-specific types.

This module makes sure that:

  • all disk writes happen inside a RocksDB transaction ([rocksdb::WriteBatch]), and
  • format-specific invariants are maintained.

§Correctness

crate::constants::state_database_format_version_in_code() must be incremented each time the database format (column, serialization, etc) changes.

Modules§

tests 🔒
Tests and test methods for low-level RocksDB access.

Structs§

DiskDb
Wrapper struct to ensure low-level database access goes through the correct API.
DiskWriteBatch
Wrapper struct to ensure low-level database writes go through the correct API.

Traits§

ReadDisk
Helper trait for retrieving and deserializing values from rocksdb column families.
WriteDisk
Helper trait for inserting serialized typed (Key, Value) pairs into rocksdb.

Type Aliases§

DB
The [rocksdb] database type, including thread mode.
DBThreadMode
The [rocksdb::ThreadMode] used by the database.