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

Improve efficiency of Range Check #25

Open
enricobottazzi opened this issue Feb 21, 2024 · 0 comments
Open

Improve efficiency of Range Check #25

enricobottazzi opened this issue Feb 21, 2024 · 0 comments

Comments

@enricobottazzi
Copy link
Member

enricobottazzi commented Feb 21, 2024

The biggest cost center of the circuit implementation revolves around calling the range_check function.

According to the design of halo2-lib it is not possible to fill up a lookup table with the desired values and perform the lookup. For example I want to constraint a polynomial to be in the range [0, 5] the only way to do that is to:

  • load a lookup table with using 3 as lookup_bits
  • perform a lookup that the value exist in the lookup table
  • check that the value is less than 6.

A more immediate approach would be to load the lookup table with values from 0 to 5 and just perform a lookup that the value exist in this lookup table. Unfortunately, halo2-lib doesn't allow that out of the box.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant