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§
fn get_committee(&self, epoch: EpochId) -> Result<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, ) -> 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>>
sourcefn get_full_checkpoint_contents_by_sequence_number(
&self,
sequence_number: CheckpointSequenceNumber,
) -> Result<Option<FullCheckpointContents>>
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
sourcefn get_full_checkpoint_contents(
&self,
digest: &CheckpointContentsDigest,
) -> Result<Option<FullCheckpointContents>>
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§
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