Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add basic engine2 exec and root perf logs #10188

Merged
merged 1 commit into from
Aug 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions crates/engine/tree/src/tree/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1706,14 +1706,19 @@ where
let block_hash = block.hash();
let sealed_block = Arc::new(block.block.clone());
let block = block.unseal();

let exec_time = Instant::now();
let output = executor.execute((&block, U256::MAX).into())?;
debug!(target: "engine", elapsed=?exec_time.elapsed(), ?block_number, "Executed block");

self.consensus.validate_block_post_execution(
&block,
PostExecutionInput::new(&output.receipts, &output.requests),
)?;

let hashed_state = HashedPostState::from_bundle_state(&output.state.state);

let root_time = Instant::now();
let (state_root, trie_output) =
state_provider.hashed_state_root_with_updates(hashed_state.clone())?;
if state_root != block.state_root {
Expand All @@ -1723,6 +1728,8 @@ where
.into())
}

debug!(target: "engine", elapsed=?root_time.elapsed(), ?block_number, "Calculated state root");

let executed = ExecutedBlock {
block: sealed_block.clone(),
senders: Arc::new(block.senders),
Expand Down
Loading