Expand description
This crate provides
StorageReadandStorageWrite(high-level) andDB(low-level) traitsMockDBDBimplementation for testingcollectionswith generic lazy collections for storageconversion_statefor shielded token rewards- helpers for storage iteration
Modules§
- collections
- Lazy data structures for storage access where elements are not all loaded into memory.
- conversion_
state - Shielded tokens conversion state
- mockdb
- DB mock for testing
- tx_
queue - Transaction queue
- types
- The key and values that may be persisted in a DB.
Structs§
- Block
Hash - Hash of a block as fixed-size byte array
- Block
Header - The block header data from Tendermint header relevant for Namada storage
- Block
Height - Height of a block, i.e. the level. The
defaultis theBlockHeight::sentinelvalue, which doesn’t correspond to any block. - Block
Results - Represents the indices of the accepted transactions in a block.
- Block
State Read - The block’s state as stored in the database.
- Block
State Write - The block’s state to write into the database.
- Custom
Error - A custom error
- Epoch
- Epoch identifier. Epochs are identified by consecutive numbers.
- Epochs
- Predecessor block epochs
- EthEvents
Queue - Container of all Ethereum event queues.
- EthEvents
Queue Iter - Draining iterator over a queue of Ethereum events,
- Hash
- A hash, typically a sha-2 hash of a tx
- Inner
EthEvents Queue - A queue of confirmed Ethereum events of type
E. - Key
- A storage key is made of storage key segments
DbKeySeg, separated byKEY_SEGMENT_SEPARATOR. - KeyRef
- A
Keymade of borrowed key segmentsDbKeySeg. - Prefix
Value - A value of a storage prefix iterator.
- String
Key - Storage keys that are utf8 encoded strings
- Tree
Bytes - A wrapper around raw bytes to be stored as values in a merkle tree
- TxIndex
- Transaction index within block.
Enums§
Constants§
- BLOCK_
CF - Block column family name
- DIFFS_
CF - Diffs column family name
- EPOCH_
TYPE_ LENGTH - The length of the epoch type
- IBC_
KEY_ LIMIT - The maximum size of an IBC key (in bytes) allowed in merkle-ized storage
- KEY_
SEGMENT_ SEPARATOR - The separator of storage key segments
- REPLAY_
PROTECTION_ CF - Replay protection column family name
- RESERVED_
ADDRESS_ PREFIX - The reserved storage key prefix for addresses
- RESERVED_
VP_ KEY - The reserved storage key for validity predicates
- ROLLBACK_
CF - Diffs for rollback (only kept for 1 block) column family name
- STATE_
CF - State column family name
- SUBSPACE_
CF - Subspace column family name
- TX_
INDEX_ LENGTH - The length of the transaction index
- VP_
KEY_ PREFIX - The reserved storage key prefix for validity predicates
- WASM_
CODE_ LEN_ PREFIX - The reserved storage key prefix for wasm codes’ length
- WASM_
CODE_ NAME_ PREFIX - The reserved storage key prefix for wasm codes’ name
- WASM_
CODE_ PREFIX - The reserved storage key prefix for wasm codes
- WASM_
HASH_ PREFIX - The reserved storage key prefix for wasm code hashes
- WASM_
KEY_ PREFIX - The reserved storage key prefix for wasm codes
Traits§
- DB
- A database backend.
- DBIter
- A database prefix iterator.
- DBUpdate
Visitor - A CRUD DB access
- DBWrite
Batch - Atomic batch write.
- KeySeg
- Represents a segment in a path that may be used as a database key
- Option
Ext - An extension to
Optionto allow turningNonecase to an Error from a static string (handy for WASM). - Result
Ext - Result extension to easily wrap custom errors into
Error. - Storage
Hasher - The storage hasher used for the merkle tree.
- Storage
Read - Common storage read interface
- Storage
Write - Common storage write interface
Functions§
- iter_
prefix - Iterate Borsh encoded items matching the given prefix, ordered by the storage keys.
- iter_
prefix_ bytes - Iterate items matching the given prefix, ordered by the storage keys.
- iter_
prefix_ with_ filter - Iterate Borsh encoded items matching the given prefix and passing the given
filterpredicate, ordered by the storage keys. - iter_
prefix_ with_ filter_ map - Iterate Borsh encoded items matching the given prefix and passing the given
filterpredicate, ordered by the storage keys.