Expand description
Storage and state management interfaces for Sovereign SDK modules.
Re-exports§
pub use storage::Storage;
Modules§
- codec
- Serialization and deserialization -related logic.
- config
- Configuration options for
Storage
types. - storage
- Trait and type definitions related to the
Storage
trait.
Structs§
- Aligned
Vec - A
Vec
of bytes whose length is guaranteed to be aligned to 4 bytes. This makes certain operations cheaper in zk-context (namely, concatenation). - Array
Witness - A
Vec
-based implementation ofWitness
with no special logic. - Cache
Log - CacheLog keeps track of the original and current values of each key accessed. By tracking original values, we can detect and eliminate write patterns where a key is changed temporarily and then reset to its original value
- Default
Storage Spec - The default
MerkleProofSpec
implementation. - Ordered
Reads AndWrites - A struct that contains the values read from the DB and the values to be written, both in deterministic order.
- Prefix
- A prefix prepended to each key before insertion and retrieval from the storage.
- Storage
Internal Cache - Caches reads and writes for a (key, value) pair. On the first read the value is fetched
from an external source represented by the
ValueReader
trait. On following reads, the cache checks if the value we read was inserted before. - ZkStorage
- A
Storage
implementation designed to be used inside the zkVM.
Traits§
- Merkle
Proof Spec - A trait specifying the hash function and format of the witness used in merkle proofs for storage access
- Witness
- A witness is a value produced during native execution that is then used by the zkVM circuit to produce proofs.