privacy-scaling-explorations / snark-artifacts

A streamlined mechanism for distributing SNARK artifacts.
https://snark-artifacts.pse.dev
MIT License
4 stars 2 forks source link

feat: add `verification-key.json` to this repo? #35

Closed sripwoud closed 2 months ago

sripwoud commented 4 months ago

I see reasons for and against adding verification-key.json files into this repo.

sripwoud commented 4 months ago

@cedoor

cedoor commented 4 months ago

I think it makes sense to add them, but we could keep that download optional in the @zk-kit/artifacts package, meaning devs will decide if they want to download the json vkeys as well, in addition to the other files. What do you think?

Also, what about r1cs files? They could be useful for P0tion. I don't see any advantage of downloading them in the @zk-kit/artifacts package tho.

sripwoud commented 4 months ago

Some thoughts about ways to have the benefits without the drawbacks:

sripwoud commented 4 months ago

re optionalDependencies Oh yeah I forgot about that and always wondered what a good use case of that could be ^^. Sounds more straightforward than my 2 previous ideas. It means we would like all zkey and wasm files as optional. verification-key.json as not optional And then in e.g zk-kit packages we would do npm install --no-optional @zk-kit/{proof}-artifacts?

sripwoud commented 4 months ago

r1cs files

any reason not to add them? We will generate them when generating the rest anyway so... We can make them optional too.

cedoor commented 4 months ago

Oh I actually meant here: https://github.com/privacy-scaling-explorations/zk-kit/blob/12447adf0bca1f752b1bd6b7acf5b87e0cadccc6/packages/utils/src/types/index.ts#L36, as an optional field in the Artifacts type.

cedoor commented 4 months ago

Or it could just be another function actually, for downloading verification keys only.