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 1 commit 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.590s -1%
regression_4709 0.390s -2%
ram_blowup_regression 3.855s -1%
rollup-root 2.121s -3%
rollup-block-merge 2.110s -4%
rollup-base-public 35.225s 1%
rollup-base-private 31.550s -1%
private-kernel-tail 0.787s 4%
private-kernel-reset 2.187s 1%
private-kernel-inner 1.206s -1%
parity-root 0.547s 4%

Copy link
Contributor

github-actions bot commented Jan 3, 2025

Compilation Report

Program Compilation Time %
sha256_regression 1.337s -4%
regression_4709 0.782s -3%
ram_blowup_regression 15.021s -2%
rollup-root 3.885s -1%
rollup-block-merge 3.621s -16%
rollup-base-public 122.470s 8%
rollup-base-private 97.168s 0%
private-kernel-tail 1.068s 3%
private-kernel-reset 7.624s 5%
private-kernel-inner 2.076s 0%
parity-root 0.816s 13%
noir-contracts 15.780s -82%

Copy link
Contributor

github-actions bot commented Jan 3, 2025

Compilation Memory Report

Program Peak Memory
keccak256 78.48M
workspace 123.20M
regression_4709 422.91M
ram_blowup_regression 1.58G
rollup-base-public 10.47G
rollup-base-private 6.57G
private-kernel-tail 201.78M
private-kernel-reset 717.04M
private-kernel-inner 291.85M
parity-root 172.11M

Copy link
Contributor

github-actions bot commented Jan 3, 2025

Execution Memory Report

Program Peak Memory
keccak256 74.61M
workspace 123.82M
regression_4709 315.92M
ram_blowup_regression 512.47M
rollup-base-public 3.05G
rollup-base-private 2.97G
private-kernel-tail 181.15M
private-kernel-reset 255.23M
private-kernel-inner 214.34M
parity-root 155.76M

@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