pub type DynVmDatabase = Box<dyn VmDatabase + Send + Sync + 'static>;Aliased Type§
pub struct DynVmDatabase(/* private fields */);Trait Implementations§
Source§impl Database for DynVmDatabase
impl Database for DynVmDatabase
fn get_account_state( &self, address: CoreAddress, ) -> Result<AccountState, DatabaseError>
Source§fn get_account_states_batch(
&self,
addresses: &[CoreAddress],
) -> Result<Vec<AccountState>, DatabaseError>
fn get_account_states_batch( &self, addresses: &[CoreAddress], ) -> Result<Vec<AccountState>, DatabaseError>
Batch lookup. Default: loop. Backends with a batched read path (e.g. rocksdb
multi_get_cf on the flat key-value table) should override this and the
caching layer above will dispatch to it.Source§fn code_cache_budget_bytes(&self) -> u64
fn code_cache_budget_bytes(&self) -> u64
Byte budget for warming bytecode ahead of execution, as measured by
Code::size. Read morefn get_storage_value( &self, address: CoreAddress, key: CoreH256, ) -> Result<U256, DatabaseError>
Source§fn get_storage_values_batch(
&self,
keys: &[(CoreAddress, CoreH256)],
) -> Result<Vec<CoreU256>, DatabaseError>
fn get_storage_values_batch( &self, keys: &[(CoreAddress, CoreH256)], ) -> Result<Vec<CoreU256>, DatabaseError>
Batch storage-slot lookup. Default: loop. Backends with a batched read
path (e.g. rocksdb
multi_get_cf on the storage flat key-value table)
should override this and the caching layer above will dispatch to it.fn get_block_hash(&self, block_number: u64) -> Result<CoreH256, DatabaseError>
fn get_chain_config(&self) -> Result<ChainConfig, DatabaseError>
fn get_account_code(&self, code_hash: CoreH256) -> Result<Code, DatabaseError>
Source§fn get_account_codes_batch(
&self,
code_hashes: &[CoreH256],
) -> Result<Vec<Option<Code>>, DatabaseError>
fn get_account_codes_batch( &self, code_hashes: &[CoreH256], ) -> Result<Vec<Option<Code>>, DatabaseError>
Batch bytecode lookup, aligned to
code_hashes. None means the hash is absent
from the database. Default: loop. Backends with a batched read path (e.g. rocksdb
multi_get_cf on the account-codes table) should override this; the caching layer
above dispatches to it from Self::prefetch_codes.fn get_code_metadata( &self, code_hash: CoreH256, ) -> Result<CodeMetadata, DatabaseError>
Source§fn precompile_cache(&self) -> Option<&PrecompileCache>
fn precompile_cache(&self) -> Option<&PrecompileCache>
Access the precompile cache, if available at this database layer.
Source§fn prefetch_codes(&self, code_hashes: &[H256]) -> Result<u64, DatabaseError>
fn prefetch_codes(&self, code_hashes: &[H256]) -> Result<u64, DatabaseError>
Prefetch a batch of bytecodes into the cache. Default: sequential fallback. Read more
Source§fn prefetch_accounts(&self, addresses: &[H160]) -> Result<(), DatabaseError>
fn prefetch_accounts(&self, addresses: &[H160]) -> Result<(), DatabaseError>
Prefetch a batch of accounts into the cache. Default: sequential fallback.
Source§fn prefetch_storage(&self, keys: &[(H160, H256)]) -> Result<(), DatabaseError>
fn prefetch_storage(&self, keys: &[(H160, H256)]) -> Result<(), DatabaseError>
Prefetch a batch of storage slots into the cache. Default: sequential fallback.