Struct MultiProof
pub struct MultiProof {
pub account_subtree: ProofNodes,
pub branch_node_masks: HashMap<Nibbles, BranchNodeMasks, DefaultHashBuilder>,
pub storages: HashMap<FixedBytes<32>, StorageMultiProof, FbBuildHasher<32>>,
}Expand description
The state multiproof of target accounts and multiproofs of their storage tries. Multiproof is effectively a state subtrie that only contains the nodes in the paths of target accounts.
Fields§
§account_subtree: ProofNodesState trie multiproof for requested accounts.
branch_node_masks: HashMap<Nibbles, BranchNodeMasks, DefaultHashBuilder>Consolidated branch node masks (hash_mask, tree_mask) for each path in the account
proof.
storages: HashMap<FixedBytes<32>, StorageMultiProof, FbBuildHasher<32>>Storage trie multiproofs.
Implementations§
§impl MultiProof
impl MultiProof
pub fn account_proof_nodes(&self, path: &Nibbles) -> Vec<(Nibbles, Bytes)>
pub fn account_proof_nodes(&self, path: &Nibbles) -> Vec<(Nibbles, Bytes)>
Return the account proof nodes for the given account path.
pub fn storage_proof_nodes(
&self,
hashed_address: FixedBytes<32>,
slots: impl IntoIterator<Item = FixedBytes<32>>,
) -> Vec<(FixedBytes<32>, Vec<(Nibbles, Bytes)>)>
pub fn storage_proof_nodes( &self, hashed_address: FixedBytes<32>, slots: impl IntoIterator<Item = FixedBytes<32>>, ) -> Vec<(FixedBytes<32>, Vec<(Nibbles, Bytes)>)>
Return the storage proof nodes for the given storage slots of the account path.
pub fn account_proof(
&self,
address: Address,
slots: &[FixedBytes<32>],
) -> Result<AccountProof, Error>
pub fn account_proof( &self, address: Address, slots: &[FixedBytes<32>], ) -> Result<AccountProof, Error>
Construct the account proof from the multiproof.
pub fn extend(&mut self, other: MultiProof)
pub fn extend(&mut self, other: MultiProof)
Extends this multiproof with another one, merging both account and storage proofs.
pub fn from_storage_proof(
hashed_address: FixedBytes<32>,
storage_proof: StorageMultiProof,
) -> MultiProof
pub fn from_storage_proof( hashed_address: FixedBytes<32>, storage_proof: StorageMultiProof, ) -> MultiProof
Create a MultiProof from a StorageMultiProof.
Trait Implementations§
§impl Clone for MultiProof
impl Clone for MultiProof
§fn clone(&self) -> MultiProof
fn clone(&self) -> MultiProof
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for MultiProof
impl Debug for MultiProof
§impl Default for MultiProof
impl Default for MultiProof
§fn default() -> MultiProof
fn default() -> MultiProof
impl Eq for MultiProof
§impl PartialEq for MultiProof
impl PartialEq for MultiProof
impl StructuralPartialEq for MultiProof
§impl TryFrom<MultiProof> for DecodedMultiProof
impl TryFrom<MultiProof> for DecodedMultiProof
§fn try_from(
multi_proof: MultiProof,
) -> Result<DecodedMultiProof, <DecodedMultiProof as TryFrom<MultiProof>>::Error>
fn try_from( multi_proof: MultiProof, ) -> Result<DecodedMultiProof, <DecodedMultiProof as TryFrom<MultiProof>>::Error>
Auto Trait Implementations§
impl Freeze for MultiProof
impl RefUnwindSafe for MultiProof
impl Send for MultiProof
impl Sync for MultiProof
impl Unpin for MultiProof
impl UnsafeUnpin for MultiProof
impl UnwindSafe for MultiProof
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§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: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 120 bytes