feat(trie): expose multiproof via StateProofProvider (#10915)

This commit is contained in:
Roman Krasiuk
2024-09-16 11:52:15 +02:00
committed by GitHub
parent fdd64972b9
commit 06dbd3a610
15 changed files with 173 additions and 31 deletions

View File

@ -1,3 +1,5 @@
use std::collections::HashSet;
use crate::precompile::HashMap;
use alloc::vec::Vec;
use reth_primitives::{
@ -8,7 +10,9 @@ use reth_storage_api::{
StorageRootProvider,
};
use reth_storage_errors::provider::ProviderResult;
use reth_trie::{updates::TrieUpdates, AccountProof, HashedPostState, HashedStorage, TrieInput};
use reth_trie::{
updates::TrieUpdates, AccountProof, HashedPostState, HashedStorage, MultiProof, TrieInput,
};
/// Mock state for testing
#[derive(Debug, Default, Clone, Eq, PartialEq)]
@ -110,6 +114,14 @@ impl StateProofProvider for StateProviderTest {
unimplemented!("proof generation is not supported")
}
fn multiproof(
&self,
_input: TrieInput,
_targets: HashMap<B256, HashSet<B256>>,
) -> ProviderResult<MultiProof> {
unimplemented!("proof generation is not supported")
}
fn witness(
&self,
_input: TrieInput,