Running nargo prove causes the circuit to be re-compiled on-the-fly, ignoring whether it was already built with nargo compile. I'd like to have nargo prove use the json file produced by nargo compile to save proving time and avoid doing unnecessary work.
I investigated this by running nargo prove under strace. It shows that about 30-50% of the whole execution is spent before nargo accesses Prover.toml data. I'm assuming it's recompiling the circuit during that time.
Happy Case
Running nargo prove should use target/circuits.json and not recompile the circuit.
Project Impact
Nice-to-have
Impact Context
No response
Workaround
None
Workaround Description
No response
Additional Context
No response
Would you like to submit a PR for this Issue?
Yes
Support Needs
I could use some pointers to relevant pieces of code to implement this.
Problem
Running
nargo prove
causes the circuit to be re-compiled on-the-fly, ignoring whether it was already built withnargo compile
. I'd like to havenargo prove
use the json file produced bynargo compile
to save proving time and avoid doing unnecessary work.I investigated this by running
nargo prove
under strace. It shows that about 30-50% of the whole execution is spent before nargo accesses Prover.toml data. I'm assuming it's recompiling the circuit during that time.Happy Case
Running
nargo prove
should usetarget/circuits.json
and not recompile the circuit.Project Impact
Nice-to-have
Impact Context
No response
Workaround
None
Workaround Description
No response
Additional Context
No response
Would you like to submit a PR for this Issue?
Yes
Support Needs
I could use some pointers to relevant pieces of code to implement this.