diff --git a/crates/rpc/rpc/src/eth/api/state.rs b/crates/rpc/rpc/src/eth/api/state.rs index 7b7816187..4cf4a69a6 100644 --- a/crates/rpc/rpc/src/eth/api/state.rs +++ b/crates/rpc/rpc/src/eth/api/state.rs @@ -103,9 +103,9 @@ where }; // TODO: remove when HistoricalStateProviderRef::proof is implemented - // if !is_latest_block { - // return Err(EthApiError::InvalidBlockRange) - // } + if !is_latest_block { + return Err(EthApiError::InvalidBlockRange) + } let this = self.clone(); self.inner diff --git a/crates/storage/provider/src/providers/state/historical.rs b/crates/storage/provider/src/providers/state/historical.rs index d9796da15..d91d2f589 100644 --- a/crates/storage/provider/src/providers/state/historical.rs +++ b/crates/storage/provider/src/providers/state/historical.rs @@ -10,7 +10,7 @@ use reth_db::{ transaction::DbTx, BlockNumberList, }; -use reth_interfaces::{RethError, RethResult}; +use reth_interfaces::RethResult; use reth_primitives::{ trie::AccountProof, Account, Address, BlockNumber, Bytecode, StorageKey, StorageValue, B256, }; @@ -240,10 +240,8 @@ impl<'b, TX: DbTx> StateProvider for HistoricalStateProviderRef<'b, TX> { } /// Get account and storage proofs. - fn proof(&self, address: Address, keys: &[B256]) -> RethResult { - let proof = reth_trie::proof::Proof::new(self.tx); - proof.account_proof(address, keys) - .map_err(|_| RethError::Custom("proof generation failed".to_string())) + fn proof(&self, _address: Address, _keys: &[B256]) -> RethResult { + Err(ProviderError::StateRootNotAvailableForHistoricalBlock.into()) } }