Schema

Type Alias Schema 

Source
pub type Schema = RpcStoreSchema;
Expand description

The schema parameter the framework’s Store / pipelines bind to.

Aliased Type§

pub struct Schema {
Show 18 fields pub epochs: DbMap<U64Be, Protobuf<StoredEpoch>>, pub checkpoint_summary: DbMap<U64Be, Protobuf<StoredCheckpointSummary>>, pub checkpoint_contents: DbMap<U64Be, Protobuf<StoredCheckpointContents>>, pub checkpoint_seq_by_digest: DbMap<Key, U64Varint>, pub transactions: DbMap<U64Be, Protobuf<StoredTransaction>>, pub tx_seq_by_digest: DbMap<Key, U64Varint>, pub tx_metadata_by_seq: DbMap<U64Be, Protobuf<TxMetadata>>, pub effects: DbMap<U64Be, Protobuf<StoredEffects>>, pub events: DbMap<U64Be, Protobuf<StoredEvents>>, pub objects: DbMap<Key, Protobuf<StoredObject>>, pub object_version_by_checkpoint: DbMap<Key, Protobuf<ObjectVersionInfo>>, pub object_by_owner: DbMap<Key, U64Varint>, pub object_by_type: DbMap<Key, U64Varint>, pub balance: DbMap<Key, Protobuf<BalanceDelta>>, pub package_versions: DbMap<Key, Protobuf<PackageVersionInfo>>, pub transaction_bitmap: DbMap<Key, Protobuf<BitmapBlob>>, pub event_bitmap: DbMap<Key, Protobuf<BitmapBlob>>, pub pruning_watermark: DbMap<UnitKey, Protobuf<PruningWatermarks>>,
}

Fields§

§epochs: DbMap<U64Be, Protobuf<StoredEpoch>>

Per-epoch metadata: protocol version, gas price, start and end timestamps, and the epoch’s final checkpoint.

§checkpoint_summary: DbMap<U64Be, Protobuf<StoredCheckpointSummary>>

Signed checkpoint headers. The lightweight metadata served by most “fetch a checkpoint” requests; the heavier contents list lives in a separate CF.

§checkpoint_contents: DbMap<U64Be, Protobuf<StoredCheckpointContents>>

The ordered list of executed transaction digests in each checkpoint.

§checkpoint_seq_by_digest: DbMap<Key, U64Varint>

Resolves a checkpoint digest to its sequence number, which is then the key for every other checkpoint-keyed CF.

§transactions: DbMap<U64Be, Protobuf<StoredTransaction>>

Signed transactions, keyed by their assigned tx_seq.

§tx_seq_by_digest: DbMap<Key, U64Varint>

Resolves a transaction digest to its assigned tx_seq.

§tx_metadata_by_seq: DbMap<U64Be, Protobuf<TxMetadata>>

Per-transaction metadata: digest, the containing checkpoint, position within that checkpoint, event count, and the checkpoint’s timestamp.

§effects: DbMap<U64Be, Protobuf<StoredEffects>>

The effects produced by each transaction, together with the set of objects loaded but unchanged during execution.

§events: DbMap<U64Be, Protobuf<StoredEvents>>

The events emitted by each transaction.

§objects: DbMap<Key, Protobuf<StoredObject>>

Every version of every object that has ever existed. A prefix scan on the object id walks all versions in ascending order; a reverse prefix scan resolves the latest version (the greatest (id, version) row), the way the validator perpetual store serves “latest object” reads.

§object_version_by_checkpoint: DbMap<Key, Protobuf<ObjectVersionInfo>>

An object’s version as of a checkpoint: keyed by (object id, checkpoint), a reverse prefix scan resolves the version live at the end of the most recent checkpoint, at or before the one queried, in which the object changed. Backs checkpoint-pinned historical reads that the version-keyed objects CF cannot answer.

§object_by_owner: DbMap<Key, U64Varint>

Supports listing an owner’s objects, optionally filtered by Move type. Coin-like objects sort richest-first within each (owner, type) group so paginating valuable holdings is a forward prefix scan.

§object_by_type: DbMap<Key, U64Varint>

Supports listing every live object of a given Move type, regardless of owner.

§balance: DbMap<Key, Protobuf<BalanceDelta>>

Tracks an account’s balance per coin type, combining the coin-derived component (sum of owned Coin<T> balances) and the accumulator-derived component into a single row merged from independent indexer pipelines.

§package_versions: DbMap<Key, Protobuf<PackageVersionInfo>>

Tracks every published version of a Move package and the storage id under which each version lives.

§transaction_bitmap: DbMap<Key, Protobuf<BitmapBlob>>

Inverted bitmap index over transaction-sequence space, supporting filtered transaction queries by indexed fields such as sender, called function, or input/changed object.

§event_bitmap: DbMap<Key, Protobuf<BitmapBlob>>

Inverted bitmap index over packed event-sequence space, supporting filtered event queries by event type, emitting module, sender, and similar indexed fields.

§pruning_watermark: DbMap<UnitKey, Protobuf<PruningWatermarks>>

Singleton holding the lowest still-available tx_seq, checkpoint_seq, and object version. Drives compaction filters and feeds available_range responses.