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

Accurately resolve constants in functions marked with #[no_predicates] #5672

Open
vezenovm opened this issue Aug 2, 2024 · 0 comments
Open
Labels
bug Something isn't working

Comments

@vezenovm
Copy link
Contributor

vezenovm commented Aug 2, 2024

Aim

I want to apply no_predicates to pedersen_commitment for example as in this issue e.g #5633.

Expected Behavior

assert_constant should be valid if we pass a constant as inputs to a no_predicates function.

Bug

After the addition of the no_predicates attribute we delay inlining of some functions. However, some passes are reliant on inlining having occurred. Such as a evaluate_static_assert_and_assert_constant, which in the case of an non-inlined function will assert on a parameter that a constant is expected. This errors as expected as we are unable to tell what is constant until we have inlined all the function calls.

To Reproduce

  1. Add back assert_constant as was removed here fix: workaround from_slice with nested slices #5648 inside of derive_generators in the stdlib.
  2. Compile noir from source: noirup -p .
  3. Run the program in issue Cannot apply no_predicates to the noir implementation of pedersen_hash/pedersen_commitment #5633

Workaround

Yes

Workaround Description

The workaround is in #5648 but it is not addressing the true solution.

Additional Context

No response

Project Impact

None

Blocker Context

No response

Nargo Version

No response

NoirJS Version

No response

Proving Backend Tooling & Version

No response

Would you like to submit a PR for this Issue?

None

Support Needs

No response

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
Status: 📋 Backlog
Development

No branches or pull requests

1 participant