pub trait ExecutorProxyTrait: Send {
// Required methods
fn get_local_storage_state(&self) -> Result<SyncState, Error>;
fn execute_chunk(
&mut self,
txn_list_with_proof: TransactionListWithProof,
verified_target_li: LedgerInfoWithSignatures,
intermediate_end_of_epoch_li: Option<LedgerInfoWithSignatures>
) -> Result<(), Error>;
fn get_chunk(
&self,
known_version: u64,
limit: u64,
target_version: u64
) -> Result<TransactionListWithProof, Error>;
fn get_epoch_change_ledger_info(
&self,
epoch: u64
) -> Result<LedgerInfoWithSignatures, Error>;
fn get_epoch_ending_ledger_info(
&self,
version: u64
) -> Result<LedgerInfoWithSignatures, Error>;
fn get_version_timestamp(&self, version: u64) -> Result<u64, Error>;
fn publish_on_chain_config_updates(
&mut self,
events: Vec<ContractEvent>
) -> Result<(), Error>;
}
Expand description
Proxies interactions with execution and storage for state synchronization
Required Methods§
sourcefn get_local_storage_state(&self) -> Result<SyncState, Error>
fn get_local_storage_state(&self) -> Result<SyncState, Error>
Sync the local state with the latest in storage.
sourcefn execute_chunk(
&mut self,
txn_list_with_proof: TransactionListWithProof,
verified_target_li: LedgerInfoWithSignatures,
intermediate_end_of_epoch_li: Option<LedgerInfoWithSignatures>
) -> Result<(), Error>
fn execute_chunk( &mut self, txn_list_with_proof: TransactionListWithProof, verified_target_li: LedgerInfoWithSignatures, intermediate_end_of_epoch_li: Option<LedgerInfoWithSignatures> ) -> Result<(), Error>
Execute and commit a batch of transactions
sourcefn get_chunk(
&self,
known_version: u64,
limit: u64,
target_version: u64
) -> Result<TransactionListWithProof, Error>
fn get_chunk( &self, known_version: u64, limit: u64, target_version: u64 ) -> Result<TransactionListWithProof, Error>
Gets chunk of transactions given the known version, target version and the max limit.
sourcefn get_epoch_change_ledger_info(
&self,
epoch: u64
) -> Result<LedgerInfoWithSignatures, Error>
fn get_epoch_change_ledger_info( &self, epoch: u64 ) -> Result<LedgerInfoWithSignatures, Error>
Get the epoch changing ledger info for the given epoch so that we can move to next epoch.
sourcefn get_epoch_ending_ledger_info(
&self,
version: u64
) -> Result<LedgerInfoWithSignatures, Error>
fn get_epoch_ending_ledger_info( &self, version: u64 ) -> Result<LedgerInfoWithSignatures, Error>
Get ledger info at an epoch boundary version.
sourcefn get_version_timestamp(&self, version: u64) -> Result<u64, Error>
fn get_version_timestamp(&self, version: u64) -> Result<u64, Error>
Returns the ledger’s timestamp for the given version in microseconds
sourcefn publish_on_chain_config_updates(
&mut self,
events: Vec<ContractEvent>
) -> Result<(), Error>
fn publish_on_chain_config_updates( &mut self, events: Vec<ContractEvent> ) -> Result<(), Error>
publishes on-chain config updates to subscribed components