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§

source

fn get_local_storage_state(&self) -> Result<SyncState, Error>

Sync the local state with the latest in storage.

source

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

source

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.

source

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.

source

fn get_epoch_ending_ledger_info( &self, version: u64 ) -> Result<LedgerInfoWithSignatures, Error>

Get ledger info at an epoch boundary version.

source

fn get_version_timestamp(&self, version: u64) -> Result<u64, Error>

Returns the ledger’s timestamp for the given version in microseconds

source

fn publish_on_chain_config_updates( &mut self, events: Vec<ContractEvent> ) -> Result<(), Error>

publishes on-chain config updates to subscribed components

Implementors§