pub struct TrieWitness<T, H> { /* private fields */ }Expand description
State transition witness for the trie.
Implementations§
Source§impl<T, H> TrieWitness<T, H>
impl<T, H> TrieWitness<T, H>
Sourcepub fn new(trie_cursor_factory: T, hashed_cursor_factory: H) -> Self
pub fn new(trie_cursor_factory: T, hashed_cursor_factory: H) -> Self
Creates a new witness generator.
Sourcepub fn with_prefix_sets_mut(self, prefix_sets: TriePrefixSetsMut) -> Self
pub fn with_prefix_sets_mut(self, prefix_sets: TriePrefixSetsMut) -> Self
Set the prefix sets. They have to be mutable in order to allow extension with proof target.
Sourcepub const fn always_include_root_node(self) -> Self
pub const fn always_include_root_node(self) -> Self
Set always_include_root_node to true. Root node will be included even in empty state.
This setting is useful if the caller wants to verify the witness against the
parent state root.
Sourcepub const fn with_execution_witness_mode(
self,
mode: ExecutionWitnessMode,
) -> Self
pub const fn with_execution_witness_mode( self, mode: ExecutionWitnessMode, ) -> Self
Set the execution witness generation mode.
Source§impl<T, H> TrieWitness<T, H>
impl<T, H> TrieWitness<T, H>
Sourcepub fn compute(
self,
state: HashedPostState,
) -> Result<B256Map<Bytes>, TrieWitnessError>
pub fn compute( self, state: HashedPostState, ) -> Result<B256Map<Bytes>, TrieWitnessError>
Compute the state transition witness for the trie. Gather all required nodes
to apply state on top of the current trie state.
§Arguments
state - state transition containing both modified and touched accounts and storage slots.
Trait Implementations§
Auto Trait Implementations§
impl<T, H> Freeze for TrieWitness<T, H>
impl<T, H> RefUnwindSafe for TrieWitness<T, H>where
T: RefUnwindSafe,
H: RefUnwindSafe,
impl<T, H> Send for TrieWitness<T, H>
impl<T, H> Sync for TrieWitness<T, H>
impl<T, H> Unpin for TrieWitness<T, H>
impl<T, H> UnsafeUnpin for TrieWitness<T, H>where
T: UnsafeUnpin,
H: UnsafeUnpin,
impl<T, H> UnwindSafe for TrieWitness<T, H>where
T: UnwindSafe,
H: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreimpl<T> MaybeDebug for Twhere
T: Debug,
§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
Source§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
Source§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
Source§fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
Layout§
Note: Unable to compute type layout, possibly due to this type having generic parameters. Layout can only be computed for concrete, fully-instantiated types.