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§
- Batch
Number - A typed wrapper around u64 implementing
Encode
andDecode
- 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.
- Event
Number - A typed wrapper around u64 implementing
Encode
andDecode
- Slot
Number - A typed wrapper around u64 implementing
Encode
andDecode
- Stored
Batch - The on-disk format for a batch. Stores the hash and identifies the range of transactions included in the batch.
- Stored
Slot - 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.
- Stored
Transaction - 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
andDecode
Enums§
- Event
Group Identifier - An identifier for a group of related events
- Event
Identifier - An identifier that specifies a single event
Functions§
- split_
tx_ for_ storage - Split a
TransactionReceipt
into aStoredTransaction
and a list ofEvent
s for storage in the database.
Type Aliases§
- Accessory
Key - The “key” half of a key/value pair from accessory state.
- Accessory
State Value - 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