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

fix: Open contract functions are unconstrained #2052

Merged
merged 1 commit into from
Jul 26, 2023

Conversation

sirasistant
Copy link
Contributor

@sirasistant sirasistant commented Jul 26, 2023

Description

Problem*

Open functions are unconstrained since they are run inside a public (open) VM, not as a private circuit. Make the function unconstrained if it has a contracttype "open"

Summary*

Documentation

  • This PR requires documentation updates when merged.

    • I will submit a noir-lang/docs PR.
    • I will request for and support Dev Rel's help in documenting this PR.

Additional Context

PR Checklist*

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

@sirasistant sirasistant requested review from jfecher and vezenovm July 26, 2023 13:58
@sirasistant sirasistant changed the title feat: Open contract functions are unconstrained fix: Open contract functions are unconstrained Jul 26, 2023
@vezenovm
Copy link
Contributor

@sirasistant Should we enforce that open functions need to also have an unconstrained keyword? So that the barrier b/w unconstrained and constrained is clear?

@sirasistant
Copy link
Contributor Author

At least in aztec that would be confusing for the user because open functions will be "constrained" by a VM that will run them. Maybe when we abstract noir contracts we can think more about it though, but for aztec this will always be the case

@kevaundray
Copy link
Contributor

Can you add a comment to this issue: #1168 ?

Hmm whats the difference between unconstrained and open then in the context of Noir?

@sirasistant
Copy link
Contributor Author

Only the resulting ABI type would be different

@kevaundray kevaundray added this pull request to the merge queue Jul 26, 2023
Merged via the queue into master with commit be44c7b Jul 26, 2023
@kevaundray kevaundray deleted the arv/open_to_brillig branch July 26, 2023 14:49
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.

3 participants