pub trait StorageReaderInterface: Clone + Send + 'static {
    fn get_data_summary(&self) -> Result<DataSummary, Error>;
    fn get_transactions_with_proof(
        &self,
        proof_version: u64,
        start_version: u64,
        end_version: u64,
        include_events: bool
    ) -> Result<TransactionListWithProof, Error>; fn get_epoch_ending_ledger_infos(
        &self,
        start_epoch: u64,
        expected_end_epoch: u64
    ) -> Result<EpochChangeProof, Error>; fn get_transaction_outputs_with_proof(
        &self,
        proof_version: u64,
        start_version: u64,
        end_version: u64
    ) -> Result<TransactionOutputListWithProof, Error>; fn get_number_of_accounts(&self, version: u64) -> Result<u64, Error>; fn get_account_states_chunk_with_proof(
        &self,
        version: u64,
        start_account_index: u64,
        end_account_index: u64
    ) -> Result<StateValueChunkWithProof, Error>; }
Expand description

The interface into local storage (e.g., the Aptos DB) used by the storage server to handle client requests.

Required Methods

Returns a data summary of the underlying storage state.

Returns a list of transactions with a proof relative to the proof_version. The transaction list is expected to start at start_version and end at end_version (inclusive). If include_events is true, events are also returned.

Returns a list of epoch ending ledger infos, starting at start_epoch and ending at the expected_end_epoch (inclusive). For example, if start_epoch is 0 and end_epoch is 1, this will return 2 epoch ending ledger infos (ending epoch 0 and 1, respectively).

Returns a list of transaction outputs with a proof relative to the proof_version. The transaction output list is expected to start at start_version and end at end_version (inclusive).

Returns the number of accounts in the account state tree at the specified version.

Returns a chunk holding a list of account states starting at the specified start_account_index and ending at end_account_index (inclusive).

Implementors