Struct sp_state_machine::ProvingBackend [−][src]
Patricia trie-based backend which also tracks all touched storage trie values. These can be sent to remote node and used as a proof of execution.
Implementations
impl<'a, S: 'a + TrieBackendStorage<H>, H: 'a + Hasher> ProvingBackend<'a, S, H> where
H::Out: Codec,
[src]
H::Out: Codec,
pub fn new(backend: &'a TrieBackend<S, H>) -> Self
[src]
Create new proving backend.
pub fn new_with_recorder(
backend: &'a TrieBackend<S, H>,
proof_recorder: ProofRecorder<H>
) -> Self
[src]
backend: &'a TrieBackend<S, H>,
proof_recorder: ProofRecorder<H>
) -> Self
Create new proving backend with the given recorder.
pub fn extract_proof(&self) -> StorageProof
[src]
Extracting the gathered unordered proof.
Trait Implementations
impl<'a, S, H> Backend<H> for ProvingBackend<'a, S, H> where
S: 'a + TrieBackendStorage<H>,
H: 'a + Hasher,
H::Out: Ord + Codec,
[src]
S: 'a + TrieBackendStorage<H>,
H: 'a + Hasher,
H::Out: Ord + Codec,
type Error = String
An error type when fetching data is not possible.
type Transaction = S::Overlay
Storage changes to be applied if committing
type TrieBackendStorage = S
Type of trie backend storage.
fn storage(&self, key: &[u8]) -> Result<Option<Vec<u8>>, Self::Error>
[src]
fn child_storage(
&self,
child_info: &ChildInfo,
key: &[u8]
) -> Result<Option<Vec<u8>>, Self::Error>
[src]
&self,
child_info: &ChildInfo,
key: &[u8]
) -> Result<Option<Vec<u8>>, Self::Error>
fn apply_to_child_keys_while<F: FnMut(&[u8]) -> bool>(
&self,
child_info: &ChildInfo,
f: F
)
[src]
&self,
child_info: &ChildInfo,
f: F
)
fn next_storage_key(&self, key: &[u8]) -> Result<Option<Vec<u8>>, Self::Error>
[src]
fn next_child_storage_key(
&self,
child_info: &ChildInfo,
key: &[u8]
) -> Result<Option<Vec<u8>>, Self::Error>
[src]
&self,
child_info: &ChildInfo,
key: &[u8]
) -> Result<Option<Vec<u8>>, Self::Error>
fn for_keys_with_prefix<F: FnMut(&[u8])>(&self, prefix: &[u8], f: F)
[src]
fn for_key_values_with_prefix<F: FnMut(&[u8], &[u8])>(
&self,
prefix: &[u8],
f: F
)
[src]
&self,
prefix: &[u8],
f: F
)
fn for_child_keys_with_prefix<F: FnMut(&[u8])>(
&self,
child_info: &ChildInfo,
prefix: &[u8],
f: F
)
[src]
&self,
child_info: &ChildInfo,
prefix: &[u8],
f: F
)
fn pairs(&self) -> Vec<(Vec<u8>, Vec<u8>)>
[src]
fn keys(&self, prefix: &[u8]) -> Vec<Vec<u8>>
[src]
fn child_keys(&self, child_info: &ChildInfo, prefix: &[u8]) -> Vec<Vec<u8>>
[src]
fn storage_root<'b>(
&self,
delta: impl Iterator<Item = (&'b [u8], Option<&'b [u8]>)>
) -> (H::Out, Self::Transaction) where
H::Out: Ord,
[src]
&self,
delta: impl Iterator<Item = (&'b [u8], Option<&'b [u8]>)>
) -> (H::Out, Self::Transaction) where
H::Out: Ord,
fn child_storage_root<'b>(
&self,
child_info: &ChildInfo,
delta: impl Iterator<Item = (&'b [u8], Option<&'b [u8]>)>
) -> (H::Out, bool, Self::Transaction) where
H::Out: Ord,
[src]
&self,
child_info: &ChildInfo,
delta: impl Iterator<Item = (&'b [u8], Option<&'b [u8]>)>
) -> (H::Out, bool, Self::Transaction) where
H::Out: Ord,
fn register_overlay_stats(&mut self, _stats: &StateMachineStats)
[src]
fn usage_info(&self) -> UsageInfo
[src]
fn storage_hash(&self, key: &[u8]) -> Result<Option<H::Out>, Self::Error>
[src]
fn child_storage_hash(
&self,
child_info: &ChildInfo,
key: &[u8]
) -> Result<Option<H::Out>, Self::Error>
[src]
&self,
child_info: &ChildInfo,
key: &[u8]
) -> Result<Option<H::Out>, Self::Error>
fn exists_storage(&self, key: &[u8]) -> Result<bool, Self::Error>
[src]
fn exists_child_storage(
&self,
child_info: &ChildInfo,
key: &[u8]
) -> Result<bool, Self::Error>
[src]
&self,
child_info: &ChildInfo,
key: &[u8]
) -> Result<bool, Self::Error>
fn as_trie_backend(
&mut self
) -> Option<&TrieBackend<Self::TrieBackendStorage, H>>
[src]
&mut self
) -> Option<&TrieBackend<Self::TrieBackendStorage, H>>
fn full_storage_root<'a>(
&self,
delta: impl Iterator<Item = (&'a [u8], Option<&'a [u8]>)>,
child_deltas: impl Iterator<Item = (&'a ChildInfo, impl Iterator<Item = (&'a [u8], Option<&'a [u8]>)>)>
) -> (H::Out, Self::Transaction) where
H::Out: Ord + Encode,
[src]
&self,
delta: impl Iterator<Item = (&'a [u8], Option<&'a [u8]>)>,
child_deltas: impl Iterator<Item = (&'a ChildInfo, impl Iterator<Item = (&'a [u8], Option<&'a [u8]>)>)>
) -> (H::Out, Self::Transaction) where
H::Out: Ord + Encode,
fn wipe(&self) -> Result<(), Self::Error>
[src]
fn commit(
&self,
_: H::Out,
_: Self::Transaction,
_: StorageCollection,
_: ChildStorageCollection
) -> Result<(), Self::Error>
[src]
&self,
_: H::Out,
_: Self::Transaction,
_: StorageCollection,
_: ChildStorageCollection
) -> Result<(), Self::Error>
fn read_write_count(&self) -> (u32, u32, u32, u32)
[src]
fn reset_read_write_count(&self)
[src]
fn get_whitelist(&self) -> Vec<TrackedStorageKey>
[src]
fn set_whitelist(&self, _: Vec<TrackedStorageKey>)
[src]
impl<'a, S: 'a + TrieBackendStorage<H>, H: 'a + Hasher> Debug for ProvingBackend<'a, S, H>
[src]
Auto Trait Implementations
impl<'a, S, H> !RefUnwindSafe for ProvingBackend<'a, S, H>
[src]
impl<'a, S, H> Send for ProvingBackend<'a, S, H>
[src]
impl<'a, S, H> Sync for ProvingBackend<'a, S, H>
[src]
impl<'a, S, H> Unpin for ProvingBackend<'a, S, H> where
<H as Hasher>::Out: Unpin,
[src]
<H as Hasher>::Out: Unpin,
impl<'a, S, H> !UnwindSafe for ProvingBackend<'a, S, H>
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, Outer> IsWrappedBy<Outer> for T where
T: From<Outer>,
Outer: AsRef<T> + AsMut<T> + From<T>,
[src]
T: From<Outer>,
Outer: AsRef<T> + AsMut<T> + From<T>,
pub fn from_ref(outer: &Outer) -> &T
[src]
Get a reference to the inner from the outer.
pub fn from_mut(outer: &mut Outer) -> &mut T
[src]
Get a mutable reference to the inner from the outer.
impl<T> MaybeDebug for T where
T: Debug,
[src]
T: Debug,
impl<T> MaybeDebug for T where
T: Debug,
T: Debug,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<S, T> UncheckedInto<T> for S where
T: UncheckedFrom<S>,
[src]
T: UncheckedFrom<S>,
pub fn unchecked_into(self) -> T
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,