Skip to content

Commit 6987639

Browse files
chee-chyuanclaude
andcommitted
debug(engine): add granular logs between validate_post_execution and triedb state root
Pinpoint whether hang is at terminate_caching, triedb_preftch_result, or to_triedb_hashed_post_state before the blocking state root call. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 9db793f commit 6987639

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -539,9 +539,12 @@ where
539539
);
540540

541541
let output = Arc::new(output);
542+
warn!(target: "engine::tree", block = ?block_num_hash, "DBG: triedb path - calling terminate_caching");
542543
let valid_block_tx = handle.terminate_caching(Some(output.clone()));
543544

544545
// Wait for the prefetcher result (may be None if prefetch failed/wasn't available).
546+
warn!(target: "engine::tree", block = ?block_num_hash, "DBG: triedb path - waiting for triedb_preftch_result (BLOCKING)");
547+
let t_prefetch = Instant::now();
545548
let prefetch_state = match handle.triedb_preftch_result() {
546549
Ok(state) => state,
547550
Err(e) => {
@@ -555,9 +558,13 @@ where
555558
}
556559
};
557560
let had_prefetch_state = prefetch_state.is_some();
561+
warn!(target: "engine::tree", block = ?block_num_hash, prefetch_waited_ms = t_prefetch.elapsed().as_millis(), had_prefetch = had_prefetch_state, "DBG: triedb path - triedb_preftch_result done");
558562

559563
// Commit the state root via triedb, accelerated by the prefetch state.
564+
warn!(target: "engine::tree", block = ?block_num_hash, "DBG: triedb path - calling hashed_state.get().to_triedb_hashed_post_state (BLOCKING)");
565+
let t_hash = Instant::now();
560566
let trie_hashed_state = hashed_state.get().to_triedb_hashed_post_state();
567+
warn!(target: "engine::tree", block = ?block_num_hash, hash_waited_ms = t_hash.elapsed().as_millis(), "DBG: triedb path - hashed_state converted");
561568
let block_state_root = block.state_root();
562569
let root_start = Instant::now();
563570
warn!(

0 commit comments

Comments
 (0)