chore(trie): remove plain state proof variant (#10593)

This commit is contained in:
Roman Krasiuk
2024-08-28 05:00:46 -07:00
committed by GitHub
parent 0013399234
commit cf7416e2f2
12 changed files with 15 additions and 29 deletions

View File

@ -14,7 +14,6 @@ use reth_rpc_eth_types::{EthApiError, EthStateCache, PendingBlockEnv, RpcInvalid
use reth_rpc_types::{serde_helpers::JsonStorageKey, Account, EIP1186AccountProofResponse};
use reth_rpc_types_compat::proof::from_primitive_account_proof;
use reth_transaction_pool::{PoolTransaction, TransactionPool};
use revm::db::BundleState;
use revm_primitives::{BlockEnv, CfgEnvWithHandlerCfg, SpecId};
use crate::{EthApiTypes, FromEthApiError};
@ -122,7 +121,7 @@ pub trait EthState: LoadState + SpawnBlocking {
let state = this.state_at_block_id(block_id)?;
let storage_keys = keys.iter().map(|key| key.0).collect::<Vec<_>>();
let proof = state
.proof(&BundleState::default(), address, &storage_keys)
.proof(Default::default(), address, &storage_keys)
.map_err(Self::Error::from_eth_err)?;
Ok(from_primitive_account_proof(proof))
})

View File

@ -60,13 +60,13 @@ impl<'a> reth_storage_api::StateRootProvider for StateProviderTraitObjWrapper<'a
}
impl<'a> reth_storage_api::StateProofProvider for StateProviderTraitObjWrapper<'a> {
fn hashed_proof(
fn proof(
&self,
hashed_state: reth_trie::HashedPostState,
address: revm_primitives::Address,
slots: &[B256],
) -> reth_errors::ProviderResult<reth_trie::AccountProof> {
self.0.hashed_proof(hashed_state, address, slots)
self.0.proof(hashed_state, address, slots)
}
fn witness(