Expand description
Storage and state management interfaces for Sovereign SDK modules.
Re-exports
pub use storage::Storage;
Modules
- Serialization and deserialization -related logic.
- Configuration options for
Storage
types. - Trait and type definitions related to the
Storage
trait.
Structs
- A
Vec
of bytes whose length is guaranteed to be aligned to 4 bytes. This makes certain operations cheaper in zk-context (namely, concatenation). - 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
- The default
MerkleProofSpec
implementation. - A struct that contains the values read from the DB and the values to be written, both in deterministic order.
- A prefix prepended to each key before insertion and retrieval from the storage.
- 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. - A
Storage
implementation designed to be used inside the zkVM.
Traits
- A trait specifying the hash function and format of the witness used in merkle proofs for storage access
- A witness is a value produced during native execution that is then used by the zkVM circuit to produce proofs.