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

feat!: disallow calling unconstrained functions outside of unsafe blocks and passing unconstrained functions in place of constrained functions #6938

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

TomAFrench
Copy link
Member

…ocks and passing unconstrained functions in place of constrained function

Description

Problem*

Resolves #6937

Summary*

These have been around for a long time now so I'm promoting this to an error.

Additional Context

Documentation*

Check one:

  • No documentation needed.
  • Documentation included in this PR.
  • [For Experimental Features] Documentation to be submitted in a separate PR.

PR Checklist*

  • I have tested the changes locally.
  • I have formatted the changes with Prettier and/or cargo fmt on default settings.

…ocks and passing unconstrained functions in place of constrained function
@TomAFrench TomAFrench changed the title feat: disallow calling unconstrained functions outside of unsafe bl… feat: disallow calling unconstrained functions outside of unsafe blocks and passing unconstrained functions in place of constrained function Jan 3, 2025
@TomAFrench TomAFrench changed the title feat: disallow calling unconstrained functions outside of unsafe blocks and passing unconstrained functions in place of constrained function feat: disallow calling unconstrained functions outside of unsafe blocks and passing unconstrained functions in place of constrained functions Jan 3, 2025
Copy link
Contributor

github-actions bot commented Jan 3, 2025

Execution Report

Program Execution Time %
sha256_regression 0.054s 0%
regression_4709 0.001s 0%
ram_blowup_regression 0.600s 4%
rollup-root 0.105s -4%
rollup-block-merge 0.106s 0%
rollup-base-public 1.218s 0%
rollup-base-private 0.465s 0%
private-kernel-tail 0.022s 4%
private-kernel-reset 0.348s 0%
private-kernel-inner 0.077s -7%

Copy link
Contributor

github-actions bot commented Jan 3, 2025

Compilation Report

Program Compilation Time %
sha256_regression 1.352s 3%
regression_4709 0.826s 3%
ram_blowup_regression 18.860s 2%
rollup-root 3.374s -7%
rollup-block-merge 3.524s 2%
rollup-base-public 37.380s 7%
rollup-base-private 12.380s 1%
private-kernel-tail 1.050s 8%
private-kernel-reset 8.402s 0%
private-kernel-inner 2.074s -9%

Copy link
Contributor

github-actions bot commented Jan 3, 2025

Compilation Memory Report

Program Peak Memory
keccak256 78.11M
workspace 123.42M
regression_4709 422.96M
ram_blowup_regression 1.58G
rollup-base-public 4.11G
rollup-base-private 1.20G
private-kernel-tail 207.17M
private-kernel-reset 730.59M
private-kernel-inner 294.40M

Copy link
Contributor

github-actions bot commented Jan 3, 2025

Execution Memory Report

Program Peak Memory
keccak256 74.65M
workspace 123.68M
regression_4709 315.98M
ram_blowup_regression 512.41M
rollup-base-public 480.66M
rollup-base-private 326.51M
private-kernel-tail 181.02M
private-kernel-reset 249.69M
private-kernel-inner 209.86M

@TomAFrench
Copy link
Member Author

@kashbrti can you address these failures in the noir libraries on monday?

@Savio-Sou
Copy link
Collaborator

Would this be a breaking change? (It isn't currently indicated as one.)

@TomAFrench TomAFrench changed the title feat: disallow calling unconstrained functions outside of unsafe blocks and passing unconstrained functions in place of constrained functions feat!: disallow calling unconstrained functions outside of unsafe blocks and passing unconstrained functions in place of constrained functions Jan 6, 2025
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

Successfully merging this pull request may close these issues.

Convert TypecheckError::Unsafe and TypecheckError::UnsafeFn to errors
3 participants