sui_types::storage

Trait ReadStore

Source
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§

Source

fn get_committee(&self, epoch: EpochId) -> Option<Arc<Committee>>

Source

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.

Source

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.

Source

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

Source

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.

Source

fn get_checkpoint_by_digest( &self, digest: &CheckpointDigest, ) -> Option<VerifiedCheckpoint>

Source

fn get_checkpoint_by_sequence_number( &self, sequence_number: CheckpointSequenceNumber, ) -> Option<VerifiedCheckpoint>

Source

fn get_checkpoint_contents_by_digest( &self, digest: &CheckpointContentsDigest, ) -> Option<CheckpointContents>

Source

fn get_checkpoint_contents_by_sequence_number( &self, sequence_number: CheckpointSequenceNumber, ) -> Option<CheckpointContents>

Source

fn get_transaction( &self, tx_digest: &TransactionDigest, ) -> Option<Arc<VerifiedTransaction>>

Source

fn get_transaction_effects( &self, tx_digest: &TransactionDigest, ) -> Option<TransactionEffects>

Source

fn get_events( &self, event_digest: &TransactionDigest, ) -> Option<TransactionEvents>

Source

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

Source

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§

Source

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.

Source

fn get_latest_epoch_id(&self) -> Result<EpochId>

Get the epoch of the latest checkpoint

Source

fn multi_get_transactions( &self, tx_digests: &[TransactionDigest], ) -> Vec<Option<Arc<VerifiedTransaction>>>

Source

fn multi_get_transaction_effects( &self, tx_digests: &[TransactionDigest], ) -> Vec<Option<TransactionEffects>>

Source

fn multi_get_events( &self, event_digests: &[TransactionDigest], ) -> Vec<Option<TransactionEvents>>

Source

fn get_checkpoint_data( &self, checkpoint: VerifiedCheckpoint, checkpoint_contents: CheckpointContents, ) -> Result<CheckpointData>

Implementations on Foreign Types§

Source§

impl<T: ReadStore + ?Sized> ReadStore for &T

Source§

fn get_committee(&self, epoch: EpochId) -> Option<Arc<Committee>>

Source§

fn get_latest_checkpoint(&self) -> Result<VerifiedCheckpoint>

Source§

fn get_latest_checkpoint_sequence_number( &self, ) -> Result<CheckpointSequenceNumber>

Source§

fn get_latest_epoch_id(&self) -> Result<EpochId>

Source§

fn get_highest_verified_checkpoint(&self) -> Result<VerifiedCheckpoint>

Source§

fn get_highest_synced_checkpoint(&self) -> Result<VerifiedCheckpoint>

Source§

fn get_lowest_available_checkpoint(&self) -> Result<CheckpointSequenceNumber>

Source§

fn get_checkpoint_by_digest( &self, digest: &CheckpointDigest, ) -> Option<VerifiedCheckpoint>

Source§

fn get_checkpoint_by_sequence_number( &self, sequence_number: CheckpointSequenceNumber, ) -> Option<VerifiedCheckpoint>

Source§

fn get_checkpoint_contents_by_digest( &self, digest: &CheckpointContentsDigest, ) -> Option<CheckpointContents>

Source§

fn get_checkpoint_contents_by_sequence_number( &self, sequence_number: CheckpointSequenceNumber, ) -> Option<CheckpointContents>

Source§

fn get_transaction( &self, tx_digest: &TransactionDigest, ) -> Option<Arc<VerifiedTransaction>>

Source§

fn multi_get_transactions( &self, tx_digests: &[TransactionDigest], ) -> Vec<Option<Arc<VerifiedTransaction>>>

Source§

fn get_transaction_effects( &self, tx_digest: &TransactionDigest, ) -> Option<TransactionEffects>

Source§

fn multi_get_transaction_effects( &self, tx_digests: &[TransactionDigest], ) -> Vec<Option<TransactionEffects>>

Source§

fn get_events( &self, event_digest: &TransactionDigest, ) -> Option<TransactionEvents>

Source§

fn multi_get_events( &self, event_digests: &[TransactionDigest], ) -> Vec<Option<TransactionEvents>>

Source§

fn get_full_checkpoint_contents_by_sequence_number( &self, sequence_number: CheckpointSequenceNumber, ) -> Option<FullCheckpointContents>

Source§

fn get_full_checkpoint_contents( &self, digest: &CheckpointContentsDigest, ) -> Option<FullCheckpointContents>

Source§

fn get_checkpoint_data( &self, checkpoint: VerifiedCheckpoint, checkpoint_contents: CheckpointContents, ) -> Result<CheckpointData>

Source§

impl<T: ReadStore + ?Sized> ReadStore for Box<T>

Source§

fn get_committee(&self, epoch: EpochId) -> Option<Arc<Committee>>

Source§

fn get_latest_checkpoint(&self) -> Result<VerifiedCheckpoint>

Source§

fn get_latest_checkpoint_sequence_number( &self, ) -> Result<CheckpointSequenceNumber>

Source§

fn get_latest_epoch_id(&self) -> Result<EpochId>

Source§

fn get_highest_verified_checkpoint(&self) -> Result<VerifiedCheckpoint>

Source§

fn get_highest_synced_checkpoint(&self) -> Result<VerifiedCheckpoint>

Source§

fn get_lowest_available_checkpoint(&self) -> Result<CheckpointSequenceNumber>

Source§

fn get_checkpoint_by_digest( &self, digest: &CheckpointDigest, ) -> Option<VerifiedCheckpoint>

Source§

fn get_checkpoint_by_sequence_number( &self, sequence_number: CheckpointSequenceNumber, ) -> Option<VerifiedCheckpoint>

Source§

fn get_checkpoint_contents_by_digest( &self, digest: &CheckpointContentsDigest, ) -> Option<CheckpointContents>

Source§

fn get_checkpoint_contents_by_sequence_number( &self, sequence_number: CheckpointSequenceNumber, ) -> Option<CheckpointContents>

Source§

fn get_transaction( &self, tx_digest: &TransactionDigest, ) -> Option<Arc<VerifiedTransaction>>

Source§

fn multi_get_transactions( &self, tx_digests: &[TransactionDigest], ) -> Vec<Option<Arc<VerifiedTransaction>>>

Source§

fn get_transaction_effects( &self, tx_digest: &TransactionDigest, ) -> Option<TransactionEffects>

Source§

fn multi_get_transaction_effects( &self, tx_digests: &[TransactionDigest], ) -> Vec<Option<TransactionEffects>>

Source§

fn get_events( &self, event_digest: &TransactionDigest, ) -> Option<TransactionEvents>

Source§

fn multi_get_events( &self, event_digests: &[TransactionDigest], ) -> Vec<Option<TransactionEvents>>

Source§

fn get_full_checkpoint_contents_by_sequence_number( &self, sequence_number: CheckpointSequenceNumber, ) -> Option<FullCheckpointContents>

Source§

fn get_full_checkpoint_contents( &self, digest: &CheckpointContentsDigest, ) -> Option<FullCheckpointContents>

Source§

fn get_checkpoint_data( &self, checkpoint: VerifiedCheckpoint, checkpoint_contents: CheckpointContents, ) -> Result<CheckpointData>

Source§

impl<T: ReadStore + ?Sized> ReadStore for Arc<T>

Source§

fn get_committee(&self, epoch: EpochId) -> Option<Arc<Committee>>

Source§

fn get_latest_checkpoint(&self) -> Result<VerifiedCheckpoint>

Source§

fn get_latest_checkpoint_sequence_number( &self, ) -> Result<CheckpointSequenceNumber>

Source§

fn get_latest_epoch_id(&self) -> Result<EpochId>

Source§

fn get_highest_verified_checkpoint(&self) -> Result<VerifiedCheckpoint>

Source§

fn get_highest_synced_checkpoint(&self) -> Result<VerifiedCheckpoint>

Source§

fn get_lowest_available_checkpoint(&self) -> Result<CheckpointSequenceNumber>

Source§

fn get_checkpoint_by_digest( &self, digest: &CheckpointDigest, ) -> Option<VerifiedCheckpoint>

Source§

fn get_checkpoint_by_sequence_number( &self, sequence_number: CheckpointSequenceNumber, ) -> Option<VerifiedCheckpoint>

Source§

fn get_checkpoint_contents_by_digest( &self, digest: &CheckpointContentsDigest, ) -> Option<CheckpointContents>

Source§

fn get_checkpoint_contents_by_sequence_number( &self, sequence_number: CheckpointSequenceNumber, ) -> Option<CheckpointContents>

Source§

fn get_transaction( &self, tx_digest: &TransactionDigest, ) -> Option<Arc<VerifiedTransaction>>

Source§

fn multi_get_transactions( &self, tx_digests: &[TransactionDigest], ) -> Vec<Option<Arc<VerifiedTransaction>>>

Source§

fn get_transaction_effects( &self, tx_digest: &TransactionDigest, ) -> Option<TransactionEffects>

Source§

fn multi_get_transaction_effects( &self, tx_digests: &[TransactionDigest], ) -> Vec<Option<TransactionEffects>>

Source§

fn get_events( &self, event_digest: &TransactionDigest, ) -> Option<TransactionEvents>

Source§

fn multi_get_events( &self, event_digests: &[TransactionDigest], ) -> Vec<Option<TransactionEvents>>

Source§

fn get_full_checkpoint_contents_by_sequence_number( &self, sequence_number: CheckpointSequenceNumber, ) -> Option<FullCheckpointContents>

Source§

fn get_full_checkpoint_contents( &self, digest: &CheckpointContentsDigest, ) -> Option<FullCheckpointContents>

Source§

fn get_checkpoint_data( &self, checkpoint: VerifiedCheckpoint, checkpoint_contents: CheckpointContents, ) -> Result<CheckpointData>

Implementors§