Trait iota_types::storage::ReadStore

source ·
pub trait ReadStore: ObjectStore {
Show 20 methods // Required methods fn get_committee(&self, epoch: EpochId) -> Result<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, ) -> Result<Option<VerifiedCheckpoint>>; fn get_checkpoint_by_sequence_number( &self, sequence_number: CheckpointSequenceNumber, ) -> Result<Option<VerifiedCheckpoint>>; fn get_checkpoint_contents_by_digest( &self, digest: &CheckpointContentsDigest, ) -> Result<Option<CheckpointContents>>; fn get_checkpoint_contents_by_sequence_number( &self, sequence_number: CheckpointSequenceNumber, ) -> Result<Option<CheckpointContents>>; fn get_transaction( &self, tx_digest: &TransactionDigest, ) -> Result<Option<Arc<VerifiedTransaction>>>; fn get_transaction_effects( &self, tx_digest: &TransactionDigest, ) -> Result<Option<TransactionEffects>>; fn get_events( &self, event_digest: &TransactionEventsDigest, ) -> Result<Option<TransactionEvents>>; fn get_full_checkpoint_contents_by_sequence_number( &self, sequence_number: CheckpointSequenceNumber, ) -> Result<Option<FullCheckpointContents>>; fn get_full_checkpoint_contents( &self, digest: &CheckpointContentsDigest, ) -> Result<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], ) -> Result<Vec<Option<Arc<VerifiedTransaction>>>> { ... } fn multi_get_transaction_effects( &self, tx_digests: &[TransactionDigest], ) -> Result<Vec<Option<TransactionEffects>>> { ... } fn multi_get_events( &self, event_digests: &[TransactionEventsDigest], ) -> Result<Vec<Option<TransactionEvents>>> { ... } fn get_checkpoint_data( &self, checkpoint: VerifiedCheckpoint, checkpoint_contents: CheckpointContents, ) -> Result<CheckpointData> { ... }
}

Required Methods§

source

fn get_committee(&self, epoch: EpochId) -> Result<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, ) -> Result<Option<VerifiedCheckpoint>>

source

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

source

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

source

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

source

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

source

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

source

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

source

fn get_full_checkpoint_contents_by_sequence_number( &self, sequence_number: CheckpointSequenceNumber, ) -> Result<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, ) -> Result<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], ) -> Result<Vec<Option<Arc<VerifiedTransaction>>>>

source

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

source

fn multi_get_events( &self, event_digests: &[TransactionEventsDigest], ) -> Result<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) -> Result<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, ) -> Result<Option<VerifiedCheckpoint>>

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

fn get_full_checkpoint_contents( &self, digest: &CheckpointContentsDigest, ) -> Result<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) -> Result<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, ) -> Result<Option<VerifiedCheckpoint>>

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

fn get_full_checkpoint_contents( &self, digest: &CheckpointContentsDigest, ) -> Result<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) -> Result<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, ) -> Result<Option<VerifiedCheckpoint>>

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

Implementors§