sui_core::execution_cache

Trait ObjectCacheRead

Source
pub trait ObjectCacheRead: Send + Sync {
Show 25 methods // Required methods fn get_package_object( &self, id: &ObjectID, ) -> SuiResult<Option<PackageObject>>; fn force_reload_system_packages(&self, system_package_ids: &[ObjectID]); fn get_object(&self, id: &ObjectID) -> Option<Object>; fn get_latest_object_ref_or_tombstone( &self, object_id: ObjectID, ) -> Option<ObjectRef>; fn get_latest_object_or_tombstone( &self, object_id: ObjectID, ) -> Option<(ObjectKey, ObjectOrTombstone)>; fn get_object_by_key( &self, object_id: &ObjectID, version: SequenceNumber, ) -> Option<Object>; fn multi_get_objects_by_key( &self, object_keys: &[ObjectKey], ) -> Vec<Option<Object>>; fn object_exists_by_key( &self, object_id: &ObjectID, version: SequenceNumber, ) -> bool; fn multi_object_exists_by_key(&self, object_keys: &[ObjectKey]) -> Vec<bool>; fn find_object_lt_or_eq_version( &self, object_id: ObjectID, version: SequenceNumber, ) -> Option<Object>; fn get_lock( &self, obj_ref: ObjectRef, epoch_store: &AuthorityPerEpochStore, ) -> SuiResult<ObjectLockStatus>; fn _get_live_objref(&self, object_id: ObjectID) -> SuiResult<ObjectRef>; fn check_owned_objects_are_live( &self, owned_object_refs: &[ObjectRef], ) -> SuiResult; fn get_sui_system_state_object_unsafe(&self) -> SuiResult<SuiSystemState>; fn get_bridge_object_unsafe(&self) -> SuiResult<Bridge>; fn get_marker_value( &self, object_key: FullObjectKey, epoch_id: EpochId, ) -> Option<MarkerValue>; fn get_latest_marker( &self, object_id: FullObjectID, epoch_id: EpochId, ) -> Option<(SequenceNumber, MarkerValue)>; fn get_highest_pruned_checkpoint(&self) -> Option<CheckpointSequenceNumber>; // Provided methods fn get_objects(&self, objects: &[ObjectID]) -> Vec<Option<Object>> { ... } fn multi_get_objects_with_more_accurate_error_return( &self, object_refs: &[ObjectRef], ) -> Result<Vec<Object>, SuiError> { ... } fn multi_input_objects_available( &self, keys: &[InputKey], receiving_objects: HashSet<InputKey>, epoch: EpochId, ) -> Vec<bool> { ... } fn get_last_consensus_stream_end_info( &self, object_id: FullObjectID, epoch_id: EpochId, ) -> Option<(SequenceNumber, TransactionDigest)> { ... } fn get_consensus_stream_end_tx_digest( &self, object_key: FullObjectKey, epoch_id: EpochId, ) -> Option<TransactionDigest> { ... } fn have_received_object_at_version( &self, object_key: FullObjectKey, epoch_id: EpochId, ) -> bool { ... } fn fastpath_stream_ended_at_version_or_after( &self, object_id: ObjectID, version: SequenceNumber, epoch_id: EpochId, ) -> bool { ... }
}

Required Methods§

Source

fn get_package_object(&self, id: &ObjectID) -> SuiResult<Option<PackageObject>>

Source

fn force_reload_system_packages(&self, system_package_ids: &[ObjectID])

Source

fn get_object(&self, id: &ObjectID) -> Option<Object>

Source

fn get_latest_object_ref_or_tombstone( &self, object_id: ObjectID, ) -> Option<ObjectRef>

Source

fn get_latest_object_or_tombstone( &self, object_id: ObjectID, ) -> Option<(ObjectKey, ObjectOrTombstone)>

Source

fn get_object_by_key( &self, object_id: &ObjectID, version: SequenceNumber, ) -> Option<Object>

Source

fn multi_get_objects_by_key( &self, object_keys: &[ObjectKey], ) -> Vec<Option<Object>>

Source

fn object_exists_by_key( &self, object_id: &ObjectID, version: SequenceNumber, ) -> bool

Source

fn multi_object_exists_by_key(&self, object_keys: &[ObjectKey]) -> Vec<bool>

Source

fn find_object_lt_or_eq_version( &self, object_id: ObjectID, version: SequenceNumber, ) -> Option<Object>

Return the object with version less then or eq to the provided seq number. This is used by indexer to find the correct version of dynamic field child object. We do not store the version of the child object, but because of lamport timestamp, we know the child must have version number less then or eq to the parent.

Source

fn get_lock( &self, obj_ref: ObjectRef, epoch_store: &AuthorityPerEpochStore, ) -> SuiResult<ObjectLockStatus>

Source

fn _get_live_objref(&self, object_id: ObjectID) -> SuiResult<ObjectRef>

Source

fn check_owned_objects_are_live( &self, owned_object_refs: &[ObjectRef], ) -> SuiResult

Source

fn get_sui_system_state_object_unsafe(&self) -> SuiResult<SuiSystemState>

Source

fn get_bridge_object_unsafe(&self) -> SuiResult<Bridge>

Source

fn get_marker_value( &self, object_key: FullObjectKey, epoch_id: EpochId, ) -> Option<MarkerValue>

Get the marker at a specific version

Source

fn get_latest_marker( &self, object_id: FullObjectID, epoch_id: EpochId, ) -> Option<(SequenceNumber, MarkerValue)>

Get the latest marker for a given object.

Source

fn get_highest_pruned_checkpoint(&self) -> Option<CheckpointSequenceNumber>

Return the watermark for the highest checkpoint for which we’ve pruned objects.

Provided Methods§

Source

fn get_objects(&self, objects: &[ObjectID]) -> Vec<Option<Object>>

Source

fn multi_get_objects_with_more_accurate_error_return( &self, object_refs: &[ObjectRef], ) -> Result<Vec<Object>, SuiError>

Load a list of objects from the store by object reference. If they exist in the store, they are returned directly. If any object missing, we try to figure out the best error to return. If the object we are asking is currently locked at a future version, we know this transaction is out-of-date and we return a ObjectVersionUnavailableForConsumption, which indicates this is not retriable. Otherwise, we return a ObjectNotFound error, which indicates this is retriable.

Source

fn multi_input_objects_available( &self, keys: &[InputKey], receiving_objects: HashSet<InputKey>, epoch: EpochId, ) -> Vec<bool>

Used by transaction manager to determine if input objects are ready. Distinct from multi_get_object_by_key because it also consults markers to handle the case where an object will never become available (e.g. because it has been received by some other transaction already).

Source

fn get_last_consensus_stream_end_info( &self, object_id: FullObjectID, epoch_id: EpochId, ) -> Option<(SequenceNumber, TransactionDigest)>

If the given consensus object stream was ended, return related version and transaction digest.

Source

fn get_consensus_stream_end_tx_digest( &self, object_key: FullObjectKey, epoch_id: EpochId, ) -> Option<TransactionDigest>

If the given consensus object stream was ended at the specified version, return related transaction digest.

Source

fn have_received_object_at_version( &self, object_key: FullObjectKey, epoch_id: EpochId, ) -> bool

Source

fn fastpath_stream_ended_at_version_or_after( &self, object_id: ObjectID, version: SequenceNumber, epoch_id: EpochId, ) -> bool

Implementors§