sui_core::execution_cache

Trait ExecutionCacheCommit

Source
pub trait ExecutionCacheCommit: Send + Sync {
    // Required methods
    fn build_db_batch(
        &self,
        epoch: EpochId,
        digests: &[TransactionDigest],
    ) -> Batch;
    fn commit_transaction_outputs(
        &self,
        epoch: EpochId,
        batch: Batch,
        digests: &[TransactionDigest],
    );
    fn persist_transaction(&self, transaction: &VerifiedExecutableTransaction);
    fn approximate_pending_transaction_count(&self) -> u64;
}

Required Methods§

Source

fn build_db_batch(&self, epoch: EpochId, digests: &[TransactionDigest]) -> Batch

Build a DBBatch containing the given transaction outputs.

Source

fn commit_transaction_outputs( &self, epoch: EpochId, batch: Batch, digests: &[TransactionDigest], )

Durably commit the outputs of the given transactions to the database. Will be called by CheckpointExecutor to ensure that transaction outputs are written durably before marking a checkpoint as finalized.

Source

fn persist_transaction(&self, transaction: &VerifiedExecutableTransaction)

Durably commit a transaction to the database. Used to store any transactions that cannot be reconstructed at start-up by consensus replay. Currently the only case of this is RandomnessStateUpdate.

Source

fn approximate_pending_transaction_count(&self) -> u64

Implementors§