pub trait RpcStateReader:
ObjectStore
+ ReadStore
+ RuntimeObjectResolver
+ Send
+ Sync {
// Required methods
fn get_lowest_available_checkpoint_objects(
&self,
) -> Result<CheckpointSequenceNumber>;
fn get_chain_identifier(&self) -> Result<ChainIdentifier>;
fn indexes(&self) -> Option<&dyn RpcIndexes>;
fn get_struct_layout_with_overlay(
&self,
struct_tag: &StructTag,
overlay: &ObjectSet,
) -> Result<Option<MoveTypeLayout>>;
// Provided methods
fn get_highest_executed_checkpoint_seq_number(
&self,
) -> Result<CheckpointSequenceNumber> { ... }
fn get_type_layout(
&self,
type_tag: &TypeTag,
) -> Result<Option<MoveTypeLayout>> { ... }
fn get_struct_layout(
&self,
struct_tag: &StructTag,
) -> Result<Option<MoveTypeLayout>> { ... }
}Expand description
Trait used to provide functionality to the REST API service.
It extends both ObjectStore and ReadStore by adding functionality that may require more detailed underlying databases or indexes to support.
Required Methods§
Sourcefn get_lowest_available_checkpoint_objects(
&self,
) -> Result<CheckpointSequenceNumber>
fn get_lowest_available_checkpoint_objects( &self, ) -> Result<CheckpointSequenceNumber>
Lowest available checkpoint for which object data can be requested.
Specifically this is the lowest checkpoint for which input/output object data will be available.
fn get_chain_identifier(&self) -> Result<ChainIdentifier>
fn indexes(&self) -> Option<&dyn RpcIndexes>
fn get_struct_layout_with_overlay( &self, struct_tag: &StructTag, overlay: &ObjectSet, ) -> Result<Option<MoveTypeLayout>>
Provided Methods§
Sourcefn get_highest_executed_checkpoint_seq_number(
&self,
) -> Result<CheckpointSequenceNumber>
fn get_highest_executed_checkpoint_seq_number( &self, ) -> Result<CheckpointSequenceNumber>
The sequence number of the highest executed checkpoint, independent of how far any embedded index has caught up.
ReadStore::get_latest_checkpoint may bound the reported tip to the
live-object index frontier, so clients never observe a checkpoint whose
indexed state is not yet readable. The health check, by contrast, needs
the true executed tip to measure that index lag against, so it reads
this instead. Defaults to
ReadStore::get_latest_checkpoint_sequence_number for backends that
do not bound their reported tip.