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

Check integrity of snark artifacts #11

Open cedoor opened 5 months ago

cedoor commented 5 months ago

Description

After downloading the wasm/zkey files to generate valid proofs, it will be necessary to verify that those files are authentic. There are theoretically two checks to be made:

  1. Check that the downloaded files are the same ones that were uploaded to NPM,
  2. Verify that the downloaded files were generated by a specific trusted-setup.

It is necessary to understand what we need to do for each of these checks, and whether 2 somehow makes 1 redundant.

It is also necessary to understand when to have these checks.

It'll probably make sense to add a README file to each package with the instructions needed to perform these checks, with the correct versions of the packages to be used, or with scripts to simplify the process.

sripwoud commented 5 months ago

For 2. I'll discuss it with the p0tion team

sripwoud commented 5 months ago

@cedoor should we have an additional package there? I mean besides the @zk-kit/*-artifacts packages that only contain artifacts? a package that would become a dep in @zk-kit/utils and provide:

cedoor commented 5 months ago

@sripwoud What about creating a new @zk-kit/artifacts package with:

How does it sound?

cedoor commented 5 months ago

Privately agreed on creating such a package.