feat(zk-backend): two-stage groth16 dry-run#3869
Open
mw2000 wants to merge 4 commits into
Open
Conversation
c57445f to
e990def
Compare
e990def to
f2adb7f
Compare
40549d5 to
e806c5d
Compare
f2adb7f to
983d611
Compare
e806c5d to
53ee3d8
Compare
e9be5b5 to
e4402c9
Compare
mw2000
added a commit
that referenced
this pull request
Jul 8, 2026
Snark dry-run completion lands in the stacked #3869 backend work, so keep the helper able to submit snark_groth16 requests. Co-authored-by: Cursor <cursoragent@cursor.com>
53ee3d8 to
e1c3714
Compare
e4402c9 to
3c54cad
Compare
e1c3714 to
910ebeb
Compare
Advance dry-run SnarkGroth16 jobs from the STARK range stage to a SNARK aggregation stage via submit_next, storing a per-stage result so the host orchestrator can drive the composed flow locally without a real backend. Co-authored-by: Cursor <cursoragent@cursor.com>
Return the existing snark session id when the aggregation result is already stored, so a crash-resume re-invocation with the same pair does not fail with BackendSessionNotFound. Use the imported SnarkGroth16ProofRequest short name. Co-authored-by: Cursor <cursoragent@cursor.com>
Acquire the completed-results lock once and hold it across the idempotency check, range-result removal, and snark-result insertion so the swap is atomic and no concurrent caller can observe a state where neither key is present. Co-authored-by: Cursor <cursoragent@cursor.com>
Extract the range->snark result swap in submit_next into DryRunZkProver::advance_range_to_snark so its stateful, mutex-guarded map logic can be unit tested without a witness provider. Add tests for the happy-path swap, idempotent crash-resume, and the missing-range error case. Also name the SNARK session-id prefix (DRY_RUN_SNARK_PREFIX) and rename DRY_RUN_PREFIX to DRY_RUN_STARK_PREFIX so both stages use symmetric constants instead of a bare literal. Co-authored-by: Cursor <cursoragent@cursor.com>
3c54cad to
02c9eb5
Compare
Contributor
Review SummaryPR: feat(zk-backend): two-stage groth16 dry-run No blocking issues found. The implementation is clean and correct. What was reviewed
Notes
|
Contributor
✅ base-std fork tests: all 616 passedbase/base is fully in sync with the base-std spec.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
SnarkGroth16jobs from the STARK range stage to a SNARK aggregation stage viasubmit_next, storing a per-stage result keyed by backend session id.Stacked on #3863 (host orchestration). Cluster and network aggregation backends follow in separate PRs.
Made with Cursor