pub trait ExecutionCacheWrite: Send + Sync {
// Required methods
fn write_transaction_outputs(
&self,
epoch_id: EpochId,
tx_outputs: Arc<TransactionOutputs>,
);
fn acquire_transaction_locks(
&self,
epoch_store: &AuthorityPerEpochStore,
owned_input_objects: &[ObjectRef],
tx_digest: TransactionDigest,
signed_transaction: Option<VerifiedSignedTransaction>,
) -> SuiResult;
}
Required Methods§
Sourcefn write_transaction_outputs(
&self,
epoch_id: EpochId,
tx_outputs: Arc<TransactionOutputs>,
)
fn write_transaction_outputs( &self, epoch_id: EpochId, tx_outputs: Arc<TransactionOutputs>, )
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.
Sourcefn acquire_transaction_locks(
&self,
epoch_store: &AuthorityPerEpochStore,
owned_input_objects: &[ObjectRef],
tx_digest: TransactionDigest,
signed_transaction: Option<VerifiedSignedTransaction>,
) -> SuiResult
fn acquire_transaction_locks( &self, epoch_store: &AuthorityPerEpochStore, owned_input_objects: &[ObjectRef], tx_digest: TransactionDigest, signed_transaction: Option<VerifiedSignedTransaction>, ) -> SuiResult
Attempt to acquire object locks for all of the owned input locks.