Skip to content
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

Handle pre-generated CRS #3

Open
swasilyev opened this issue Oct 8, 2019 · 2 comments
Open

Handle pre-generated CRS #3

swasilyev opened this issue Oct 8, 2019 · 2 comments
Assignees

Comments

@swasilyev
Copy link
Collaborator

No description provided.

@swasilyev swasilyev self-assigned this Oct 8, 2019
@burdges
Copy link
Collaborator

burdges commented Apr 2, 2020

There are two questions here:

How does zcash use groth16::ParameterSource?

How big are these SRSs? If large, then we can even memmap the file I guess.

How should we associate auth_depth with the SRS? If we should support multiple auth_depths ala #10 then we could specify a directory that contains {auth_depth}.vpk and/or {auth_depth}.ppk files.

We'd then implement our own

pub trait RingVRFParameterSource : groth16::ParameterSource {
    fn auth_depth(&self) -> u32;
}

pub struct RingVRFVerifingKey {
    g16: groth16::VerifyingKey,
    auth_depth: u32,
}
impl ::core::ops::Deref for RingVRFVerifingKey {
    type Target = groth16::VerifyingKey;
    fn deeref(&self) -> groth16::VerifyingKey { &self.g16 }
}

@burdges
Copy link
Collaborator

burdges commented Apr 7, 2020

Should we say CRS or SRS? I donno..

We now associate the depth to the SRS using the RingSRS type, so if you've code that loads the SRS it can determine the depth too, maybe using the file name. It looks messy right now because zcash makes their library kinda painful by never providing standard traits. We could work around this, but we should just dump zcash's libs for ZEXE and solve all these problems there.

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

No branches or pull requests

2 participants