sui_core::state_accumulator

Trait AccumulatorStore

Source
pub trait AccumulatorStore:
    ObjectStore
    + Send
    + Sync {
    // Required methods
    fn get_object_ref_prior_to_key_deprecated(
        &self,
        object_id: &ObjectID,
        version: VersionNumber,
    ) -> SuiResult<Option<ObjectRef>>;
    fn get_root_state_accumulator_for_epoch(
        &self,
        epoch: EpochId,
    ) -> SuiResult<Option<(CheckpointSequenceNumber, Accumulator)>>;
    fn get_root_state_accumulator_for_highest_epoch(
        &self,
    ) -> SuiResult<Option<(EpochId, (CheckpointSequenceNumber, Accumulator))>>;
    fn insert_state_accumulator_for_epoch(
        &self,
        epoch: EpochId,
        checkpoint_seq_num: &CheckpointSequenceNumber,
        acc: &Accumulator,
    ) -> SuiResult;
    fn iter_live_object_set(
        &self,
        include_wrapped_tombstone: bool,
    ) -> Box<dyn Iterator<Item = LiveObject> + '_>;

    // Provided method
    fn iter_cached_live_object_set_for_testing(
        &self,
        include_wrapped_tombstone: bool,
    ) -> Box<dyn Iterator<Item = LiveObject> + '_> { ... }
}

Required Methods§

Source

fn get_object_ref_prior_to_key_deprecated( &self, object_id: &ObjectID, version: VersionNumber, ) -> SuiResult<Option<ObjectRef>>

This function is only called in older protocol versions, and should no longer be used. It creates an explicit dependency to tombstones which is not desired.

Source

fn get_root_state_accumulator_for_epoch( &self, epoch: EpochId, ) -> SuiResult<Option<(CheckpointSequenceNumber, Accumulator)>>

Source

fn get_root_state_accumulator_for_highest_epoch( &self, ) -> SuiResult<Option<(EpochId, (CheckpointSequenceNumber, Accumulator))>>

Source

fn insert_state_accumulator_for_epoch( &self, epoch: EpochId, checkpoint_seq_num: &CheckpointSequenceNumber, acc: &Accumulator, ) -> SuiResult

Source

fn iter_live_object_set( &self, include_wrapped_tombstone: bool, ) -> Box<dyn Iterator<Item = LiveObject> + '_>

Provided Methods§

Source

fn iter_cached_live_object_set_for_testing( &self, include_wrapped_tombstone: bool, ) -> Box<dyn Iterator<Item = LiveObject> + '_>

Implementations on Foreign Types§

Source§

impl AccumulatorStore for InMemoryStorage

Implementors§