fix(frontend): Allow indirect calls to oracles from constrained functions #10826
fix(frontend): Allow indirect calls to oracles from constrained functions #10826
Conversation
…to af/10298-global-oracle
Changes to Brillig bytecode sizes
🧾 Summary (10% most significant diffs)
Full diff report 👇
|
Changes to number of Brillig opcodes executed
🧾 Summary (10% most significant diffs)
Full diff report 👇
|
There was a problem hiding this comment.
⚠️ Performance Alert ⚠️
Possible performance regression was detected for benchmark 'Test Suite Duration'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.20.
| Benchmark suite | Current: 4f8b5b7 | Previous: f6706c2 | Ratio |
|---|---|---|---|
test_report_zkpassport_noir_rsa_ |
1 s |
0 s |
+∞ |
This comment was automatically generated by workflow using github-action-benchmark.
CC: @TomAFrench
There was a problem hiding this comment.
⚠️ Performance Alert ⚠️
Possible performance regression was detected for benchmark 'Compilation Time'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.20.
| Benchmark suite | Current: 4f8b5b7 | Previous: f6706c2 | Ratio |
|---|---|---|---|
rollup-checkpoint-root-single-block |
511 s |
385 s |
1.33 |
This comment was automatically generated by workflow using github-action-benchmark.
CC: @TomAFrench
There was a problem hiding this comment.
⚠️ Performance Alert ⚠️
Possible performance regression was detected for benchmark 'Execution Time'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.20.
| Benchmark suite | Current: 9118a4a | Previous: d4150ea | Ratio |
|---|---|---|---|
rollup-block-root-single-tx |
0.003 s |
0.002 s |
1.50 |
rollup-root |
0.005 s |
0.004 s |
1.25 |
This comment was automatically generated by workflow using github-action-benchmark.
CC: @TomAFrench
Description
Problem
Amendment and replacement for #10822
Fixes #10298
As per the discussion in that PR, the lint we have to catch calls from constrained functions to oracles only works with expressions limited to calling a function directly, or via local variables (unless
mut), or globals. It does not work for calling an oracle indirectly via data structures.However, since the proxies pass has been updated to create an unconstrained proxy function for oracles used as values, we no longer have to deny indirect calls via the lint. By relaxing the lint for indirect the cases it handled (local and global variables), we can have a more consistent handling of the issue: we allow calls unless it's a direct call, which is not subject to wrapping into a proxy.
Summary
Changes the way we run
lints::oracle_called_from_constrained_functionto only be invoked if the callee has aDefinitionKind::Function, not when it's aLocalorGlobal.Additional Context
See the description of #10822 for other changes included in this PR.
User Documentation
Check one:
PR Checklist
cargo fmton default settings.