Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 15, 2025

Summary

Removes max_proof_task_concurrency as a configurable variable. The multiproof concurrency is now directly derived from the worker counts instead of being independently configurable.

Motivation

Having max_proof_task_concurrency as a separate configuration option added unnecessary complexity. Users who want to limit the number of concurrent proofs can achieve this more directly by manually setting the number of account and storage workers.

Removed

  • --engine.max-proof-task-concurrency CLI argument

  • max_proof_task_concurrency field from TreeConfig

  • DEFAULT_MAX_PROOF_TASK_CONCURRENCY constant (no longer exported)

  • Users can no longer set --engine.max-proof-task-concurrency. Instead, concurrency is controlled through the more fundamental worker count settings, which provide direct control over the underlying worker pools that determine concurrent proof capacity.

Copilot AI and others added 2 commits October 15, 2025 03:39
- Removed max_proof_task_concurrency field from TreeConfig
- Removed max_proof_task_concurrency CLI argument from EngineArgs
- Removed DEFAULT_MAX_PROOF_TASK_CONCURRENCY constant export
- Updated PayloadProcessor to derive multiproof concurrency from account_worker_count
- Kept existing logic for storage_worker_count and account_worker_count based on CPU count

Co-authored-by: yongkangc <[email protected]>
The CLI flag has been removed, so the documentation preprocessor no longer needs to handle its dynamic default value.

Co-authored-by: yongkangc <[email protected]>
Copilot AI changed the title [WIP] Remove max_concurrency variable and simplify worker settings Remove max_proof_task_concurrency as configurable variable Oct 15, 2025
Copilot AI requested a review from yongkangc October 15, 2025 03:52
Copilot finished work on behalf of yongkangc October 15, 2025 03:52
@yongkangc yongkangc changed the title Remove max_proof_task_concurrency as configurable variable refactor: Remove max_proof_task_concurrency as configurable variable Oct 15, 2025
Remove documentation for the --engine.max-proof-task-concurrency flag
that was removed in the previous commits.
@yongkangc yongkangc marked this pull request as ready for review October 15, 2025 12:56
@yongkangc yongkangc requested a review from Copilot October 15, 2025 13:17
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR removes the max_proof_task_concurrency configuration and derives multiproof concurrency from worker counts instead, simplifying configuration and aligning concurrency with underlying worker pools.

  • Remove CLI flag and TreeConfig field for max_proof_task_concurrency, along with its default constant.
  • Update payload processor to compute multiproof concurrency from worker counts.
  • Clean up docs and help preprocessing for the removed flag.

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
docs/vocs/docs/pages/cli/reth/node.mdx Removes the CLI help entry for --engine.max-proof-task-concurrency.
docs/cli/help.rs Removes regex rule that set a dynamic default for the removed flag in help output.
crates/node/core/src/node_config.rs Drops re-export of DEFAULT_MAX_PROOF_TASK_CONCURRENCY.
crates/node/core/src/args/engine.rs Removes EngineArgs field/CLI option and TreeConfig setter usage for max_proof_task_concurrency.
crates/engine/tree/src/tree/payload_processor/mod.rs Derives multiproof concurrency from worker counts (now using account worker count).
crates/engine/primitives/src/config.rs Removes DEFAULT_MAX_PROOF_TASK_CONCURRENCY and the TreeConfig field/getter/setter for it.
Comments suppressed due to low confidence (1)

crates/engine/primitives/src/config.rs:1

  • [nitpick] Removing this public constant is a breaking API change for downstream crates. If maintaining semver compatibility is desired, consider keeping a deprecated alias for one release cycle or clearly documenting and coordinating a semver-major bump; for example: #[deprecated(note = "max_proof_task_concurrency is no longer configurable; concurrency is derived from worker counts")] pub const DEFAULT_MAX_PROOF_TASK_CONCURRENCY: u64 = 256;
//! Engine tree configuration.

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

// often spawns one Tokio task for the account proof and one for the storage proof.
// We use the account worker count as the basis, since account workers coordinate
// the overall proof collection process.
let max_multi_proof_task_concurrency = account_worker_count;
Copy link

Copilot AI Oct 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Basing multiproof concurrency solely on account_worker_count can oversubscribe storage workers when storage_worker_count < account_worker_count, causing queue growth and potential memory pressure. Consider using the minimum of the two worker pools to align concurrency with the bottleneck: let max_multi_proof_task_concurrency = std::cmp::min(account_worker_count, storage_worker_count);

Suggested change
let max_multi_proof_task_concurrency = account_worker_count;
let max_multi_proof_task_concurrency = std::cmp::min(account_worker_count, storage_worker_count);

Copilot uses AI. Check for mistakes.
Comment on lines 835 to 837
--engine.multiproof-chunking
Whether multiproof task should chunk proof targets
Copy link

Copilot AI Oct 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] After removing --engine.max-proof-task-concurrency, it would help to add a short note here indicating that proof concurrency is now derived from worker counts (e.g., account/storage worker flags) to guide users to the new control mechanism.

Copilot uses AI. Check for mistakes.
Simplify multiproof task initialization by directly passing account_worker_count
instead of creating an intermediate variable. Also clarify the comment to better
explain the relationship between multiproof tasks and account workers.
@github-project-automation github-project-automation bot moved this from Backlog to In Progress in Reth Tracker Oct 15, 2025
Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not bad

@yongkangc
Copy link
Member

yongkangc commented Oct 15, 2025

@mattsse I was surprised, looks like the comparison of gpt models from 3 months ago had some diffs

ProofWorkerHandle::new returns the handle directly, not a Result.
The match statement was incorrectly added during rebase.
@yongkangc yongkangc enabled auto-merge October 15, 2025 23:43
@yongkangc yongkangc added this pull request to the merge queue Oct 15, 2025
Merged via the queue into main with commit 926b1a4 Oct 16, 2025
41 checks passed
@yongkangc yongkangc deleted the copilot/remove-max-concurrency-variable branch October 16, 2025 00:07
@github-project-automation github-project-automation bot moved this from In Progress to Done in Reth Tracker Oct 16, 2025
@jenpaff jenpaff moved this from Done to Completed in Reth Tracker Oct 16, 2025
emhane pushed a commit to op-rs/op-reth that referenced this pull request Oct 20, 2025
…aradigmxyz#19009)

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: yongkangc <[email protected]>
Co-authored-by: Yong Kang <[email protected]>
emhane pushed a commit to op-rs/op-reth that referenced this pull request Oct 20, 2025
…aradigmxyz#19009)

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: yongkangc <[email protected]>
Co-authored-by: Yong Kang <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Completed

Development

Successfully merging this pull request may close these issues.

4 participants