Reduce trace build inputs for prove-from-trace#2948
Conversation
Al-Kindi-0
left a comment
There was a problem hiding this comment.
Looks good to me and also cleaner
Nashtare
left a comment
There was a problem hiding this comment.
Not much to say this looks really clean
e7e5497 to
bb81f59
Compare
| let (stack_outputs, proof) = | ||
| prove_sync(&program, stack_inputs, advice_inputs, &mut host, options) | ||
| .expect("Proving failed"); | ||
| let options = ProvingOptions::with_96_bit_security(hash_fn); |
There was a problem hiding this comment.
A more drastic change that significantly changes the semantics but improves testing speed would be to use check_constraints which asserts that each row satisfies the air constraints. The main disadvantage I would foresee is that we might not catch prover bugs (for example min/max trace height bugs).
A much more useful but heavier test would involve adding an extra step here which would also verify the proof with the recursive verifier to add extra coverage for this load-bearing component.
There was a problem hiding this comment.
I've added the recursive step! Please look at assert_recursive_verify!
adr1anh
left a comment
There was a problem hiding this comment.
The precompile-related changes look good, but I think the naming of the final transcript could be slightly clearer
635c8c8 to
aa44ec6
Compare
aa44ec6 to
5427d52
Compare
TraceBuildInputskept more data than trace building and prove-from-trace need. It also repeated execution state, andprove_from_trace_sync()still took execution options after execution was already done.This PR cuts that path down to the post-execution data that trace building actually reads. It removes the duplicated execution binding, replaces the full advice fingerprint with a cheap digest of deferred precompile requests, and splits proof options from execution options.
prove_from_trace_sync()now takes a singleTraceProvingInputs bundle, and the trace-proving helper APIs are tighter.This also updates the prove-from-trace coverage, including deferred precompile requests across fragment boundaries, and refreshes the affected snapshots on top of the row-major trace base.
Fixes #2915