return early if proof malformed
in absorb_evaluations (called by both the prover and the verifier) we absorb lookup evaluations only if they are present in the proof:
if let Some((l0, l1)) = zeta_evals
.lookup
.as_ref()
.zip(zeta_omega_evals.lookup.as_ref())
{
points.extend(&[l0.aggreg, l1.aggreg]);
points.extend(&[l0.table, l1.table]);
for (s0, s1) in l0.sorted.iter().zip(&l1.sorted) {
points.extend(&[*s0, *s1]);
}
for (r0, r1) in l0.runtime.iter().zip(&l1.runtime) {
points.extend(&[*r0, *r1]);
}
}
that makes sense, but this made me think that we need to make sure that a proof matches an index. I think, early in the verification of a proof we should return an error if the index has a lookup but the proof doesn't have an evaluation (and if the index has a runtime table, but the proof doesn't have one). And potentially vice versa (the proof has a runtime table, but the index doesn't)
playing with it here: https://github.com/o1-labs/proof-systems/commit/a3f9537f87f90781d7af1fd9e2ebff7886d4463d
Stale issue message
Stale issue message
Stale issue message
I'll copy what I wrote in https://github.com/o1-labs/proof-systems/issues/751#issuecomment-1430160113 :
So an update on the issue, which I think still misses a number of things:
- there's more than the evaluation lengths we should check, we should also check the commitment lengths, for example (I talked about it here https://github.com/o1-labs/proof-systems/issues/147)
- imo it'd be clearer if all of that logic is implemented on the structure we validate. For example, we could have a
validate(&self) -> Result<()>function implemented onProverProof, andProofEvaluations, etc. - the checks are written in a way that doesn't necessarily match the index
for the latter one, see this example in https://github.com/o1-labs/proof-systems/pull/989/files#diff-fc95db4d289fd33bc7fbefe8a487926ce8b47cbe71f047a1dd6933d7444b5d5aR521:
if let Some(LookupEvaluations {
which will not check if there's no lookup evaluations. But if the index says that lookup should be here then we should error here instead. I talked about it here as well: https://github.com/o1-labs/proof-systems/issues/540
Stale issue message