sui_execution/
executor.rsuse move_trace_format::format::MoveTraceBuilder;
use std::{collections::HashSet, sync::Arc};
use sui_protocol_config::ProtocolConfig;
use sui_types::execution::ExecutionTiming;
use sui_types::storage::BackingStore;
use sui_types::transaction::GasData;
use sui_types::{
base_types::SuiAddress,
committee::EpochId,
digests::TransactionDigest,
effects::TransactionEffects,
error::ExecutionError,
execution::{ExecutionResult, TypeLayoutStore},
gas::SuiGasStatus,
inner_temporary_store::InnerTemporaryStore,
layout_resolver::LayoutResolver,
metrics::LimitsMetrics,
transaction::{CheckedInputObjects, ProgrammableTransaction, TransactionKind},
};
pub trait Executor {
fn execute_transaction_to_effects(
&self,
store: &dyn BackingStore,
protocol_config: &ProtocolConfig,
metrics: Arc<LimitsMetrics>,
enable_expensive_checks: bool,
certificate_deny_set: &HashSet<TransactionDigest>,
epoch_id: &EpochId,
epoch_timestamp_ms: u64,
input_objects: CheckedInputObjects,
gas: GasData,
gas_status: SuiGasStatus,
transaction_kind: TransactionKind,
transaction_signer: SuiAddress,
transaction_digest: TransactionDigest,
trace_builder_opt: &mut Option<MoveTraceBuilder>,
) -> (
InnerTemporaryStore,
SuiGasStatus,
TransactionEffects,
Vec<ExecutionTiming>,
Result<(), ExecutionError>,
);
fn dev_inspect_transaction(
&self,
store: &dyn BackingStore,
protocol_config: &ProtocolConfig,
metrics: Arc<LimitsMetrics>,
enable_expensive_checks: bool,
certificate_deny_set: &HashSet<TransactionDigest>,
epoch_id: &EpochId,
epoch_timestamp_ms: u64,
input_objects: CheckedInputObjects,
gas: GasData,
gas_status: SuiGasStatus,
transaction_kind: TransactionKind,
transaction_signer: SuiAddress,
transaction_digest: TransactionDigest,
skip_all_checks: bool,
) -> (
InnerTemporaryStore,
SuiGasStatus,
TransactionEffects,
Result<Vec<ExecutionResult>, ExecutionError>,
);
fn update_genesis_state(
&self,
store: &dyn BackingStore,
protocol_config: &ProtocolConfig,
metrics: Arc<LimitsMetrics>,
epoch_id: EpochId,
epoch_timestamp_ms: u64,
transaction_digest: &TransactionDigest,
input_objects: CheckedInputObjects,
pt: ProgrammableTransaction,
) -> Result<InnerTemporaryStore, ExecutionError>;
fn type_layout_resolver<'r, 'vm: 'r, 'store: 'r>(
&'vm self,
store: Box<dyn TypeLayoutStore + 'store>,
) -> Box<dyn LayoutResolver + 'r>;
}