Skip to content

main into opt-v2: PathConfig + Witness Caching + Show Circuit Optimization#59

Merged
0xVikasRushi merged 6 commits intomainfrom
opt-v2
Feb 6, 2026
Merged

main into opt-v2: PathConfig + Witness Caching + Show Circuit Optimization#59
0xVikasRushi merged 6 commits intomainfrom
opt-v2

Conversation

@0xVikasRushi
Copy link
Collaborator

@0xVikasRushi 0xVikasRushi commented Jan 27, 2026

Description

This PR merges main (containing mobile app migration from PR #58) into opt-v2, combining three key improvements:

1. PathConfig Abstraction (from main)

  • Cross-platform path resolution for mobile/desktop environments
  • Cleaner file path handling across the codebase

2. Witness Caching (from opt-v2)

  • Added Arc<Mutex<...>> caching to avoid redundant witness generation
  • Improves proving performance by reusing computed witnesses

3. Show Circuit Optimization

  • Reduced Show circuit constraints from ~20k → 11,933 (~40% reduction)
  • Faster prove/verify times for the Show circuit

Benchmark Results (1920 bytes)

Step Time
Prove Prepare 1803 ms
Prove Show 52 ms
Verify Prepare 76 ms
Verify Show 9 ms
Artifact Size
Prepare Proof 112.35 KB
Show Proof 40.51 KB

Related Issue(s)

Closes #58 merge into opt-v2

Other information

Show Circuit Stats

non-linear constraints: 11,933
public inputs: 2 | public outputs: 1
private inputs: 102 | wires: 12,015

Resolved Merge Conflicts

  • prepare_circuit.rs - Combined PathConfig + witness caching
  • show_circuit.rs - Combined PathConfig + witness caching
  • prover.rs - verify_circuit returns Vec<Scalar>
  • main.rs - Updated all constructor/function calls

Checklist

  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@0xVikasRushi 0xVikasRushi changed the title Opt v2 main into opt-v2: PathConfig + Witness Caching + Show Circuit Optimization Feb 3, 2026
@0xVikasRushi 0xVikasRushi marked this pull request as ready for review February 3, 2026 10:36
Copy link
Member

@vplasencia vplasencia left a comment

Choose a reason for hiding this comment

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

Looks great to me! Great work 🚀

@0xVikasRushi 0xVikasRushi merged commit 3e0ba6f into main Feb 6, 2026
1 check passed
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