pub trait ExecutionCacheWrite: Send + Sync {
    // Required methods
    fn write_transaction_outputs(
        &self,
        epoch_id: EpochId,
        tx_outputs: Arc<TransactionOutputs>
    ) -> BoxFuture<'_, SuiResult>;
    fn acquire_transaction_locks<'a>(
        &'a self,
        epoch_store: &'a AuthorityPerEpochStore,
        owned_input_objects: &'a [ObjectRef],
        transaction: VerifiedSignedTransaction
    ) -> BoxFuture<'a, SuiResult>;
}

Required Methods§

source

fn write_transaction_outputs( &self, epoch_id: EpochId, tx_outputs: Arc<TransactionOutputs> ) -> BoxFuture<'_, SuiResult>

Write the output of a transaction.

Because of the child object consistency rule (readers that observe parents must observe all children of that parent, up to the parent’s version bound), implementations of this method must not write any top-level (address-owned or shared) objects before they have written all of the object-owned objects (i.e. child objects) in the objects list.

In the future, we may modify this method to expose finer-grained information about parent/child relationships. (This may be especially necessary for distributed object storage, but is unlikely to be an issue before we tackle that problem).

This function may evict the mutable input objects (and successfully received objects) of transaction from the cache, since they cannot be read by any other transaction.

Any write performed by this method immediately notifies any waiter that has previously called notify_read_objects_for_execution or notify_read_objects_for_signing for the object in question.

source

fn acquire_transaction_locks<'a>( &'a self, epoch_store: &'a AuthorityPerEpochStore, owned_input_objects: &'a [ObjectRef], transaction: VerifiedSignedTransaction ) -> BoxFuture<'a, SuiResult>

Attempt to acquire object locks for all of the owned input locks.

Implementors§