Module types

Source
Expand description

Defines the on-disk representation of all types which are stored by the SDK in a format other than their native format. Notable examples including slots, blocks, transactions and events, which are split into their constituent parts and stored in separate tables for easy retrieval.

Structs§

BatchNumber
A typed wrapper around u64 implementing Encode and Decode
DbBytes
A cheaply cloneable bytes abstraction for use within the trust boundary of the node (i.e. when interfacing with the database). Serializes and deserializes more efficiently, than most bytes abstractions, but is vulnerable to out-of-memory attacks when read from an untrusted source.
EventNumber
A typed wrapper around u64 implementing Encode and Decode
SlotNumber
A typed wrapper around u64 implementing Encode and Decode
StoredBatch
The on-disk format for a batch. Stores the hash and identifies the range of transactions included in the batch.
StoredSlot
The on-disk format of a slot. Specifies the batches contained in the slot and the hash of the da block. TODO(@preston-evans98): add any additional data required to reconstruct the da block proof.
StoredTransaction
The on-disk format of a transaction. Includes the txhash, the serialized tx data, and identifies the events emitted by this transaction
TxNumber
A typed wrapper around u64 implementing Encode and Decode

Enums§

EventGroupIdentifier
An identifier for a group of related events
EventIdentifier
An identifier that specifies a single event

Functions§

split_tx_for_storage
Split a TransactionReceipt into a StoredTransaction and a list of Events for storage in the database.

Type Aliases§

AccessoryKey
The “key” half of a key/value pair from accessory state.
AccessoryStateValue
The “value” half of a key/value pair from accessory state.
DbHash
A hash stored in the database
JmtValue
The “value” half of a key/value pair from the JMT