pub trait ExecutionCacheWrite: Send + Sync {
// Required methods
fn write_transaction_outputs(
&self,
epoch_id: EpochId,
tx_outputs: Arc<TransactionOutputs>,
);
fn validate_owned_object_versions(
&self,
owned_input_objects: &[ObjectRef],
) -> 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 validate_owned_object_versions(
&self,
owned_input_objects: &[ObjectRef],
) -> SuiResult
fn validate_owned_object_versions( &self, owned_input_objects: &[ObjectRef], ) -> SuiResult
Validate owned object versions and digests without acquiring locks. Used to validate transaction input before submitting or voting to accept the transaction.