-
Notifications
You must be signed in to change notification settings - Fork 206
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(acvm): Execute multiple circuits (AztecProtocol/aztec-packages#5380
) Resolves #4428 This is a followup to AztecProtocol/aztec-packages#5341 which does the initial ACIR generation work for multiple ACIR functions. Execution is now done by moving `execute_circuit` to be part of a stateful `ProgramExecutor` that builds a witness stack for every completed `execute_circuit` call. An initial `execute_program` function instantiates the `ProgramExecutor` and starts execution on our `main` entry point circuit. When a `Call` opcode is reached we pause execution and recursively call `execute_circuit`, which then returns the solved witness for that call. We then resolve the outputs of that execution by reading the return witnesses from the inner solved witness. We then push the nested call solved witness onto the witness stack and continue execution of our main ACVM instance. This is quite similar to the process used by foreign calls with Brillig, except it is now done with the main ACVM rather than the contained Brillig VM. This witness stack and program (list of `Circuit` functions) then gets passed to the backend. For now, I have only done an additive `prove_and_verify_ultra_honk_program` to show the process working for the basic non-inlined ACIR programs supplied here. I wanted to leave any WASM exports or ACVM JS changes for a follow-up PR as they are quite a bit of changes on their own. --------- Co-authored-by: Tom French <[email protected]> Co-authored-by: Tom French <[email protected]> Co-authored-by: jfecher <[email protected]>
- Loading branch information
1 parent
0bc18c4
commit 9d150d9
Showing
69 changed files
with
1,238 additions
and
358 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
a18288d9b8f3057b9e79362d922da656dacf22a9 | ||
bb719200034e3bc6db09fb56538dadca4203abf4 |
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 |
---|---|---|
|
@@ -79,15 +79,6 @@ jobs: | |
- name: Install Yarn dependencies | ||
uses: ./.github/actions/setup | ||
|
||
- name: Install wasm-bindgen-cli | ||
uses: taiki-e/install-action@v2 | ||
with: | ||
tool: [email protected] | ||
|
||
- name: Install wasm-opt | ||
run: | | ||
npm i wasm-opt -g | ||
- name: Query new noir version | ||
id: noir-version | ||
run: | | ||
|
@@ -116,20 +107,17 @@ jobs: | |
if: ${{ always() }} | ||
|
||
needs: | ||
- release-please | ||
- update-acvm-workspace-package-versions | ||
- update-docs | ||
|
||
env: | ||
# We treat any skipped or failing jobs as a failure for the workflow as a whole. | ||
FAIL: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') || contains(needs.*.result, 'skipped') }} | ||
FAIL: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') || contains(needs.*.result, 'skipped') } | ||
|
||
steps: | ||
- name: Add warning to sticky comment | ||
uses: marocchino/sticky-pull-request-comment@v2 | ||
with: | ||
# We need to specify the PR on which to make the comment as workflow is triggered by push. | ||
number: ${{ fromJSON(needs.release-please.outputs.release-pr).number }} | ||
# delete the comment in case failures have been fixed | ||
delete: ${{ !env.FAIL }} | ||
message: "The release workflow has not completed successfully. Releasing now will result in a broken release" | ||
|
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,4 +11,4 @@ pub mod ssa; | |
|
||
pub mod brillig; | ||
|
||
pub use ssa::create_circuit; | ||
pub use ssa::create_program; |
Oops, something went wrong.