Skip to content
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
436dbd7
feat(storage): introduce storage proof worker pool
yongkangc Oct 7, 2025
fbeec50
fmt, clippy
yongkangc Oct 7, 2025
ab82386
add fallback
yongkangc Oct 7, 2025
13891ad
fix comments
yongkangc Oct 7, 2025
d4e0adb
refactor(metrics): remove unused storage proof metrics from ProofTask…
yongkangc Oct 7, 2025
2957afa
refactor(proof_task): improve documentation and rename variables for …
yongkangc Oct 7, 2025
800dcf6
refactor(proof_task): streamline documentation and clarify task manag…
yongkangc Oct 7, 2025
29d48d4
refactor(config): remove storage proof worker configuration
yongkangc Oct 7, 2025
3fb97c6
refactor(proof_task): enhance comments and adjust queue capacity logic
yongkangc Oct 7, 2025
5779b86
disable max concurrency
yongkangc Oct 7, 2025
0e33837
nits
yongkangc Oct 7, 2025
3bcbc71
Update crates/trie/parallel/src/proof_task.rs
yongkangc Oct 7, 2025
4a67076
Update crates/trie/parallel/src/proof_task.rs
yongkangc Oct 7, 2025
b2d5bcc
using unbounded queue
yongkangc Oct 7, 2025
8f4e3a1
rm comment
yongkangc Oct 7, 2025
b4bf193
refactor(proof_task): optimize storage proof computation by reusing c…
yongkangc Oct 7, 2025
6282d2e
propogate error up
yongkangc Oct 7, 2025
838dc67
reduce scope of pr - exclude all accs
yongkangc Oct 7, 2025
5897945
fmt, clippy
yongkangc Oct 7, 2025
6b5de7c
fmt
yongkangc Oct 7, 2025
05e0eb8
refactor(proof_task): consolidate blinded storage node with storage p…
yongkangc Oct 7, 2025
4829de9
rm comment
yongkangc Oct 7, 2025
6472cfe
simplify worker concurrency
yongkangc Oct 7, 2025
61ecc9a
bump to error!
yongkangc Oct 7, 2025
30f6fda
Update crates/engine/tree/src/tree/payload_processor/mod.rs
yongkangc Oct 7, 2025
4680336
handle sending error back
yongkangc Oct 7, 2025
58d6f8b
fmt
yongkangc Oct 7, 2025
59b0353
fix fmt
yongkangc Oct 7, 2025
93c67e8
Enhance TreeConfig with storage worker count configuration
yongkangc Oct 7, 2025
1954502
update message
yongkangc Oct 7, 2025
2429320
refactor(proof_task): use impl bound
yongkangc Oct 8, 2025
1902b43
make spawning falliable
yongkangc Oct 8, 2025
8fb0dd1
remove error log, as we propogate up
yongkangc Oct 8, 2025
e0010d7
Apply suggestion from @Copilot
yongkangc Oct 8, 2025
53cd4ba
use expect instead of unwrap
yongkangc Oct 8, 2025
e854628
Update crates/trie/parallel/src/proof_task.rs
yongkangc Oct 8, 2025
3b17cc7
Update crates/trie/parallel/src/proof_task.rs
yongkangc Oct 8, 2025
6c89cf4
consolidate
yongkangc Oct 8, 2025
c5f6eb9
removed the unnecessary remaining_concurrency variable allocation
yongkangc Oct 8, 2025
af73c7a
clippy
yongkangc Oct 8, 2025
a8e52bc
Apply suggestion from @yongkangc
yongkangc Oct 8, 2025
c48b328
address brian's pr
yongkangc Oct 8, 2025
3eff3e2
Merge branch 'main' into yk/worker_pool_storage_2
yongkangc Oct 8, 2025
7efff3d
Update crates/trie/parallel/src/proof_task.rs
yongkangc Oct 8, 2025
f7cd93f
Update crates/trie/parallel/src/proof_task.rs
yongkangc Oct 8, 2025
f823c6b
Refactor error handling in StorageWorkerJob to use a consistent error…
yongkangc Oct 8, 2025
9c08aed
Refactor error handling in StorageWorkerJob to use structured error t…
yongkangc Oct 8, 2025
7f9ec06
fmt, clipy
yongkangc Oct 8, 2025
6d41352
fix
yongkangc Oct 8, 2025
4ca404e
bump up workers
yongkangc Oct 9, 2025
d66ed61
cli flag for storage
yongkangc Oct 9, 2025
4aba3de
docs: update CLI reference for storage-worker-count flag
yongkangc Oct 10, 2025
8e64738
docs: clarify storage-worker-count uses Tokio blocking pool
yongkangc Oct 10, 2025
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
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions crates/engine/primitives/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ impl TreeConfig {
prewarm_max_concurrency: usize,
allow_unwind_canonical_header: bool,
) -> Self {
assert!(max_proof_task_concurrency > 0, "max_proof_task_concurrency must be at least 1");
Self {
persistence_threshold,
memory_block_buffer_target,
Expand Down Expand Up @@ -394,6 +395,7 @@ impl TreeConfig {
mut self,
max_proof_task_concurrency: u64,
) -> Self {
assert!(max_proof_task_concurrency > 0, "max_proof_task_concurrency must be at least 1");
self.max_proof_task_concurrency = max_proof_task_concurrency;
self
}
Expand Down
6 changes: 6 additions & 0 deletions crates/engine/tree/src/tree/payload_processor/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,11 +196,17 @@ where
state_root_config.prefix_sets.clone(),
);
let max_proof_task_concurrency = config.max_proof_task_concurrency() as usize;
// Default to half of max concurrency, leaving room for on-demand tasks (Accountproof and
// blinded nodes)
let storage_worker_count = (max_proof_task_concurrency / 2)
.max(1)
.min(max_proof_task_concurrency.saturating_sub(1));
let proof_task = ProofTaskManager::new(
self.executor.handle().clone(),
state_root_config.consistent_view.clone(),
task_ctx,
max_proof_task_concurrency,
storage_worker_count,
);

// We set it to half of the proof task concurrency, because often for each multiproof we
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1236,6 +1236,7 @@ mod tests {
config.consistent_view.clone(),
task_ctx,
1,
1, // storage_worker_count: 1 for tests
);
let channel = channel();

Expand Down
1 change: 1 addition & 0 deletions crates/trie/parallel/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ derive_more.workspace = true
rayon.workspace = true
itertools.workspace = true
tokio = { workspace = true, features = ["rt-multi-thread"] }
crossbeam-channel.workspace = true

# `metrics` feature
reth-metrics = { workspace = true, optional = true }
Expand Down
2 changes: 1 addition & 1 deletion crates/trie/parallel/src/proof.rs
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ mod tests {
let task_ctx =
ProofTaskCtx::new(Default::default(), Default::default(), Default::default());
let proof_task =
ProofTaskManager::new(rt.handle().clone(), consistent_view.clone(), task_ctx, 1);
ProofTaskManager::new(rt.handle().clone(), consistent_view.clone(), task_ctx, 1, 1);
let proof_task_handle = proof_task.handle();

// keep the join handle around to make sure it does not return any errors
Expand Down
Loading