pub trait ExecutionCacheCommit: Send + Sync {
    // Required methods
    fn commit_transaction_outputs<'a>(
        &'a self,
        epoch: EpochId,
        digests: &'a [TransactionDigest]
    ) -> BoxFuture<'a, SuiResult>;
    fn persist_transactions<'a>(
        &'a self,
        digests: &'a [TransactionDigest]
    ) -> BoxFuture<'a, SuiResult>;
}

Required Methods§

source

fn commit_transaction_outputs<'a>( &'a self, epoch: EpochId, digests: &'a [TransactionDigest] ) -> BoxFuture<'a, SuiResult>

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_transactions<'a>( &'a self, digests: &'a [TransactionDigest] ) -> BoxFuture<'a, SuiResult>

Durably commit transactions (but not their outputs) to the database. Called before writing a locally built checkpoint to the CheckpointStore, so that the inputs of the checkpoint cannot be lost. These transactions are guaranteed to be final unless this validator forks (i.e. constructs a checkpoint which will never be certified). In this case some non-final transactions could be left in the database.

This is an intermediate solution until we delay commits to the epoch db. After we have done that, crash recovery will be done by re-processing consensus commits and pending_consensus_transactions, and this method can be removed.

Implementors§