Skip to content

refactor(groth16-proofs): clean architecture, unified error type, shared prover core#6

Merged
nol4lej merged 3 commits into
mainfrom
refactor/groth16-architecture
Apr 8, 2026
Merged

refactor(groth16-proofs): clean architecture, unified error type, shared prover core#6
nol4lej merged 3 commits into
mainfrom
refactor/groth16-architecture

Conversation

@nol4lej

@nol4lej nol4lej commented Apr 8, 2026

Copy link
Copy Markdown
Member
  • Add ProofError enum replacing String errors throughout the crate
  • Add field.rs with generic from_decimal_str/from_hex_le, eliminating duplication
  • Add prover.rs with prove_from_witness shared by native and WASM paths
  • Add codec.rs for snarkjs JSON compression decoupled from the wasm module
  • Fix num_public_signals bug in circuit.rs (was (witness.len()/100).clamp(1,10))
  • Update generate_proof_from_witness to require explicit num_public_signals arg
  • Rewrite wasm.rs and wasm/snarkjs_proof.rs as thin wrappers, no logic duplication
  • Keep decimal_to_field/hex_to_field as backward-compat shims in utils.rs
  • Remove stale shebang from generate-proof-from-witness binary
  • Remove tautological test in proof.rs (assert_eq!(128, 128))

nol4lej added 3 commits April 8, 2026 11:39
…red prover core

- Add ProofError enum replacing String errors throughout the crate
- Add field.rs with generic from_decimal_str<F>/from_hex_le<F>, eliminating duplication
- Add prover.rs with prove_from_witness shared by native and WASM paths
- Add codec.rs for snarkjs JSON compression decoupled from the wasm module
- Fix num_public_signals bug in circuit.rs (was (witness.len()/100).clamp(1,10))
- Update generate_proof_from_witness to require explicit num_public_signals arg
- Rewrite wasm.rs and wasm/snarkjs_proof.rs as thin wrappers, no logic duplication
- Keep decimal_to_field/hex_to_field as backward-compat shims in utils.rs
- Remove stale shebang from generate-proof-from-witness binary
- Remove tautological test in proof.rs (assert_eq!(128, 128))
@nol4lej nol4lej merged commit 72fde69 into main Apr 8, 2026
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.

1 participant