Crate sov_state

Source
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§

AlignedVec
A Vec of bytes whose length is guaranteed to be aligned to 4 bytes. This makes certain operations cheaper in zk-context (namely, concatenation).
ArrayWitness
A Vec-based implementation of Witness with no special logic.
CacheLog
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
DefaultStorageSpec
The default MerkleProofSpec implementation.
OrderedReadsAndWrites
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.
StorageInternalCache
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§

MerkleProofSpec
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.