add mobench support to ProveKit v1#430
Open
dcbuild3r wants to merge 1459 commits into
Open
Conversation
Update to WHIR PR217
…spread table width
Dynamic spread table width + Ch algebraic optimization
- Recursively traverse AbiType to show struct field names (.x, .y) - Add type annotations (Point), (Rectangle), ([Field; 4]) - Support deeply nested structs (widget.rect.top_left.x) - Show array indices [0], [1] and tuple indices .0, .1 - Display booleans as true/false - Show integer type annotations (u32, i64)
feat: add `show-inputs` CLI command
Unify the duplicated PrefixCovector struct and six shared functions (expand_powers, make_public_weight, build_prefix_covectors, compute_alpha_evals, compute_public_eval) from prover and verifier into a single implementation in provekit-common. The prover's vestigial 'deferred: bool' field (always false) is dropped. Also removes empty test modules from common/lib.rs.
…e helper Replace ~250 lines of near-identical AND/XOR match arms with a single process_binop_opcode method that handles all four operand combinations (witness/witness, constant/witness, witness/constant, constant/constant) and dispatches to the correct ops vector.
Verifier::verify() used self.whir_for_witness.take().unwrap() which would panic if called twice. Replace with .take().context() for a descriptive error message instead of a bare panic.
…notations Use destructuring in from_noir_proof_scheme for clearer construction. Add #[must_use] to public constructors and accessors (PublicInputs::new, from_vec, len, is_empty, hash, ConstantOrR1CSWitness::to_tuple, Prover/Verifier::from_noir_proof_scheme, size).
…itch to base64 - Parallelize right-multiply (A * witness) over rows via into_par_iter. Left-multiply intentionally stays sequential (38 MB per accumulator makes fold-reduce prohibitive; callers already parallelize via rayon::join). - Avoid redundant allocations in calculate_witness_bounds: compute C element-wise and resize a/b/c in-place instead of pad_to_power_of_two. - Switch human-readable serde encoding from hex (100% overhead) to base64 (33% overhead), cutting proof file size ~25%. Deserializer auto-detects hex for backwards compatibility.
…efault
- Remove empty #[cfg(test)] mod tests {} from prover, r1cs-compiler
- Remove commented-out 'pub mod file_io' from utils
- Fix verify.rs docstring ('Prove' -> 'Verify')
- Collapse split use-path in common/whir_r1cs.rs
- Align struct field formatting in r1cs-compiler/whir_r1cs.rs
- Disable jemalloc as default feature in CLI (opt-in instead)
- Switch whir dependency from local path (../../whir) to pinned git revision for reproducible builds. - Enable profiling-allocator as default CLI feature; make jemalloc depend on profiling-allocator.
… matrix ops Remove r1cs.clone() and alpha.clone() by taking references, add SparseMatrix::transpose() for parallel right-multiply, parallelize verifier key and proof file reads with rayon::join, truncate eq_alpha allocation to actual entry count, and take owned NoirProof to avoid proof clone. End-to-end verify drops from ~2s to ~510ms on complete_age_check.
…kward-compatible read
…te clones Consume objects as soon as they finish their job to reduce peak memory: - PrefixCovector: store only short alpha-weight prefix, zero-pad via logical_size (~192 MB savings vs full-domain Covector) - CompressedR1CS: serialize R1CS during commits, decompress at sumcheck (~61 MB savings during commit phase) - CompressedLayers: serialize w2_layers during commit_w1, decompress before solve_w2 (~271 MB savings during commit_w1) - Remove padded_witness from WhirR1CSCommitment, pass full_witness as parameter to prove() instead of cloning+storing - Shrink get_public_weights to tiny prefix (~64 MB savings) - Take ownership of alphas in create_weights to avoid copy+coexistence - Early drops: acir_map after solve_w2, witness consumed via into_iter - Extract solve_witness_vec as free function so layers drop on return - commit() takes (num_witnesses, num_constraints) instead of &R1CS - Work with raw Vec<FieldElement> instead of CoefficientList/EvaluationsList - Drop program and witness_generator after witness generation Global peak reduced from ~1.8 GB to ~1.22 GB for complete_age_check.
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.
Draft replacement for the v1 mobench integration branch using the dcbuild3r/* branch naming convention.\n\nCI validation is being run on dcbuild3r/provekit with mobench_ref=dcbuild3r/ios10-xcode-override before this is marked ready.