-
Notifications
You must be signed in to change notification settings - Fork 139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Private fields of KzgDecider
get in the way of implementing new loaders
#55
Comments
Hi, the use case sounds totally reasonable, feel free to open a PR to expose that! |
gnull
added a commit
to gnull/snark-verifier
that referenced
this issue
Nov 22, 2023
Fixes privacy-scaling-explorations#55. This commit enables users to re-use more of snark-verifier code when implementing impl AccumulationDecider<_, MyLoader> for KzgAs<MyLoader, _> in order to define their own Loader and make it work with KZG10. The field `svk` was already exported through `impl AsRef<KzgSuccinctVerifyingKey<M::G1Affine>>`, but this commit additionally defines it as `pub` for consistency with `g2` and `s_g2` fields.
gnull
added a commit
to gnull/snark-verifier
that referenced
this issue
Nov 22, 2023
Fixes privacy-scaling-explorations#55. This commit enables users to re-use more of snark-verifier code when implementing impl AccumulationDecider<_, MyLoader> for KzgAs<_, _> in order to define their own Loader and make it work with KZG10. The field `svk` was already exported through `impl AsRef<KzgSuccinctVerifyingKey<M::G1Affine>>`, but this commit additionally defines it as `pub` for consistency with `g2` and `s_g2` fields.
han0110
pushed a commit
that referenced
this issue
Nov 23, 2023
Fixes #55. This commit enables users to re-use more of snark-verifier code when implementing impl AccumulationDecider<_, MyLoader> for KzgAs<_, _> in order to define their own Loader and make it work with KZG10. The field `svk` was already exported through `impl AsRef<KzgSuccinctVerifyingKey<M::G1Affine>>`, but this commit additionally defines it as `pub` for consistency with `g2` and `s_g2` fields.
gnull
added a commit
to zeropoolnetwork/snark-verifier
that referenced
this issue
Dec 7, 2023
Fixes privacy-scaling-explorations#55. This commit enables users to re-use more of snark-verifier code when implementing impl AccumulationDecider<_, MyLoader> for KzgAs<_, _> in order to define their own Loader and make it work with KZG10. The field `svk` was already exported through `impl AsRef<KzgSuccinctVerifyingKey<M::G1Affine>>`, but this commit additionally defines it as `pub` for consistency with `g2` and `s_g2` fields.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi!
I ran into an issue trying to implement my own loader for Plonk with Kzg10. I was trying to
impl<M, MOS> AccumulationDecider<M::G1Affine, MyOwnLoader> for KzgAs<M, MOS>
analogously tosnark-verifier/snark-verifier/src/pcs/kzg/decider.rs
Line 58 in fedd7a8
The problem is that the fields of
KzgDecidingKey
are private andAccumulationDecider
implementations defined outside ofsnark-verifier
can't use them:snark-verifier/snark-verifier/src/pcs/kzg/decider.rs
Lines 6 to 13 in fedd7a8
I'm guessing that this wasn't the intention, and I thought it can make the API more convenient to use if we exposed
g2
ands_g2
to externalAccumulationDecider
implementations, so they could do something like this:snark-verifier/snark-verifier/src/pcs/kzg/decider.rs
Line 70 in fedd7a8
Would you be willing to accept a PR for this? If so, which way of exposing the fields would you find most appropriate (making field pub, writing a getter method, an
Into
instance, etc.)?Ivan
The text was updated successfully, but these errors were encountered: