argumentcomputer / arecibo

An advanced fork of Nova (contact:@huitseeker)
https://lurk-lang.org/
MIT License
74 stars 31 forks source link

Remove dependency (or automatically enforce it) on constraint counts Nova benchmarks #262

Open huitseeker opened 8 months ago

huitseeker commented 8 months ago

We have tests for constraint counts in Nova: https://github.com/lurk-lab/arecibo/blob/605f89990666cae63ff534245ea701199fe0df82/src/circuit.rs#L462-L502 https://github.com/lurk-lab/arecibo/blob/605f89990666cae63ff534245ea701199fe0df82/src/supernova/circuit.rs#L836 https://github.com/lurk-lab/arecibo/blob/605f89990666cae63ff534245ea701199fe0df82/src/supernova/test.rs#L568

The benchmarks use these constraint counts (see the use of constant NUM_CONS_VERIFIER_CIRCUIT_PRIMARY) and substract it from a target constraint count to estimate performance on a circuit with a certain number of "payload" constraints (the constraint count minus the ones automatically added by Nova's folding verification).

This is brittle and unsafe:

We should :

srinathsetty commented 8 months ago

The cleanest fix to this will be to write a common routine that does the following. Synthesize a non-trivial step circuit with zero constraints (which the current code in the Nova benchmark supports), run RecursiveSNARK to identify the size of the verifier circuit. The benchmark then use that information to determine the circuit sizes for the benchmark. We will be interested in such a fix in the upstream as well.