Skip to content

Commit 9db793f

Browse files
chee-chyuanclaude
andcommitted
debug(engine): log triedb blocking state root call duration
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 01258fb commit 9db793f

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

crates/engine/tree/src/tree/payload_validator.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -560,6 +560,12 @@ where
560560
let trie_hashed_state = hashed_state.get().to_triedb_hashed_post_state();
561561
let block_state_root = block.state_root();
562562
let root_start = Instant::now();
563+
warn!(
564+
target: "engine::tree",
565+
block = ?block_num_hash,
566+
had_prefetch = had_prefetch_state,
567+
"DBG: triedb intermediate_and_commit_hashed_post_state start (BLOCKING)"
568+
);
563569
let (new_root, difflayer) = triedb
564570
.intermediate_and_commit_hashed_post_state(
565571
parent_block.state_root(),
@@ -573,6 +579,15 @@ where
573579
ProviderError::other(e).into(),
574580
))
575581
})?;
582+
warn!(
583+
target: "engine::tree",
584+
block = ?block_num_hash,
585+
elapsed_ms = root_start.elapsed().as_millis(),
586+
got_root = ?new_root,
587+
expected_root = ?block_state_root,
588+
roots_match = (new_root == block_state_root),
589+
"DBG: triedb intermediate_and_commit_hashed_post_state done"
590+
);
576591
self.metrics
577592
.block_validation
578593
.triedb_validate_root_duration

0 commit comments

Comments
 (0)