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

NPM packages for artifacts #1

Closed cedoor closed 5 months ago

cedoor commented 5 months ago

This issue is part of the first version of a mechanism to handle circuit artifacts of PSE projects with ZK-Kit. Below is the idea:

The repository will include a README file and possibly scripts/instructions to allow people to easily add their artifacts.

cedoor commented 5 months ago

@sripwoud missing something?

sripwoud commented 5 months ago

I think this was the gist of it. As you mentioned making this a kind of standard approach to manage and distribute the artifacts. I ll prepare a paper draft summarizing this in a next PR. Then we can get feedback on it before rolling this out.

cedoor commented 5 months ago

I think this was the gist of it. As you mentioned making this a kind of standard approach to manage and distribute the artifacts. I ll prepare a paper draft summarizing this in a next PR. Then we can get feedback on it before rolling this out.

Sounds great!

sripwoud commented 5 months ago

7 would close this.

I must say I am still not 100% happy with what we have here though.
Especially I don't like that we are separating the src files (the circom circuits) from the built artifacts (zkey and wasm).
We aren't able to merge confidently here because zkey and wasm are just binary files. We will only know it works after the ci tests in the zk-kit repo fetches it and wait for it to fail or not...

Ideally you want your ci to generate whatever you "build" files are from your src files don't you?

Do you think it would be possible to do this?

Will probably take a long time, cause it is computation heavy. But the benefits would be:

cedoor commented 5 months ago

@sripwoud sounds like a cleaner solution! We'd need to isolate the artifacts in a folder with a package.json, probably moved there during the ci.

It could require some time, but if you feel you can do it it's fine for me!

EDIT: we'll actually need real artifacts mostly. Generating them with a dummy trusted-setup works for testing, which will just be something we need in the first phase. Having a separate repo sounds still better then maybe 🤔

sripwoud commented 5 months ago

Maybe we can combine both.

cedoor commented 5 months ago

Maybe we can combine both.

* build dummy artifacts in ci on the fly in zk-kit repo so that we can test everything.

* have prod artifacts here. (I am not sure yet how to automate the generation of these prod artifacts though, as it involves big phase .ptau files)

After internal discussions with @sripwoud, we created some issues: https://github.com/privacy-scaling-explorations/snark-artifacts/issues.

TLDR:

Agree to define an MVP and then work on low-priority issues later.

New board here: https://github.com/orgs/privacy-scaling-explorations/projects/45/views/1