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

Broken selector compression #321

Closed
ed255 opened this issue May 2, 2024 · 0 comments · Fixed by #322
Closed

Broken selector compression #321

ed255 opened this issue May 2, 2024 · 0 comments · Fixed by #322
Labels
bug Something isn't working

Comments

@ed255
Copy link
Member

ed255 commented May 2, 2024

I believe I broke the selector compression in this PR #290 via this commit eddbe95

I tried to split the selector to fixed process into two stages:

  1. Just update the ConstraintSystem (replace selectors in gates, lookups etc with selector expressions built from fixed columns)
  2. Transform assigned selectors to assigned fixed columns to be used for the selector expressions

For uncompressed selectors this works.
For compressed selectors this doesn't work, because step 1 requires the selector assignments to figure out how to build the selector expressions. Without the selector assignments the generated output is invalid.

There are a few reasons why this wasn't found in tests

  1. There was another bug. The merging of original fixed columns assignments and fixed-from-selector columns was wrong, leading to the fixed-from-selector columns to be in an unused offset. This was missing
    fixed.truncate(cs.num_fixed_columns - selector_polys.len());
  2. A test that catches (1) was not present, instead we found this via a failing example. See fix!: correct the compile_circuit #320

I can think of two possible solutions:
a. Revert the split of selector to fixed process to a single stage
b. Review the implementation of compile_selectors::process(...) and see if we can make it work without access to the selector assignments in the sage of updating the ConstraintSystem.

@ed255 ed255 added the bug Something isn't working label May 2, 2024
@ed255 ed255 linked a pull request May 7, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant