Skip to content

Conversation

@gauravahuja
Copy link
Contributor

@gauravahuja gauravahuja commented Dec 19, 2025

This PR implements issue(s) #1740

Checklist

  • I wrote new tests for my new core changes.
  • I have successfully ran tests, style checker and build against my new changes locally.
  • I have informed the team of any breaking changes if there are any.

Note

Introduce createProofRequest via new ProverProofRequestCreator and refactor file-based prover client and router to delegate and reuse request creation.

  • Core (coordinator/core/.../ProverClient.kt):
    • Add ProverProofRequestCreator with createProofRequest.
    • Update ProverClient to extend ProverProofRequestCreator.
  • File-based client (GenericFileBasedProverClient):
    • Implement createProofRequest; extract request file creation logic from requestProof.
    • Update requestProof to call createProofRequest then wait/parse response.
  • Router (ABProverClientRouter):
    • Add getProver helper and delegate findProofResponse, requestProof, and new createProofRequest based on predicate.

Written by Cursor Bugbot for commit 8b55a66. This will update automatically on new commits. Configure here.


return findRequestFileIfAlreadyInFileSystem(requestFileName)
.thenCompose { requestFileFound: String? ->
responsesWaiting.incrementAndGet()
Copy link

Choose a reason for hiding this comment

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

Bug: Counter leak when createProofRequest called independently

The responsesWaiting counter is incremented in createProofRequest but only decremented in requestProof. Since createProofRequest is now exposed as a public interface method via ProverProofRequestCreator, callers can invoke it independently without going through requestProof. In that scenario, the counter increments but never decrements, causing the metric to grow unbounded and report incorrect values via the Supplier<Number> interface.

Additional Locations (1)

Fix in Cursor Fix in Web

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If invoked independently, this behaviour is expected.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

createProofRequest will be used by conflation backtesting which will use a different metrics facade so the prod and backtesting metrics do not interfere with each other.

@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 92.59259% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 62.81%. Comparing base (9366e3f) to head (8b55a66).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...coordinator/clients/prover/ABProverClientRouter.kt 66.66% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #1957      +/-   ##
============================================
+ Coverage     62.80%   62.81%   +0.01%     
- Complexity     1536     1538       +2     
============================================
  Files           410      410              
  Lines         14978    14980       +2     
  Branches       1582     1582              
============================================
+ Hits           9407     9410       +3     
+ Misses         4952     4951       -1     
  Partials        619      619              
Flag Coverage Δ *Carryforward flag
hardhat 95.64% <ø> (ø) Carriedforward from 9366e3f
kotlin 60.27% <92.59%> (+0.01%) ⬆️

*This pull request uses carry forward flags. Click here to find out more.

Files with missing lines Coverage Δ
...tor/clients/prover/GenericFileBasedProverClient.kt 90.17% <100.00%> (+0.17%) ⬆️
...onsensys/zkevm/coordinator/clients/ProverClient.kt 0.00% <ø> (ø)
...coordinator/clients/prover/ABProverClientRouter.kt 84.61% <66.66%> (+7.69%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@gauravahuja gauravahuja requested a review from a team December 19, 2025 13:19
return proverB
} else {
proverA.findProofResponse(proofRequestId)
return proverA
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit: I prefer moving return out of the if

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.

4 participants