Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
huitseeker opened this issue Jan 15, 2024 · 1 comment
Labels
A-1 Proof Scaling bug Something isn't working help wanted Extra attention is needed

Comments

@huitseeker
Copy link
Member

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 :

  • apply the fix of Refactor Supernova benchmarks and config for CI #253 (checked_sub) to the nova bench,
  • find a way to keep constraint counts in sync, either by :
    • auto-detecting it, that is computing the augmentation constraint count at bench bootstrapping time, as the test does, or
    • at least having a script/tool checking the bench's constraint count is the same as our tests (for a specific choice of finite field),
@huitseeker huitseeker added bug Something isn't working help wanted Extra attention is needed A-1 Proof Scaling labels Jan 15, 2024
@huitseeker huitseeker changed the title Remove dependency (or automatically enforce it) in Nova benchmarks Remove dependency (or automatically enforce it) on constraint counts Nova benchmarks Jan 15, 2024
@srinathsetty
Copy link
Contributor

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.

huitseeker pushed a commit to huitseeker/arecibo that referenced this issue Jan 22, 2024
gabriel-barrett pushed a commit to gabriel-barrett/arecibo that referenced this issue Feb 9, 2024
* Simplify Group trait (argumentcomputer#259)

* simplify Group trait

* fix clippy

* further simplifications

* fix Copy

* Cut duplicate code (argumentcomputer#261)

* cut duplicate code

* bound --> bind for clarity

* expose asm feature

* test: check test_pp_digest with asm feature in CI

* expose size of the base field (argumentcomputer#262)

* fix: add mention of halo2curves issue explaining the problem

---------

Co-authored-by: Srinath Setty <srinath@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-1 Proof Scaling bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants