-
Notifications
You must be signed in to change notification settings - Fork 233
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Switch Noir JS to use execute program instead of circuit (#4965)
# Description ## Problem\* Resolves #4706 ## Summary\* This PR actually does not do too much as we still use `executeCircuitWithBlackBoxSolver` throughout the ACIR simulator on aztec. That should be removed separately before we look to remove it from ACVM JS. Noir JS backend also needs to wait for the barretenberg interface updates before we can pass a collection of circuits to the backend. ## 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](https://prettier.io/) and/or `cargo fmt` on default settings.
- Loading branch information
Showing
7 changed files
with
67 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
tooling/noir_js/test/noir_compiled_examples/fold_fibonacci/Nargo.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[package] | ||
name = "fold_fibonacci" | ||
type = "bin" | ||
authors = [""] | ||
compiler_version = ">=0.28.0" | ||
|
||
[dependencies] |
12 changes: 12 additions & 0 deletions
12
tooling/noir_js/test/noir_compiled_examples/fold_fibonacci/src/main.nr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
fn main(x: u32) { | ||
assert(fibonacci(x) == 55); | ||
} | ||
|
||
#[fold] | ||
fn fibonacci(x: u32) -> u32 { | ||
if x <= 1 { | ||
x | ||
} else { | ||
fibonacci(x - 1) + fibonacci(x - 2) | ||
} | ||
} |