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>

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>

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>

Get trie witness for provided state.

Implementations on Foreign Types§

§

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
where T: 'a + StateProofProvider + ?Sized, &'a T: Send + Sync,

§

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>
where T: StateProofProvider + ?Sized, Box<T>: Send + Sync,

§

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>
where T: StateProofProvider + ?Sized, Arc<T>: Send + Sync,

§

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§

source§

impl StateProofProvider for MockEthProvider

Available on crate feature test-utils only.
source§

impl StateProofProvider for NoopProvider

Available on crate feature test-utils only.
source§

impl<'a, TX: DbTx> StateProofProvider for HistoricalStateProvider<TX>

source§

impl<'a, TX: DbTx> StateProofProvider for LatestStateProvider<TX>

source§

impl<'b, TX: DbTx> StateProofProvider for HistoricalStateProviderRef<'b, TX>

source§

impl<'b, TX: DbTx> StateProofProvider for LatestStateProviderRef<'b, TX>

source§

impl<SP: StateProvider, EDP: ExecutionDataProvider> StateProofProvider for BundleStateProvider<SP, EDP>