Skip to content

Conversation

@srinathsetty
Copy link
Collaborator

No description provided.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request exports internal APIs to make them publicly accessible and adds comprehensive documentation across multiple modules. The changes focus on making the codebase more usable as a library by exposing key types and functions while improving code documentation.

  • Exports internal modules (spartan, r1cs, gadgets, constants, digest) to public visibility
  • Adds detailed documentation comments for public APIs, including function descriptions, parameters, and return values
  • Fixes spelling errors in comments (e.g., "constrain" → "constrains")

Reviewed changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/spartan/sumcheck.rs Exports SumcheckProof struct and adds documentation for verification and proving methods
src/spartan/polys/power.rs Exports PowPolynomial and adds documentation; adds coordinates() accessor method
src/spartan/polys/multilinear.rs Exports SparsePolynomial struct and makes evaluation vectors public
src/spartan/polys/mod.rs Changes module visibility from pub(crate) to pub for eq, multilinear, and power modules
src/spartan/polys/eq.rs Makes the internal r field public with documentation
src/spartan/mod.rs Exports submodules and adds documentation; exports powers() utility and adds accessors to PolyEvalWitness/PolyEvalInstance
src/spartan/math.rs Adds module-level documentation and documents the Math trait
src/r1cs/mod.rs Adds accessor methods for R1CSShape, R1CSWitness, R1CSInstance, RelaxedR1CSWitness, and RelaxedR1CSInstance with documentation
src/lib.rs Moves constants, digest, and r1cs modules from private to public
src/gadgets/nonnative/util.rs Fixes spelling in comments and makes Num fields public with documentation
src/gadgets/nonnative/mod.rs Adds module-level documentation
src/gadgets/nonnative/bignat.rs Adds documentation for BigNatParams, BigNat, and Polynomial methods
src/gadgets/mod.rs Changes gadget modules from pub(crate) to pub with descriptive documentation
src/gadgets/ecc.rs Makes point coordinate fields public with documentation for AllocatedPoint, AllocatedPointNonInfinity, and AllocatedNonnativePoint
src/digest.rs Adds comprehensive module-level documentation
src/constants.rs Adds module-level and constant-level documentation; changes all constants from pub(crate) to pub

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

srinathsetty and others added 18 commits December 10, 2025 17:25
This method allows external crates (like MicroNova) to extract the
(x, y) coordinates of commitment key generator points. This is useful
for in-circuit verification of polynomial evaluations.

- Add ck_to_coordinates to CommitmentEngineTrait
- Implement for PedersenCommitmentEngine (delegates to existing method)
- Implement for HyperKZGCommitmentEngine (add to_coordinates method first)
- Add evm feature flag
- Create evm_serde.rs with CustomSerdeTrait and EvmCompatSerde
- Add CustomSerdeTrait implementations for all curve types via macro
- Add serde_as annotations to R1CS, Spartan, and HyperKZG types
- Support big-endian serialization for EVM compatibility
- Add EvmCompatSerde wrapper to Commitment.comm for EVM-compatible serialization
- Add CustomSerdeTrait bound to Engine::GE type
- Update univariate poly tests to include CustomSerdeTrait bound
- Skip keccak transcript tests when evm feature is enabled (different byte order)
- Skip hyperkzg_small test with evm feature (different serialization size)
- Add EvmCompatSerde wrapper to Commitment.comm for EVM-compatible serialization
- Add CustomSerdeTrait bound to Engine::GE type
- Update univariate poly tests to include CustomSerdeTrait bound
- Skip keccak transcript tests when evm feature is enabled (different byte order)
- Skip hyperkzg_small test with evm feature (different serialization size)
- Remove all #[cfg(feature = "evm")] guards from CustomSerdeTrait impls
- G1 points now always serialize as 64 bytes (x,y uncompressed)
- G2 points now always serialize as 128 bytes
- Keccak256 transcript always uses big-endian byte order
- This ensures cross-crate serialization consistency
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