pub struct Proving<H> { /* private fields */ }
Expand description
Proving state backend.
This keeps track of all state values loaded during usage of this backend.
The proof-of-execution can be extracted with extract_proof
.
This doesn’t cache anything or rely on the canonical state caches.
Implementations
sourceimpl<H: AsHashDB<KeccakHasher, DBValue>> Proving<H>
impl<H: AsHashDB<KeccakHasher, DBValue>> Proving<H>
Trait Implementations
sourceimpl<AH: AsHashDB<KeccakHasher, DBValue> + Send + Sync> AsHashDB<KeccakHasher, ElasticArray128<u8>> for Proving<AH>
impl<AH: AsHashDB<KeccakHasher, DBValue> + Send + Sync> AsHashDB<KeccakHasher, ElasticArray128<u8>> for Proving<AH>
sourcefn as_hash_db(&self) -> &dyn HashDB<KeccakHasher, DBValue>
fn as_hash_db(&self) -> &dyn HashDB<KeccakHasher, DBValue>
Perform upcast to HashDB for anything that derives from HashDB.
sourcefn as_hash_db_mut(&mut self) -> &mut dyn HashDB<KeccakHasher, DBValue>
fn as_hash_db_mut(&mut self) -> &mut dyn HashDB<KeccakHasher, DBValue>
Perform mutable upcast to HashDB for anything that derives from HashDB.
sourceimpl<AH: AsKeyedHashDB + Send + Sync> AsKeyedHashDB for Proving<AH>
impl<AH: AsKeyedHashDB + Send + Sync> AsKeyedHashDB for Proving<AH>
sourcefn as_keyed_hash_db(&self) -> &dyn KeyedHashDB
fn as_keyed_hash_db(&self) -> &dyn KeyedHashDB
Perform upcast to KeyedHashDB.
sourceimpl<H: AsHashDB<KeccakHasher, DBValue> + Send + Sync> Backend for Proving<H>
impl<H: AsHashDB<KeccakHasher, DBValue> + Send + Sync> Backend for Proving<H>
sourcefn as_hash_db(&self) -> &dyn HashDB<KeccakHasher, DBValue>
fn as_hash_db(&self) -> &dyn HashDB<KeccakHasher, DBValue>
Treat the backend as a read-only hashdb.
sourcefn as_hash_db_mut(&mut self) -> &mut dyn HashDB<KeccakHasher, DBValue>
fn as_hash_db_mut(&mut self) -> &mut dyn HashDB<KeccakHasher, DBValue>
Treat the backend as a writeable hashdb.
sourcefn add_to_account_cache(&mut self, _: Address, _: Option<Account>, _: bool)
fn add_to_account_cache(&mut self, _: Address, _: Option<Account>, _: bool)
t_nb 9.4 Add an account entry to the cache.
sourcefn cache_code(&self, _: H256, _: Arc<Vec<u8>>)
fn cache_code(&self, _: H256, _: Arc<Vec<u8>>)
Add a global code cache entry. This doesn’t need to worry about canonicality because it simply maps hashes to raw code and will always be correct in the absence of hash collisions. Read more
sourcefn get_cached_account(&self, _: &Address) -> Option<Option<Account>>
fn get_cached_account(&self, _: &Address) -> Option<Option<Account>>
Get basic copy of the cached account. Not required to include storage. Returns ‘None’ if cache is disabled or if the account is not cached. Read more
sourceimpl<H: AsHashDB<KeccakHasher, DBValue> + Send + Sync> HashDB<KeccakHasher, ElasticArray128<u8>> for Proving<H>
impl<H: AsHashDB<KeccakHasher, DBValue> + Send + Sync> HashDB<KeccakHasher, ElasticArray128<u8>> for Proving<H>
sourcefn get(&self, key: &H256) -> Option<DBValue>
fn get(&self, key: &H256) -> Option<DBValue>
Look up a given hash into the bytes that hash to it, returning None if the hash is not known. Read more
sourcefn insert(&mut self, value: &[u8]) -> H256
fn insert(&mut self, value: &[u8]) -> H256
Insert a datum item into the DB and return the datum’s hash for a later lookup. Insertions
are counted and the equivalent number of remove()
s must be performed before the data
is considered dead. Read more
Auto Trait Implementations
impl<H> !RefUnwindSafe for Proving<H>
impl<H> Send for Proving<H> where
H: Send,
impl<H> Sync for Proving<H> where
H: Sync,
impl<H> Unpin for Proving<H> where
H: Unpin,
impl<H> UnwindSafe for Proving<H> where
H: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more