arkworks-rs / arkworks-rs/poly-commit

`PolynomialCommitment` trait simplification

Open
#116 3 comments 1 reaction 0 assignees View on GitHub
breaking-change D-hard T-design
Dominant language
Rust
Stars
440
Forks
160
PR merge metrics
No merged PRs in 30d

Description

## Summary

The `PolynomialCommitment` trait is a little cumbersome with all the wrapper types.
See if we can simplify the trait and then implement it for all schemes. Some ideas:

- [ ] rename `check` -> `verify`- there are a lot of name variations in the literature for the same algorithm, though `check` seems to be used less frequently. `verify` is more intuitive IMO.
- [ ] `LabeledPolynomial` construction is cumbersome: introduce a `from` conversion on `Polynomial` with some reasonable defaults, or:
- [ ] combine it with the `trim` function, which would take the parameters from the max degree of all labeled polys we are working with.
- [ ] infer `QuerySet` `from` a vector of (vectors of?) points. Construct `Evaluations` from `QuerySet` and a `Vec`.
- [x] can we construct the `ChallengeGenerator` automatically? We know the sponge, and we know whether the poly is uni- or multi-variate, so this can be part of e.g. setup.
- [ ] split the trait into a "base" trait and "batched" trait (?)
- [ ] document all the methods

See also [jellyfish PCS trait](https://github.com/EspressoSystems/jellyfish/blob/main/primitives/src/pcs/mod.rs), although the Espresso traits aren't as generic as they are mostly tailored for KZG.
@alxiong

____

#### For Admin Use

- [x] Not duplicate issue
- [x] Appropriate labels applied
- [ ] Appropriate contributors tagged
- [ ] Contributor assigned/self-assigned

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.