lurk-rs icon indicating copy to clipboard operation
lurk-rs copied to clipboard

proof claim structure (fcomm/clutch)

Open porcuquine opened this issue 1 year ago • 1 comments

Currently, proofs are looked up by the CID of their claim. However, this is imperfect and needs more thought.

Currently, claims don't capture any info about the proof, but if we are going to look proofs up by claim, they must.

I experienced this concretely because I changed the reduction-count (reductions per step), and the presence of old proofs blocked my ability to create new ones (because the old one was found). More generally, there can be many circuits, each describing a slightly different language. This might be because of versioning or because of intentional parameterization.

The point is that for any given concrete verifier, there needs to be a unique deterministic identifier. (Nova might already have a way to acquire such a verification key identifier, but if not we need one.)

We can either embed the verifier id in the claim, or index proofs by (claim, verifier-id).

Of course the reality is yet a little more nuanced. I think some properties of the verifier affect meaning (the 'language') and some only affect the structure of the proof (reduction count).

I think a natural formulation will shake out. This issue is just to capture the main considerations.

porcuquine avatar Mar 17 '23 05:03 porcuquine

We can break the simple part of this into two:

  • versioning associated with circuit changes
  • inclusion of reduction-count when looking up cached proofs

A simple way to deal with the latter, which agrees with the current structure of Clutch (and is not inconsistent with fcomm, I don't think) would be to keep separate directories of proofs by reduction count. Then we can look up the claim in the right directory based on the configured size we are using.

Ultimately, this is a database problem, but I'm approaching it from the kindergarten level of 'how do we make our incremental, simple demo applications work reasonably?'.

porcuquine avatar Mar 17 '23 05:03 porcuquine