Closed mimoo closed 1 year ago
the "SRS.endo_r" and "SRS.endo_q" are used in https://github.com/o1-labs/proof-systems/blob/master/poly-commitment/src/evaluation_proof.rs#L244 and https://github.com/o1-labs/proof-systems/blob/master/poly-commitment/src/evaluation_proof.rs#L274.
does the whole system design allows the kimchi trait to be imported into the files mentioned above to provide the "endo_r" and "endo_q" variables?
No because poly-commitment is a dependency of kimchi, and so you'd get a dependency cycle if you would do that.
I guess there's two solutions:
KimchiCurve
trait to a crate that can be imported by both would fix that (for example mina-curves).I liked solution 2 initially, as I was thinking that a poly-commitment library should only be aware of one curve, and not two, but I guess our poly-commitment might be aware of that. So maybe solution 1 is better here. cc @mrmr1993 who probably has a better opinion
Stale issue message
@mimoo
I have one question about the issue.
In fact, the endo_q
and endo_r
are initialized with endos::endos::<G>()
is also used for KimchiCurve implementation
.
Is there any need to explicitly remove the endo_q
and endo_r
from the SRS
struct?
My point is that endos::<G>()
is already used everywhere.
I thought I had answered this but apparently not, the point is that it doesn't really seem related to the SRS which should be a "commitment"-focused data structure (https://o1-labs.github.io/proof-systems/specs/urs.html). Semantically it doesn't seem to make sense to keep it there.
@mimoo Please review the PR #895 I created for the solution.
the SRS struct has two endo fields
endo_r
andendo_q
:We should be able to remove these fields, as they are part of the
KimchiCurve
trait now: https://github.com/o1-labs/proof-systems/blob/master/kimchi/src/curve.rs#L25