diff --git a/host/src/preflight.rs b/host/src/preflight.rs index 3e1e124c..90ceb1eb 100644 --- a/host/src/preflight.rs +++ b/host/src/preflight.rs @@ -5,7 +5,6 @@ use alloy_consensus::{ }; pub use alloy_primitives::*; use alloy_provider::{Provider, ProviderBuilder, ReqwestProvider, RootProvider}; -pub use alloy_rlp as rlp; use alloy_rpc_types::{ Block as AlloyBlock, BlockTransactions, Filter, Transaction as AlloyRpcTransaction, }; diff --git a/host/src/provider_db.rs b/host/src/provider_db.rs index 378a440c..1d6c9eb6 100644 --- a/host/src/provider_db.rs +++ b/host/src/provider_db.rs @@ -19,8 +19,8 @@ use std::{ use alloy_consensus::Header as AlloyConsensusHeader; use alloy_primitives::{Bytes, Uint}; use alloy_provider::{Provider, ReqwestProvider}; -use alloy_rpc_client::{BatchRequest, ClientBuilder, RpcClient}; -use alloy_rpc_types::{Block, BlockId, EIP1186AccountProofResponse}; +use alloy_rpc_client::{ClientBuilder, RpcClient}; +use alloy_rpc_types::{Block, BlockId, BlockNumberOrTag, EIP1186AccountProofResponse}; use alloy_transport_http::Http; use raiko_lib::{ clear_line, consts::Network, inplace_print, mem_db::MemDb, print_duration, @@ -91,9 +91,10 @@ impl ProviderDb { let mut requests = vec![]; for block_number in start..=block_number { - requests.push(Box::pin( - batch.add_call("eth_getBlockByNumber", &(BlockNumberOrTag::from(block_number), false))?, - )); + requests.push(Box::pin(batch.add_call( + "eth_getBlockByNumber", + &(BlockNumberOrTag::from(block_number), false), + )?)); } let blocks = self.async_executor.block_on(async { @@ -109,28 +110,20 @@ impl ProviderDb { Ok(blocks) } - pub fn get_initial_db(&self) -> &MemDb { - &self.initial_db - } - - pub fn get_latest_db(&self) -> &MemDb { - &self.current_db - } - fn get_storage_proofs( &mut self, block_number: u64, - storage_keys: HashMap
>, + accounts: HashMap>, offset: usize, num_storage_proofs: usize, ) -> Result