这是indexloc提供的服务,不要输入任何密码
Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ use anyhow::{anyhow, ensure, Result};
use aptos_crypto::{hash::CryptoHash, HashValue};
use aptos_executor_types::{ParsedTransactionOutput, ProofReader};
use aptos_experimental_runtimes::thread_manager::THREAD_MANAGER;
use aptos_logger::info;
use aptos_scratchpad::SparseMerkleTree;
use aptos_storage_interface::{
cached_state_view::{ShardedStateCache, StateCache},
Expand Down Expand Up @@ -173,10 +174,6 @@ impl InMemoryStateCalculatorV2 {
latest_checkpoint_version = Some(first_version + index as u64);
}

THREAD_MANAGER.get_non_exe_cpu_pool().spawn(move || {
drop(frozen_base);
});

let current_version = first_version + num_txns as u64 - 1;
// We need to calculate the SMT at the end of the chunk, if it is not already calculated.
let current_tree = if last_checkpoint_index == Some(num_txns - 1) {
Expand All @@ -198,6 +195,10 @@ impl InMemoryStateCalculatorV2 {
)?
};

THREAD_MANAGER.get_non_exe_cpu_pool().spawn(move || {
drop(frozen_base);
});

let updates_since_latest_checkpoint = if last_checkpoint_index.is_some() {
updates_after_last_checkpoint
} else {
Expand All @@ -210,6 +211,14 @@ impl InMemoryStateCalculatorV2 {
updates_since_latest_checkpoint
};

info!(
"last_checkpoint_index {last_checkpoint_index:?}, result_state: {latest_checkpoint_version:?} {:?} {:?} {current_version} {:?} {:?}",
latest_checkpoint.root_hash(),
latest_checkpoint.usage(),
current_tree.root_hash(),
current_tree.usage(),
);

let result_state = StateDelta::new(
latest_checkpoint.clone(),
latest_checkpoint_version,
Expand Down