Crate sui_rpc_store

Crate sui_rpc_store 

Source
Expand description

Storage backend for sui-rpc-api.

Built on top of [sui_consistent_store], this crate hosts the column families that back every read the RPC service performs:

  • Raw chain data — objects, transactions, effects, events, checkpoints, committees — previously served by the validator’s perpetual / checkpoint / committee stores.
  • Indexes — owner, dynamic-field, coin, balance, package version, epoch info, ledger history — previously served by sui-core::rpc_index and sui-indexer-alt-consistent-store.

Values are encoded with bespoke protobuf messages defined under proto/sui/rpc_store/, mirroring the build setup in sui-consistent-store.

Re-exports§

pub use crate::config::CommitterLayer;
pub use crate::config::ConsistencyConfig;
pub use crate::config::PipelineLayer;
pub use crate::config::PrunerConfig;
pub use crate::config::RestoreLayer;
pub use crate::config::ServiceConfig;
pub use crate::indexer::Indexer;
pub use crate::indexer::METRICS_PREFIX;
pub use crate::indexer::Store;
pub use crate::indexer::checkpoint_broadcast::CheckpointBroadcast;
pub use crate::indexer::checkpoint_broadcast::seed_watermark_to_tip as seed_checkpoint_broadcast_watermark;
pub use crate::indexer::pruner::prune_history_cohort;
pub use crate::indexer::restore::HISTORY_COHORT;
pub use crate::indexer::restore::LIVE_COHORT;
pub use crate::indexer::restore::floor_unrestored_pipelines;
pub use crate::indexer::restore::restore_indexes;
pub use crate::indexer::restore::seed_current_epoch_start;
pub use crate::indexer::restore::seed_history_cohort;
pub use crate::reader::RpcStoreReader;
pub use crate::schema::RpcStoreSchema;
pub use crate::schema::default_rocksdb_config;

Modules§

config
Runtime configuration for the sui-rpc-store indexer.
indexer
Indexer pipelines that populate the sui-rpc-store schema from observed Checkpoints, plus the orchestrator (Indexer) that wires them up against a shared [Synchronizer].
proto
Generated protobuf types backing sui-rpc-store values.
reader
Adapter that exposes RpcStoreSchema through the trait stack sui-rpc-api consumes — ObjectStore, ReadStore, ChildObjectResolver, RpcStateReader, and RpcIndexes.
schema
Column-family layout for sui-rpc-store.

Functions§

start_indexer
Standalone-binary entry point. Opens the database at path, constructs an Indexer from ClientArgs-driven ingestion / streaming clients, registers every pipeline that is enabled in config.pipeline, and runs the resulting indexer.