Trait reth_trie_db::DatabaseProof

source ·
pub trait DatabaseProof<'a, TX> {
    // Required methods
    fn from_tx(tx: &'a TX) -> Self;
    fn overlay_account_proof(
        tx: &'a TX,
        input: TrieInput,
        address: Address,
        slots: &[B256],
    ) -> Result<AccountProof, StateProofError>;
    fn overlay_multiproof(
        tx: &'a TX,
        input: TrieInput,
        targets: HashMap<B256, HashSet<B256>>,
    ) -> Result<MultiProof, StateProofError>;
}
Expand description

Extends [Proof] with operations specific for working with a database transaction.

Required Methods§

source

fn from_tx(tx: &'a TX) -> Self

Create a new [Proof] from database transaction.

source

fn overlay_account_proof( tx: &'a TX, input: TrieInput, address: Address, slots: &[B256], ) -> Result<AccountProof, StateProofError>

Generates the state proof for target account based on [TrieInput].

source

fn overlay_multiproof( tx: &'a TX, input: TrieInput, targets: HashMap<B256, HashSet<B256>>, ) -> Result<MultiProof, StateProofError>

Generates the state [MultiProof] for target hashed account and storage keys.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<'a, TX: DbTx> DatabaseProof<'a, TX> for Proof<DatabaseTrieCursorFactory<'a, TX>, DatabaseHashedCursorFactory<'a, TX>>

source§

fn from_tx(tx: &'a TX) -> Self

Create a new [Proof] instance from database transaction.

source§

fn overlay_account_proof( tx: &'a TX, input: TrieInput, address: Address, slots: &[B256], ) -> Result<AccountProof, StateProofError>

source§

fn overlay_multiproof( tx: &'a TX, input: TrieInput, targets: HashMap<B256, HashSet<B256>>, ) -> Result<MultiProof, StateProofError>

Implementors§