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 2 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.100s 0%
regression_4709 0.001s 0%
ram_blowup_regression 0.584s 0%
rollup-root 0.105s -1%
rollup-block-merge 0.105s 0%
rollup-base-public 1.430s -1%
rollup-base-private 0.650s -2%
private-kernel-tail 0.023s -5%
private-kernel-reset 0.390s -1%
private-kernel-inner 0.117s 0%

Copy link
Contributor

github-actions bot commented Jan 3, 2025

Compilation Report

Program Compilation Time
sha256_regression 1.358s
regression_4709 0.787s
ram_blowup_regression 15.060s
rollup-root 3.720s
rollup-block-merge 4.210s
rollup-base-public 29.700s
rollup-base-private 12.400s
private-kernel-tail 1.118s
private-kernel-reset 7.474s
private-kernel-inner 2.190s

Copy link
Contributor

github-actions bot commented Jan 3, 2025

Compilation Memory Report

Program Peak Memory
keccak256 78.50M
workspace 123.62M
regression_4709 422.91M
ram_blowup_regression 1.58G
rollup-base-public 2.55G
rollup-base-private 1.25G
private-kernel-tail 201.97M
private-kernel-reset 716.60M
private-kernel-inner 292.24M

Copy link
Contributor

github-actions bot commented Jan 3, 2025

Execution Memory Report

Program Peak Memory
keccak256 74.61M
workspace 123.78M
regression_4709 315.93M
ram_blowup_regression 512.47M
rollup-base-public 773.36M
rollup-base-private 424.92M
private-kernel-tail 182.01M
private-kernel-reset 255.59M
private-kernel-inner 215.19M

@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