Skip to content

Commit 3e06b78

Browse files
test: add new logs1
1 parent 59872ab commit 3e06b78

3 files changed

Lines changed: 21 additions & 19 deletions

File tree

crates/blockchain-tree/src/chain.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,7 @@ impl AppendableChain {
226226

227227
let block_hash = block.hash();
228228
let block = block.unseal();
229+
tracing::debug!("test info: tx length {:?}", block.block.body.len());
229230

230231
let state = executor.execute((&block, U256::MAX, ancestor_blocks).into())?;
231232
externals.consensus.validate_block_post_execution(
@@ -250,6 +251,7 @@ impl AppendableChain {
250251
provider.block_execution_data_provider.execution_outcome().clone();
251252
execution_outcome.extend(initial_execution_outcome.clone());
252253
let hashed_state = execution_outcome.hash_state_slow();
254+
tracing::debug!("test info: account length {:?}", execution_outcome.bundle.state.len());
253255
ParallelStateRoot::new(consistent_view, hashed_state)
254256
.incremental_root_with_updates()
255257
.map(|(root, updates)| (root, Some(updates)))

crates/trie/parallel/src/parallel_root.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,9 +182,9 @@ where
182182
}
183183
}
184184
debug!(target: "trie::parallel_state_root", "test info: total elapsed in account node {:?}", start.elapsed());
185-
debug!(target: "trie::parallel_state_root", "test info: hash elapsed in account node {:?}us", hash_elapsed_branch);
186-
debug!(target: "trie::parallel_state_root", "test info: hash elapsed in account node {:?}us", hash_elapsed_leaf);
187-
debug!(target: "trie::parallel_state_root", "test info: hash elapsed in account node {:?}us", hash_elapsed_miss);
185+
debug!(target: "trie::parallel_state_root", "test info: hash elapsed in branch node {:?}us", hash_elapsed_branch);
186+
debug!(target: "trie::parallel_state_root", "test info: hash elapsed in leaf node {:?}us", hash_elapsed_leaf);
187+
debug!(target: "trie::parallel_state_root", "test info: hash elapsed in missing node {:?}us", hash_elapsed_miss);
188188

189189
let start = std::time::Instant::now();
190190
let root = hash_builder.root();

crates/trie/prefetch/src/prefetch.rs

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -170,23 +170,23 @@ impl TriePrefetch {
170170
let mut storage_roots = storage_root_targets
171171
.into_par_iter()
172172
.map(|(hashed_address, prefix_set)| {
173-
let provider_ro = consistent_view.provider_ro()?;
174-
let trie_cursor_factory = DatabaseTrieCursorFactory::new(provider_ro.tx_ref());
175-
let hashed_cursor_factory = HashedPostStateCursorFactory::new(
176-
DatabaseHashedCursorFactory::new(provider_ro.tx_ref()),
177-
&hashed_state_sorted,
178-
);
179-
let storage_root_result = StorageRoot::new_hashed(
180-
trie_cursor_factory,
181-
hashed_cursor_factory,
182-
hashed_address,
183-
#[cfg(feature = "metrics")]
184-
self.metrics.clone(),
185-
)
186-
.with_prefix_set(prefix_set)
187-
.prefetch();
173+
// let provider_ro = consistent_view.provider_ro()?;
174+
// let trie_cursor_factory = DatabaseTrieCursorFactory::new(provider_ro.tx_ref());
175+
// let hashed_cursor_factory = HashedPostStateCursorFactory::new(
176+
// DatabaseHashedCursorFactory::new(provider_ro.tx_ref()),
177+
// &hashed_state_sorted,
178+
// );
179+
// let storage_root_result = StorageRoot::new_hashed(
180+
// trie_cursor_factory,
181+
// hashed_cursor_factory,
182+
// hashed_address,
183+
// #[cfg(feature = "metrics")]
184+
// self.metrics.clone(),
185+
// )
186+
// .with_prefix_set(prefix_set)
187+
// .prefetch();
188188

189-
Ok((hashed_address, storage_root_result?))
189+
Ok((hashed_address, 1))
190190
})
191191
.collect::<Result<HashMap<_, _>, ParallelStateRootError>>()?;
192192

0 commit comments

Comments
 (0)