Description
Currently, the jolt::provable
proc_macro generates a build_*
function for each decorated function (see e.g. build_fib). Calling this function from the host builds the guest program and computes preprocessing. It then returns two closures, prove_*
and verify_*
which prove and verify executions of the guest, respectively.
Of course, a more realistic usage pattern would be to compile the guest and compute the preprocessing only once per guest program (more precisely, preprocessing can also depend on parameters specifying e.g. the max input size of the guest), and then serialize it or post it to some public bulletin.
Then a prover could read the preprocessing from disk once and use it for multiple invocations of Jolt::prove
.
Similarly, the verifier needs a subset of the JoltPreprocessing
data (currently the same preprocessing struct is used for prover and verifier, but this should be changed). This verifier should be able to read the required data from disk once and use it for multiple invocations of Jolt::verify
.