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

perf: optimize Pedersen and IPA commitments gadgets #201

Open
wants to merge 2 commits into
base: decider-circuits-bench
Choose a base branch
from

Conversation

yelhousni
Copy link
Contributor

@yelhousni yelhousni commented Jan 29, 2025

Description

This PR optimizes Pedersen and IPA commitments gadgets, through the use of joint_scalar_mul_be and scalar_mul_le implemented here arnaucube/ark-r1cs-std#1.

Benchmark

  • The Pedersen check circuit goes from 3,575,519 r1cs to 2,455,364 r1cs.
  • The IPA verify circuit also goes from 77,175 r1cs to 73,367 r1cs.

@yelhousni yelhousni changed the title perf: otimize Pedersen commitment perf: optimize Pedersen and IPA commitments gadgets Jan 30, 2025
@arnaucube
Copy link
Collaborator

This is really great!

Over these past couple of months, Sonobe was updated to use arkworks v0.5.0, which slightly changes the types, but I think that will have not much affect to the changes of this PR, but it might affect more the fork of r1cs-std.

How would you see on doing the following?

Alternatively we can merge the current PR (since it points to the branch decider-circuit-bench) and then update that branch to latest Sonobe main, while in parallel porting the r1cs-std changes to the last arkworks-rs/r1cs-std version, but probably the above will be cleaner.

In any case, happy to do any option that it's easier and less time consuming for you. Thank you very much for this improvement!!! 🙌

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.

2 participants