You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently there is no way to write a proving key to file and re-use it in subsequent proof creation procedures.
The main drawback is for those who want to create multiple proofs natively of the same circuit. There is also the case that verifying a proof requires a vk which initially requires a proving key, so for local development it can add up in terms of time spent, if you are verifying and executing a proof.
A separate weaker argument, is that this will aid in the move to dynamic backends since right now the proving and verifying keys are being used.
Solution
So that we don't make a breaking change, we can add a new command called WriteKeys. This will write the proving and verification key to some disk.
We can then add a new flag which will be for commands which can now take the proving key as path.
We can then add a load_proving_key method similar to load_verification_key which loads the proving key into the Composer.
None of the rest of the code should need modification since most methods were already checking to see if the proving_key_ field was set.
Note
With this we can get rid of ProveAndVerify; I believe it was added for only testing and to improve testing times. If we write the proving and verification keys, then it will avoid the need to create the proving keys for proving and verification, lowering the test times.
It also aids us in running tests which have a workflow which is closer to what users will be doing
The text was updated successfully, but these errors were encountered:
As noted in the PR, the time it takes to copy the proving key versus recomputing (natively) is about a difference of 2x. I'll close for now and we can revisit if users complain about proving times.
Problem
Currently there is no way to write a proving key to file and re-use it in subsequent proof creation procedures.
The main drawback is for those who want to create multiple proofs natively of the same circuit. There is also the case that verifying a proof requires a vk which initially requires a proving key, so for local development it can add up in terms of time spent, if you are verifying and executing a proof.
A separate weaker argument, is that this will aid in the move to dynamic backends since right now the proving and verifying keys are being used.
Solution
So that we don't make a breaking change, we can add a new command called
WriteKeys
. This will write the proving and verification key to some disk.We can then add a new flag which will be for commands which can now take the proving key as path.
We can then add a
load_proving_key
method similar toload_verification_key
which loads the proving key into the Composer.None of the rest of the code should need modification since most methods were already checking to see if the
proving_key_
field was set.Note
With this we can get rid of ProveAndVerify; I believe it was added for only testing and to improve testing times. If we write the proving and verification keys, then it will avoid the need to create the proving keys for proving and verification, lowering the test times.
It also aids us in running tests which have a workflow which is closer to what users will be doing
The text was updated successfully, but these errors were encountered: