Skip to content

Add maxParallelProofs option to NativeProver#405

Open
volodymyr-basiuk wants to merge 3 commits intomainfrom
feat/prover-queue
Open

Add maxParallelProofs option to NativeProver#405
volodymyr-basiuk wants to merge 3 commits intomainfrom
feat/prover-queue

Conversation

@volodymyr-basiuk
Copy link
Copy Markdown
Collaborator

No description provided.

Copy link
Copy Markdown
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

Adds a configurable concurrency cap for proof generation in the default NativeProver, plumbed through ProofService options so consumers (and tests) can limit parallel proof creation.

Changes:

  • Introduces ProverOptions.maxParallelProofs and a queue-based concurrency limiter around NativeProver.generate().
  • Extends ProofServiceOptions with proverOptions and passes them when constructing the default NativeProver.
  • Updates an auth handler test to set maxParallelProofs: 1 and bumps package version to 1.43.1.

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
tests/handlers/auth.test.ts Uses ProofService constructor options to set proverOptions.maxParallelProofs.
src/proof/provers/prover.ts Adds ProverOptions and implements concurrency limiting for NativeProver.generate().
src/proof/proof-service.ts Adds proverOptions to ProofServiceOptions and wires it into default prover construction.
package.json Patch version bump to 1.43.1.
package-lock.json Lockfile version bump to 1.43.1.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +149 to +151
if (this._activeProofs < (this._maxParallelProofs as number)) {
this._activeProofs++;
return;
Comment on lines +162 to +167
private releaseSlot(): void {
this._activeProofs--;
const next = this._queue.shift();
if (next) {
next();
}
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

queue won't be big in this case

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.

2 participants