Trait reth_provider::StateProofProvider
pub trait StateProofProvider: Send + Sync {
// Required methods
fn proof(
&self,
input: TrieInput,
address: Address,
slots: &[FixedBytes<32>],
) -> Result<AccountProof, ProviderError>;
fn multiproof(
&self,
input: TrieInput,
targets: HashMap<FixedBytes<32>, HashSet<FixedBytes<32>>>,
) -> Result<MultiProof, ProviderError>;
fn witness(
&self,
input: TrieInput,
target: HashedPostState,
) -> Result<HashMap<FixedBytes<32>, Bytes>, ProviderError>;
}
Expand description
A type that can generate state proof on top of a given post state.
Required Methods§
fn proof(
&self,
input: TrieInput,
address: Address,
slots: &[FixedBytes<32>],
) -> Result<AccountProof, ProviderError>
fn proof( &self, input: TrieInput, address: Address, slots: &[FixedBytes<32>], ) -> Result<AccountProof, ProviderError>
Get account and storage proofs of target keys in the HashedPostState
on top of the current state.
fn multiproof(
&self,
input: TrieInput,
targets: HashMap<FixedBytes<32>, HashSet<FixedBytes<32>>>,
) -> Result<MultiProof, ProviderError>
fn multiproof( &self, input: TrieInput, targets: HashMap<FixedBytes<32>, HashSet<FixedBytes<32>>>, ) -> Result<MultiProof, ProviderError>
Generate [MultiProof
] for target hashed account and corresponding
hashed storage slot keys.
fn witness(
&self,
input: TrieInput,
target: HashedPostState,
) -> Result<HashMap<FixedBytes<32>, Bytes>, ProviderError>
fn witness( &self, input: TrieInput, target: HashedPostState, ) -> Result<HashMap<FixedBytes<32>, Bytes>, ProviderError>
Get trie witness for provided state.
Implementations on Foreign Types§
§impl StateProofProvider for MemoryOverlayStateProvider
impl StateProofProvider for MemoryOverlayStateProvider
fn proof( &self, input: TrieInput, address: Address, slots: &[FixedBytes<32>], ) -> Result<AccountProof, ProviderError>
fn multiproof( &self, input: TrieInput, targets: HashMap<FixedBytes<32>, HashSet<FixedBytes<32>>>, ) -> Result<MultiProof, ProviderError>
fn witness( &self, input: TrieInput, target: HashedPostState, ) -> Result<HashMap<FixedBytes<32>, Bytes>, ProviderError>
§impl<'a, T> StateProofProvider for &'a T
impl<'a, T> StateProofProvider for &'a T
fn proof( &self, input: TrieInput, address: Address, slots: &[FixedBytes<32>], ) -> Result<AccountProof, ProviderError>
fn multiproof( &self, input: TrieInput, targets: HashMap<FixedBytes<32>, HashSet<FixedBytes<32>>>, ) -> Result<MultiProof, ProviderError>
fn witness( &self, input: TrieInput, target: HashedPostState, ) -> Result<HashMap<FixedBytes<32>, Bytes>, ProviderError>
§impl<T> StateProofProvider for Box<T>
impl<T> StateProofProvider for Box<T>
fn proof( &self, input: TrieInput, address: Address, slots: &[FixedBytes<32>], ) -> Result<AccountProof, ProviderError>
fn multiproof( &self, input: TrieInput, targets: HashMap<FixedBytes<32>, HashSet<FixedBytes<32>>>, ) -> Result<MultiProof, ProviderError>
fn witness( &self, input: TrieInput, target: HashedPostState, ) -> Result<HashMap<FixedBytes<32>, Bytes>, ProviderError>
§impl<T> StateProofProvider for Arc<T>
impl<T> StateProofProvider for Arc<T>
fn proof( &self, input: TrieInput, address: Address, slots: &[FixedBytes<32>], ) -> Result<AccountProof, ProviderError>
fn multiproof( &self, input: TrieInput, targets: HashMap<FixedBytes<32>, HashSet<FixedBytes<32>>>, ) -> Result<MultiProof, ProviderError>
fn witness( &self, input: TrieInput, target: HashedPostState, ) -> Result<HashMap<FixedBytes<32>, Bytes>, ProviderError>
Implementors§
impl StateProofProvider for MockEthProvider
Available on crate feature
test-utils
only.impl StateProofProvider for NoopProvider
Available on crate feature
test-utils
only.