Skip to content

Commit

Permalink
perf: use only parent header for input (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
xJonathanLEI authored Aug 27, 2024
1 parent f0c2684 commit 1691e43
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions crates/executor/client/src/io.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::collections::HashMap;

use eyre::Result;
use reth_primitives::{revm_primitives::AccountInfo, Address, Block, Bytes, B256, U256};
use reth_primitives::{revm_primitives::AccountInfo, Address, Block, Bytes, Header, B256, U256};
use reth_trie::AccountProof;
use revm_primitives::keccak256;
use rsp_primitives::account_proof::AccountProofWithBytecode;
Expand All @@ -17,8 +17,8 @@ use serde::{Deserialize, Serialize};
pub struct ClientExecutorInput {
/// The current block (which will be executed inside the client).
pub current_block: Block,
/// The previous block.
pub previous_block: Block,
/// The previous block header.
pub previous_block: Header,
/// The dirty storage proofs for the storage slots that were modified.
pub dirty_storage_proofs: Vec<AccountProof>,
/// The storage proofs for the storage slots that were accessed.
Expand Down
2 changes: 1 addition & 1 deletion crates/executor/host/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ impl<T: Transport + Clone, P: Provider<T> + Clone> HostExecutor<T, P> {

// Create the client input.
let client_input = ClientExecutorInput {
previous_block,
previous_block: previous_block.header,
current_block,
dirty_storage_proofs,
used_storage_proofs: rpc_db.fetch_used_accounts_and_proofs().await,
Expand Down

0 comments on commit 1691e43

Please sign in to comment.