You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We're then including a keccak256 constraint which needs to be proven with a whopping 21553 gates. This is unnecessary as we can bake in this knowledge at compile time, this circuit should instead just assign the return witnesses to the expected values without performing the hash.
Happy Case
We should add an logic in simplify_call so that if we have a black box function with all constant inputs then we simplify it to the black box function's outputs.
Problem
Consider the Noir program
This currently results in the ACIR
We're then including a keccak256 constraint which needs to be proven with a whopping 21553 gates. This is unnecessary as we can bake in this knowledge at compile time, this circuit should instead just assign the return witnesses to the expected values without performing the hash.
Happy Case
We should add an logic in
simplify_call
so that if we have a black box function with all constant inputs then we simplify it to the black box function's outputs.noir/crates/noirc_evaluator/src/ssa_refactor/ir/instruction.rs
Line 390 in 720b1be
Alternatives Considered
No response
Additional Context
Some black box functions rely on the backend to provide a value so we cannot perform this optimisation for them currently.
Would you like to submit a PR for this Issue?
Yes
Support Needs
No response
The text was updated successfully, but these errors were encountered: