Trait casper_execution_engine::storage::global_state::StateProvider [−][src]
Associated Types
type Error
[src]
type Reader: StateReader<Key, StoredValue, Error = Self::Error>
[src]
Required methods
fn checkout(
&self,
state_hash: Blake2bHash
) -> Result<Option<Self::Reader>, Self::Error>
[src]
&self,
state_hash: Blake2bHash
) -> Result<Option<Self::Reader>, Self::Error>
Checkouts to the post state of a specific block.
fn commit(
&self,
correlation_id: CorrelationId,
state_hash: Blake2bHash,
effects: AdditiveMap<Key, Transform>
) -> Result<CommitResult, Self::Error>
[src]
&self,
correlation_id: CorrelationId,
state_hash: Blake2bHash,
effects: AdditiveMap<Key, Transform>
) -> Result<CommitResult, Self::Error>
Applies changes and returns a new post state hash. block_hash is used for computing a deterministic and unique keys.
fn put_protocol_data(
&self,
protocol_version: ProtocolVersion,
protocol_data: &ProtocolData
) -> Result<(), Self::Error>
[src]
&self,
protocol_version: ProtocolVersion,
protocol_data: &ProtocolData
) -> Result<(), Self::Error>
fn get_protocol_data(
&self,
protocol_version: ProtocolVersion
) -> Result<Option<ProtocolData>, Self::Error>
[src]
&self,
protocol_version: ProtocolVersion
) -> Result<Option<ProtocolData>, Self::Error>
fn empty_root(&self) -> Blake2bHash
[src]
fn read_trie(
&self,
correlation_id: CorrelationId,
trie_key: &Blake2bHash
) -> Result<Option<Trie<Key, StoredValue>>, Self::Error>
[src]
&self,
correlation_id: CorrelationId,
trie_key: &Blake2bHash
) -> Result<Option<Trie<Key, StoredValue>>, Self::Error>
Reads a Trie
from the state if it is present
fn put_trie(
&self,
correlation_id: CorrelationId,
trie: &Trie<Key, StoredValue>
) -> Result<Blake2bHash, Self::Error>
[src]
&self,
correlation_id: CorrelationId,
trie: &Trie<Key, StoredValue>
) -> Result<Blake2bHash, Self::Error>
Insert a trie node into the trie
fn missing_trie_keys(
&self,
correlation_id: CorrelationId,
trie_keys: Vec<Blake2bHash>
) -> Result<Vec<Blake2bHash>, Self::Error>
[src]
&self,
correlation_id: CorrelationId,
trie_keys: Vec<Blake2bHash>
) -> Result<Vec<Blake2bHash>, Self::Error>
Finds all of the missing or corrupt keys of which are descendants of trie_key
Implementors
impl StateProvider for InMemoryGlobalState
[src]
type Error = Error
type Reader = InMemoryGlobalStateView
fn checkout(
&self,
prestate_hash: Blake2bHash
) -> Result<Option<Self::Reader>, Self::Error>
[src]
&self,
prestate_hash: Blake2bHash
) -> Result<Option<Self::Reader>, Self::Error>
fn commit(
&self,
correlation_id: CorrelationId,
prestate_hash: Blake2bHash,
effects: AdditiveMap<Key, Transform>
) -> Result<CommitResult, Self::Error>
[src]
&self,
correlation_id: CorrelationId,
prestate_hash: Blake2bHash,
effects: AdditiveMap<Key, Transform>
) -> Result<CommitResult, Self::Error>
fn put_protocol_data(
&self,
protocol_version: ProtocolVersion,
protocol_data: &ProtocolData
) -> Result<(), Self::Error>
[src]
&self,
protocol_version: ProtocolVersion,
protocol_data: &ProtocolData
) -> Result<(), Self::Error>
fn get_protocol_data(
&self,
protocol_version: ProtocolVersion
) -> Result<Option<ProtocolData>, Self::Error>
[src]
&self,
protocol_version: ProtocolVersion
) -> Result<Option<ProtocolData>, Self::Error>
fn empty_root(&self) -> Blake2bHash
[src]
fn read_trie(
&self,
_correlation_id: CorrelationId,
trie_key: &Blake2bHash
) -> Result<Option<Trie<Key, StoredValue>>, Self::Error>
[src]
&self,
_correlation_id: CorrelationId,
trie_key: &Blake2bHash
) -> Result<Option<Trie<Key, StoredValue>>, Self::Error>
fn put_trie(
&self,
correlation_id: CorrelationId,
trie: &Trie<Key, StoredValue>
) -> Result<Blake2bHash, Self::Error>
[src]
&self,
correlation_id: CorrelationId,
trie: &Trie<Key, StoredValue>
) -> Result<Blake2bHash, Self::Error>
fn missing_trie_keys(
&self,
correlation_id: CorrelationId,
trie_keys: Vec<Blake2bHash>
) -> Result<Vec<Blake2bHash>, Self::Error>
[src]
&self,
correlation_id: CorrelationId,
trie_keys: Vec<Blake2bHash>
) -> Result<Vec<Blake2bHash>, Self::Error>
Finds all of the keys of missing descendant Trie<Key,StoredValue>
values
impl StateProvider for LmdbGlobalState
[src]
type Error = Error
type Reader = LmdbGlobalStateView
fn checkout(
&self,
state_hash: Blake2bHash
) -> Result<Option<Self::Reader>, Self::Error>
[src]
&self,
state_hash: Blake2bHash
) -> Result<Option<Self::Reader>, Self::Error>
fn commit(
&self,
correlation_id: CorrelationId,
prestate_hash: Blake2bHash,
effects: AdditiveMap<Key, Transform>
) -> Result<CommitResult, Self::Error>
[src]
&self,
correlation_id: CorrelationId,
prestate_hash: Blake2bHash,
effects: AdditiveMap<Key, Transform>
) -> Result<CommitResult, Self::Error>
fn put_protocol_data(
&self,
protocol_version: ProtocolVersion,
protocol_data: &ProtocolData
) -> Result<(), Self::Error>
[src]
&self,
protocol_version: ProtocolVersion,
protocol_data: &ProtocolData
) -> Result<(), Self::Error>
fn get_protocol_data(
&self,
protocol_version: ProtocolVersion
) -> Result<Option<ProtocolData>, Self::Error>
[src]
&self,
protocol_version: ProtocolVersion
) -> Result<Option<ProtocolData>, Self::Error>
fn empty_root(&self) -> Blake2bHash
[src]
fn read_trie(
&self,
_correlation_id: CorrelationId,
trie_key: &Blake2bHash
) -> Result<Option<Trie<Key, StoredValue>>, Self::Error>
[src]
&self,
_correlation_id: CorrelationId,
trie_key: &Blake2bHash
) -> Result<Option<Trie<Key, StoredValue>>, Self::Error>
fn put_trie(
&self,
correlation_id: CorrelationId,
trie: &Trie<Key, StoredValue>
) -> Result<Blake2bHash, Self::Error>
[src]
&self,
correlation_id: CorrelationId,
trie: &Trie<Key, StoredValue>
) -> Result<Blake2bHash, Self::Error>
fn missing_trie_keys(
&self,
correlation_id: CorrelationId,
trie_keys: Vec<Blake2bHash>
) -> Result<Vec<Blake2bHash>, Self::Error>
[src]
&self,
correlation_id: CorrelationId,
trie_keys: Vec<Blake2bHash>
) -> Result<Vec<Blake2bHash>, Self::Error>
Finds all of the keys of missing descendant Trie<K,V>
values