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

ACIR gen panics if it tries to run a known at compile time brillig that calls blackboxes #3865

Closed
sirasistant opened this issue Dec 19, 2023 · 0 comments · Fixed by #3866
Closed
Labels
bug Something isn't working

Comments

@sirasistant
Copy link
Contributor

Aim

Minimal reproduction:

unconstrained fn pedersen(a: Field) -> Field {
    dep::std::hash::pedersen_hash([a])
}

fn main() -> pub Field {
    pedersen(27)
}

Expected Behavior

nargo compile should not panic

Bug

The application panicked (crashed).
Message: not implemented: PedersenHash is not supported
Location: compiler/noirc_evaluator/src/ssa/acir_gen/acir_ir/acir_variable.rs:1622

To Reproduce

Installation Method

None

Nargo Version

No response

Additional Context

No response

Would you like to submit a PR for this Issue?

Yes

Support Needs

No response

@sirasistant sirasistant added the bug Something isn't working label Dec 19, 2023
@github-project-automation github-project-automation bot moved this to 📋 Backlog in Noir Dec 19, 2023
github-merge-queue bot pushed a commit that referenced this issue Dec 19, 2023
# Description

## Problem\*

Resolves #3865

## Summary\*



## Additional Context



## Documentation\*

Check one:
- [ ] No documentation needed.
- [ ] Documentation included in this PR.
- [ ] **[Exceptional Case]** Documentation to be submitted in a separate
PR.

# PR Checklist\*

- [x] I have tested the changes locally.
- [x] I have formatted the changes with [Prettier](https://prettier.io/)
and/or `cargo fmt` on default settings.
@github-project-automation github-project-automation bot moved this from 📋 Backlog to ✅ Done in Noir Dec 19, 2023
github-merge-queue bot pushed a commit that referenced this issue Dec 19, 2023
…r` (#3874)

# Description

## Problem\*

Resolves <!-- Link to GitHub Issue -->

## Summary\*

This PR renames `barretenberg_blackbox_solver` to
`bn254_blackbox_solver` and marks it as not deprecated.

This signifies that these blackbox solvers should work against all
backends targetting the bn254 curve and not just barretenberg. That
we're using barretenberg to solve them is then just an implementation
detail.

We've decided to retain the `BlackBoxFunctionSolver` trait to allow
these solvers to be swapped out based on the `FieldElement`
implementation and so the new `Bn254BlackBoxSolver` is not deprecated.


## Additional Context

Now that this solver is tied to a curve rather than a particular
backend, it's now proper to integrate it into the compiler such that we
can solve black box functions such as that which caused #3865

## Documentation\*

Check one:
- [x] No documentation needed.
- [ ] Documentation included in this PR.
- [ ] **[Exceptional Case]** Documentation to be submitted in a separate
PR.

# PR Checklist\*

- [x] I have tested the changes locally.
- [x] I have formatted the changes with [Prettier](https://prettier.io/)
and/or `cargo fmt` on default settings.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant