pub trait ReadStore: ObjectStore {
Show 20 methods
// Required methods
fn get_committee(&self, epoch: EpochId) -> Option<Arc<Committee>>;
fn get_latest_checkpoint(&self) -> Result<VerifiedCheckpoint>;
fn get_highest_verified_checkpoint(&self) -> Result<VerifiedCheckpoint>;
fn get_highest_synced_checkpoint(&self) -> Result<VerifiedCheckpoint>;
fn get_lowest_available_checkpoint(
&self,
) -> Result<CheckpointSequenceNumber>;
fn get_checkpoint_by_digest(
&self,
digest: &CheckpointDigest,
) -> Option<VerifiedCheckpoint>;
fn get_checkpoint_by_sequence_number(
&self,
sequence_number: CheckpointSequenceNumber,
) -> Option<VerifiedCheckpoint>;
fn get_checkpoint_contents_by_digest(
&self,
digest: &CheckpointContentsDigest,
) -> Option<CheckpointContents>;
fn get_checkpoint_contents_by_sequence_number(
&self,
sequence_number: CheckpointSequenceNumber,
) -> Option<CheckpointContents>;
fn get_transaction(
&self,
tx_digest: &TransactionDigest,
) -> Option<Arc<VerifiedTransaction>>;
fn get_transaction_effects(
&self,
tx_digest: &TransactionDigest,
) -> Option<TransactionEffects>;
fn get_events(
&self,
event_digest: &TransactionDigest,
) -> Option<TransactionEvents>;
fn get_full_checkpoint_contents_by_sequence_number(
&self,
sequence_number: CheckpointSequenceNumber,
) -> Option<FullCheckpointContents>;
fn get_full_checkpoint_contents(
&self,
digest: &CheckpointContentsDigest,
) -> Option<FullCheckpointContents>;
// Provided methods
fn get_latest_checkpoint_sequence_number(
&self,
) -> Result<CheckpointSequenceNumber> { ... }
fn get_latest_epoch_id(&self) -> Result<EpochId> { ... }
fn multi_get_transactions(
&self,
tx_digests: &[TransactionDigest],
) -> Vec<Option<Arc<VerifiedTransaction>>> { ... }
fn multi_get_transaction_effects(
&self,
tx_digests: &[TransactionDigest],
) -> Vec<Option<TransactionEffects>> { ... }
fn multi_get_events(
&self,
event_digests: &[TransactionDigest],
) -> Vec<Option<TransactionEvents>> { ... }
fn get_checkpoint_data(
&self,
checkpoint: VerifiedCheckpoint,
checkpoint_contents: CheckpointContents,
) -> Result<CheckpointData> { ... }
}
Required Methods§
fn get_committee(&self, epoch: EpochId) -> Option<Arc<Committee>>
Sourcefn get_latest_checkpoint(&self) -> Result<VerifiedCheckpoint>
fn get_latest_checkpoint(&self) -> Result<VerifiedCheckpoint>
Get the latest available checkpoint. This is the latest executed checkpoint.
All transactions, effects, objects and events are guaranteed to be available for the returned checkpoint.
Sourcefn get_highest_verified_checkpoint(&self) -> Result<VerifiedCheckpoint>
fn get_highest_verified_checkpoint(&self) -> Result<VerifiedCheckpoint>
Get the highest verified checkpint. This is the highest checkpoint summary that has been verified, generally by state-sync. Only the checkpoint header is guaranteed to be present in the store.
Sourcefn get_highest_synced_checkpoint(&self) -> Result<VerifiedCheckpoint>
fn get_highest_synced_checkpoint(&self) -> Result<VerifiedCheckpoint>
Get the highest synced checkpint. This is the highest checkpoint that has been synced from state-synce. The checkpoint header, contents, transactions, and effects of this checkpoint are guaranteed to be present in the store
Sourcefn get_lowest_available_checkpoint(&self) -> Result<CheckpointSequenceNumber>
fn get_lowest_available_checkpoint(&self) -> Result<CheckpointSequenceNumber>
Lowest available checkpoint for which transaction and checkpoint data can be requested.
Specifically this is the lowest checkpoint for which the following data can be requested:
- checkpoints
- transactions
- effects
- events
For object availability see get_lowest_available_checkpoint_objects
.
fn get_checkpoint_by_digest( &self, digest: &CheckpointDigest, ) -> Option<VerifiedCheckpoint>
fn get_checkpoint_by_sequence_number( &self, sequence_number: CheckpointSequenceNumber, ) -> Option<VerifiedCheckpoint>
fn get_checkpoint_contents_by_digest( &self, digest: &CheckpointContentsDigest, ) -> Option<CheckpointContents>
fn get_checkpoint_contents_by_sequence_number( &self, sequence_number: CheckpointSequenceNumber, ) -> Option<CheckpointContents>
fn get_transaction( &self, tx_digest: &TransactionDigest, ) -> Option<Arc<VerifiedTransaction>>
fn get_transaction_effects( &self, tx_digest: &TransactionDigest, ) -> Option<TransactionEffects>
fn get_events( &self, event_digest: &TransactionDigest, ) -> Option<TransactionEvents>
Sourcefn get_full_checkpoint_contents_by_sequence_number(
&self,
sequence_number: CheckpointSequenceNumber,
) -> Option<FullCheckpointContents>
fn get_full_checkpoint_contents_by_sequence_number( &self, sequence_number: CheckpointSequenceNumber, ) -> Option<FullCheckpointContents>
Get a “full” checkpoint for purposes of state-sync “full” checkpoints include: header, contents, transactions, effects
Sourcefn get_full_checkpoint_contents(
&self,
digest: &CheckpointContentsDigest,
) -> Option<FullCheckpointContents>
fn get_full_checkpoint_contents( &self, digest: &CheckpointContentsDigest, ) -> Option<FullCheckpointContents>
Get a “full” checkpoint for purposes of state-sync “full” checkpoints include: header, contents, transactions, effects
Provided Methods§
Sourcefn get_latest_checkpoint_sequence_number(
&self,
) -> Result<CheckpointSequenceNumber>
fn get_latest_checkpoint_sequence_number( &self, ) -> Result<CheckpointSequenceNumber>
Get the latest available checkpoint sequence number. This is the sequence number of the latest executed checkpoint.
Sourcefn get_latest_epoch_id(&self) -> Result<EpochId>
fn get_latest_epoch_id(&self) -> Result<EpochId>
Get the epoch of the latest checkpoint