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

Apply correct typing to return values of black box functions #775

Closed
Tracked by #1376
kevaundray opened this issue Feb 8, 2023 · 2 comments
Closed
Tracked by #1376

Apply correct typing to return values of black box functions #775

kevaundray opened this issue Feb 8, 2023 · 2 comments
Assignees
Labels
enhancement New feature or request refactor ssa

Comments

@kevaundray
Copy link
Contributor

Problem

Functions like merkle_check_membership will return a Field whereas we ideally want it to return a bool

Solution

  • The easiest solution would be to wrap the function in another function which does the correct typing using as.
  • Another solution is to change the types of those functions to be bool for example and then enforce that they are in the compiler

Alternatives considered

Additional context

@TomAFrench
Copy link
Member

Weren't we planning on avoiding passing in a root all together? (noir-lang/acvm#66)

@kevaundray
Copy link
Contributor Author

Weren't we planning on avoiding passing in a root all together? (noir-lang/acvm#66)

Yep you are correct; issue may have not been clear -- This is for all blackbox functions that we have implemented in Noir that should return booleans, but we've typed them as Field. So this would apply for signature verification functions too.

@kevaundray kevaundray closed this as not planned Won't fix, can't repro, duplicate, stale Jun 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request refactor ssa
Projects
None yet
Development

No branches or pull requests

3 participants