Crate namada_storage

Crate namada_storage 

Source
Expand description

This crate provides

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§

BlockHash
Hash of a block as fixed-size byte array
BlockHeader
The block header data from Tendermint header relevant for Namada storage
BlockHeight
Height of a block, i.e. the level. The default is the BlockHeight::sentinel value, which doesn’t correspond to any block.
BlockResults
Represents the indices of the accepted transactions in a block.
BlockStateRead
The block’s state as stored in the database.
BlockStateWrite
The block’s state to write into the database.
CustomError
A custom error
Epoch
Epoch identifier. Epochs are identified by consecutive numbers.
Epochs
Predecessor block epochs
EthEventsQueue
Container of all Ethereum event queues.
EthEventsQueueIter
Draining iterator over a queue of Ethereum events,
Hash
A hash, typically a sha-2 hash of a tx
InnerEthEventsQueue
A queue of confirmed Ethereum events of type E.
Key
A storage key is made of storage key segments DbKeySeg, separated by KEY_SEGMENT_SEPARATOR.
KeyRef
A Key made of borrowed key segments DbKeySeg.
PrefixValue
A value of a storage prefix iterator.
StringKey
Storage keys that are utf8 encoded strings
TreeBytes
A wrapper around raw bytes to be stored as values in a merkle tree
TxIndex
Transaction index within block.

Enums§

DbColFam
Storage column families
DbError
DbKeySeg
A storage key segment
Error
Error
TreeKeyError

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.
DBUpdateVisitor
A CRUD DB access
DBWriteBatch
Atomic batch write.
KeySeg
Represents a segment in a path that may be used as a database key
OptionExt
An extension to Option to allow turning None case to an Error from a static string (handy for WASM).
ResultExt
Result extension to easily wrap custom errors into Error.
StorageHasher
The storage hasher used for the merkle tree.
StorageRead
Common storage read interface
StorageWrite
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 filter predicate, ordered by the storage keys.
iter_prefix_with_filter_map
Iterate Borsh encoded items matching the given prefix and passing the given filter predicate, ordered by the storage keys.

Type Aliases§

DbResult
A result of a function that may fail
Result
Result of a storage API call.
Result
A result of a function that may fail