Conversation
There was a problem hiding this comment.
Pull request overview
This PR ("Patch5") is a broad maintenance/refactor pass spanning the relations, bulletproofs, ark-ec-divisors, and ark-dlog-gadget crates. The bulk of the changes turn previously-panicking gadget functions into Result-returning ones (new Error::NeedNonZeroSetSize variant, propagation through multi_select*, select*, single-level and curve-tree prover/verifier paths) and update the test suite accordingly. The bulletproofs prover and verifier are also reworked so the transcript binds the number and sizes of vector commitments, and the polynomial-degree arithmetic is factored into shared helpers (degree, t_poly_degree, transmitted_t_degree_indices). The divisor and barycentric code is reorganized and lightly re-documented; a new to_poly method, compute_modulus relocation, and normalize_x_coefficient move are the substantive moves.
Changes:
- Threaded
Result/Error::NeedNonZeroSetSizethrough select / multi-select / curve-tree gadgets and bumped tests to.unwrap()the new results. - Bound vector-commitment counts and sizes into the bulletproofs Fiat-Shamir transcript (prover, verifier, and dlog gadget) and refactored
VerificationTuple::padded_nto returnResult. - Refactored divisor (
compute_modulus/to_poly/normalize_x_coefficientrelocation), barycentric weight computation, and commented-out (rather than removed) several utility polynomial types inbulletproofs/src/util.rs.
Reviewed changes
Copilot reviewed 33 out of 33 changed files in this pull request and generated 27 comments.
Show a summary per file
| File | Description |
|---|---|
| relations/tests/curve_tree.rs, ped_comm_group_elems.rs, common/mod.rs, batched_curve_tree.rs | Tests updated for new Result-returning gadgets and added into_group() to get_leaf comparisons |
| relations/src/error.rs | New NeedNonZeroSetSize variant |
| relations/src/select.rs | Replaced assert!/panic-based gadgets with Result, added multi_select_public_set, factored construct_* helpers, added new tests |
| relations/src/single_level_select_and_rerandomize.rs | Functions now return Result<(), Error> |
| relations/src/{prover,verifier}.rs | ? propagation for new Result returns |
| relations/src/curve_tree_{prover,verifier}.rs | Threaded Result through prover/verifier non-root processing; introduced result collection around rayon::join |
| relations/src/batched_*.rs | Same Result propagation for batched paths |
| relations/Cargo.toml, Cargo.toml | Added ark-poly workspace dependency |
| bulletproofs/src/r1cs/{prover,verifier/mod,verifier/batch,proof,mod}.rs | New transcript bindings, degree-helpers, padded_n returns Result, removed second-phase assertion |
| bulletproofs/src/util.rs | Commented-out (not deleted) VecPoly1, VecPoly3, Poly2, Poly6, sum_of_powers etc.; coeff renamed to coeff_mut |
| bulletproofs/tests/r1cs.rs, r1cs_vec.rs | Added randomized shuffle test, padded_n failure tests; removed deref on *n/*x (likely breaks compilation) |
| bulletproofs/generalized-bulletproofs.md | Replaced \color{} with \textcolor{}, spelling/formatting fixes |
| ark-ec-divisors/src/{lib,divisor,poly,barycentric,scalar_decomposition,curves/tests}.rs | Refactor: moved compute_modulus/to_poly/normalize_x_coefficient; reworked barycentric weights + evaluation; doc edits |
| ark-dlog-gadget/src/dlog.rs | Append additional challenge-point components and per-bit beta to transcript (proof-format change) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…t, allowing randomized constraints, adding missing values to transcript in GBP and dlog gadget and some docs
Uh oh!
There was an error while loading. Please reload this page.