Skip to content

feat(cli): add SegmentationArgs to prove command#2178

Merged
jonathanpwang merged 10 commits into
mainfrom
feat/cli-segmentation
Oct 25, 2025
Merged

feat(cli): add SegmentationArgs to prove command#2178
jonathanpwang merged 10 commits into
mainfrom
feat/cli-segmentation

Conversation

@jonathanpwang

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings October 23, 2025 23:29

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 adds configurable segmentation parameters to the prove command in the CLI, allowing users to customize trace height and cell limits for proof generation. The default segmentation limits have also been reduced for more conservative resource usage.

Key changes:

  • Reduced default segmentation limits (DEFAULT_MAX_TRACE_HEIGHT from 2^23 to 2^22, DEFAULT_MAX_CELLS from 2B to 1.2B)
  • Added SegmentationArgs struct with CLI arguments for segment_max_height and segment_max_cells
  • Integrated segmentation arguments into all three proof generation subcommands (App, Stark, Evm)

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
crates/vm/src/arch/execution_mode/metered/segment_ctx.rs Reduced default segmentation limits for trace height and cells
crates/cli/src/commands/prove.rs Added SegmentationArgs struct and integrated it into prove subcommands with helper functions
benchmarks/prove/src/util.rs Updated comment to clarify segment_max_cells refers to total cells across all chips

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

Comment thread crates/cli/src/commands/prove.rs Outdated
jonathanpwang and others added 2 commits October 23, 2025 16:30
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@shuklaayush shuklaayush left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

lgtm

Comment thread crates/cli/src/commands/prove.rs Outdated
Comment thread crates/cli/src/commands/prove.rs
@github-actions

This comment has been minimized.

@github-actions

Copy link
Copy Markdown
group app.proof_time_ms app.cycles app.cells_used leaf.proof_time_ms leaf.cycles leaf.cells_used
verify_fibair (-2 [-0.9%]) 224 322,610 2,058,654 - - -
fibonacci (+12 [+1.2%]) 995 1,500,209 2,100,402 - - -
regex (-28 [-1.2%]) 2,343 4,137,502 17,695,216 - - -
ecrecover (-2 [-0.3%]) 693 122,859 2,263,820 - - -
pairing (+20 [+1.4%]) 1,463 1,745,742 25,468,210 - - -

Commit: 0aee951

Benchmark Workflow

@jonathanpwang jonathanpwang merged commit 0af2248 into main Oct 25, 2025
45 checks passed
@jonathanpwang jonathanpwang deleted the feat/cli-segmentation branch October 25, 2025 01:25
Maillew pushed a commit that referenced this pull request Nov 5, 2025
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Maillew pushed a commit that referenced this pull request Nov 5, 2025
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants