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

Restore prover keys #87

Closed
jasongitmail opened this issue Feb 3, 2022 · 8 comments · Fixed by #1187
Closed

Restore prover keys #87

jasongitmail opened this issue Feb 3, 2022 · 8 comments · Fixed by #1187
Assignees
Labels
performance to-discuss Issues to be discussed further user-priority Issues that seem high priority to one or more users
Milestone

Comments

@jasongitmail
Copy link
Contributor

jasongitmail commented Feb 3, 2022

Motivation described well here: #951

@jasongitmail jasongitmail added this to the Berkeley milestone Feb 3, 2022
@jasongitmail jasongitmail changed the title Finalize SnarkyJS build artifact Finalize SnarkyJS build artifact(s) Feb 3, 2022
@mitschabaude mitschabaude self-assigned this Mar 7, 2022
@mitschabaude
Copy link
Member

Verification key is done in the tx construction branch, TODO prover key

@mitschabaude
Copy link
Member

Prover key is only necessary as a performance improvement. Proof transactions can also be constructed by computing the prover key on the fly, which currently doubles the time to generate proofs. Removing from the tx construction epic, to be addressed in a (less-high-priority) performance improvement epic

@mitschabaude
Copy link
Member

this is actually harder than I thought first, because the JS code needs to be bundled in as well (it's called by the prover). bumping estimate to 3 days

@mitschabaude mitschabaude changed the title Finalize SnarkyJS build artifact(s) Create build artifact for provers May 3, 2022
@mitschabaude
Copy link
Member

JS code doesn't need to be bundled; pickles can be modified to return the parts it needs in addition to the user code, which is just imported as usual. However, I learned that the prover key is huge (100s of MBs). We should investigate whether some parts of it can be recomputed quickly on demand

@mitschabaude mitschabaude changed the title Create build artifact for provers Restore prover keys from cache Jan 4, 2023
@mitschabaude mitschabaude added to-discuss Issues to be discussed further performance labels Jan 4, 2023
@mitschabaude
Copy link
Member

Users asking for this feature, "dramatic improvement to UX": https://discord.com/channels/484437221055922177/1070570936799084554

@mitschabaude mitschabaude added the user-priority Issues that seem high priority to one or more users label Feb 6, 2023
@jasongitmail
Copy link
Contributor Author

Needs research & RFC or mini RFC

@mitschabaude mitschabaude changed the title Restore prover keys from cache Restore prover keys Feb 16, 2023
@mitschabaude mitschabaude removed their assignment Jul 14, 2023
@shimkiv
Copy link
Member

shimkiv commented Aug 30, 2023

Hundreds of megs were mentioned but is this the size of the raw data or we have a way to compress it? If compression is possible at all and makes sense.

@mitschabaude
Copy link
Member

Hundreds of megs were mentioned but is this the size of the raw data or we have a way to compress it? If compression is possible at all and makes sense.

Answering that is part of this task. I imagine the data is mostly field elements. If those are very structured, e.g. lots of 0s and 1s each stored in 32 bytes, then general-purpose compression could indeed make a huge difference. But I don't recommend that the developer doing this treats the prover index as a black box blob of data

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance to-discuss Issues to be discussed further user-priority Issues that seem high priority to one or more users
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants