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

chore(engine): revert disabling parallel state root #11047

Merged
merged 1 commit into from
Sep 19, 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
14 changes: 5 additions & 9 deletions crates/engine/tree/src/tree/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -492,12 +492,10 @@ pub struct EngineApiTreeHandler<P, E, T: EngineTypes, Spec> {
payload_builder: PayloadBuilderHandle<T>,
/// Configuration settings.
config: TreeConfig,
/// An invalid block hook.
invalid_block_hook: Box<dyn InvalidBlockHook>,
/// Temporary flag to disable parallel state root.
parallel_state_root_enabled: bool,
/// Metrics for the engine api.
metrics: EngineApiMetrics,
/// An invalid block hook.
invalid_block_hook: Box<dyn InvalidBlockHook>,
}

impl<P: Debug, E: Debug, T: EngineTypes + Debug, Spec: Debug> std::fmt::Debug
Expand All @@ -517,9 +515,8 @@ impl<P: Debug, E: Debug, T: EngineTypes + Debug, Spec: Debug> std::fmt::Debug
.field("canonical_in_memory_state", &self.canonical_in_memory_state)
.field("payload_builder", &self.payload_builder)
.field("config", &self.config)
.field("invalid_block_hook", &format!("{:p}", self.invalid_block_hook))
.field("parallel_state_root_enabled", &self.parallel_state_root_enabled)
.field("metrics", &self.metrics)
.field("invalid_block_hook", &format!("{:p}", self.invalid_block_hook))
.finish()
}
}
Expand Down Expand Up @@ -562,10 +559,9 @@ where
canonical_in_memory_state,
payload_builder,
config,
metrics: Default::default(),
incoming_tx,
invalid_block_hook: Box::new(NoopInvalidBlockHook),
parallel_state_root_enabled: false,
metrics: Default::default(),
}
}

Expand Down Expand Up @@ -2186,7 +2182,7 @@ where
// we are computing in parallel, because we initialize a different database transaction
// per thread and it might end up with a different view of the database.
let persistence_in_progress = self.persistence_state.in_progress();
if self.parallel_state_root_enabled && !persistence_in_progress {
if !persistence_in_progress {
state_root_result = match self
.compute_state_root_in_parallel(block.parent_hash, &hashed_state)
{
Expand Down
Loading