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

Circuit compute_c reduce constraints #97

Merged
merged 4 commits into from
May 20, 2024
Merged

Circuit compute_c reduce constraints #97

merged 4 commits into from
May 20, 2024

Conversation

arnaucube
Copy link
Collaborator

@arnaucube arnaucube commented May 14, 2024

  • migrate from C: CurveGroup to F: PrimeField in hypernova & ccs when curve whas not needed to simplify the code
  • refactor test of compute_c circuit to use multiple LCCCS&CCCS instances
  • refactor hypernova's compute_c_gadget circuit (old compute_c_from_sigmas_and_thetas) to a more circuit-friendly approach

Now when folding for example 32 LCCCS and 42 CCCS instances in a single fold, the circuit got reduced from 110635 to 553 constraints (~200x reduction).

@arnaucube arnaucube requested a review from dmpierre May 14, 2024 08:58
@arnaucube arnaucube changed the title Circuit compute c reduce constraints Circuit compute_c reduce constraints May 15, 2024
Copy link
Collaborator

@dmpierre dmpierre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice reduction on the number of constraints, it indeed makes much more sense to do it this way. I have a question on the computation of c however!

folding-schemes/src/folding/hypernova/circuit.rs Outdated Show resolved Hide resolved
folding-schemes/src/folding/hypernova/circuit.rs Outdated Show resolved Hide resolved
Copy link
Collaborator

@dmpierre dmpierre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@arnaucube arnaucube added this pull request to the merge queue May 20, 2024
Merged via the queue into main with commit 74d12a6 May 20, 2024
5 checks passed
arnaucube added a commit that referenced this pull request May 20, 2024
* migrate from CurveGroup to PrimeField in hypernova & ccs when curve whas not needed to simplify the code

* refactor test of compute_c circuit to use multiple lcccs&cccs instances

* refactor hypernova's compute_c circuit to reduce from `110635` to `553` constraints

* apply review nits
arnaucube added a commit that referenced this pull request May 20, 2024
* migrate from CurveGroup to PrimeField in hypernova & ccs when curve whas not needed to simplify the code

* refactor test of compute_c circuit to use multiple lcccs&cccs instances

* refactor hypernova's compute_c circuit to reduce from `110635` to `553` constraints

* apply review nits

* fix clippy lints after rust-toolchain v1.76.0
@arnaucube arnaucube deleted the circuit-compute-c branch May 23, 2024 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants