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

ACVM JS: Handle executing multiple circuits #4645

Closed
Tracked by #4426
vezenovm opened this issue Mar 26, 2024 · 0 comments · Fixed by #4694
Closed
Tracked by #4426

ACVM JS: Handle executing multiple circuits #4645

vezenovm opened this issue Mar 26, 2024 · 0 comments · Fixed by #4694
Labels
ACIR/ACVM enhancement New feature or request js Noir's JavaScript packages

Comments

@vezenovm
Copy link
Contributor

Problem

This PR AztecProtocol/aztec-packages#5380 updates our native ACVM to handle execution of multiple circuits. ACVM JS has a separate executor due to its usage of futures/promises that is not needed in nargo. ACVM JS should match our native ACVM in its ability to execute multiple ACIR functions rather than just a single ACIR function as is done currently.

Happy Case

executeCircuitWithBlackBoxSolver and any other respective methods that deserialize a byte array input into a Program should handle a full ACIR program appropriately.

Project Impact

None

Impact Context

No response

Workaround

None

Workaround Description

No response

Additional Context

No response

Would you like to submit a PR for this Issue?

None

Support Needs

No response

@vezenovm vezenovm added enhancement New feature or request ACIR/ACVM js Noir's JavaScript packages labels Mar 26, 2024
@github-project-automation github-project-automation bot moved this to 📋 Backlog in Noir Mar 26, 2024
github-merge-queue bot pushed a commit that referenced this issue Apr 3, 2024
# Description

## Problem\*

Resolves #4645 

## Summary\*

In order to have a recursive `execute_circuit` function we now have a
recursive async call. This requires boxing a future and having to making
`execute_circuit` immutable in order to attach the final main witness to
the witness stack. In our normal execution flow we could move the
`ProgramExecutor` after our recursive async call to execute_circuit, we
now need a lifetime on `self`.

I also switched all `execute_circuit` methods in ACVM JS to use
`execute_program` under the hood so that we do not have a breaking
change yet but can still test `execute_program` using all of our already
existing tests.

I then added a couple extra acvm js tests for multiple acir calls and
full witness stack (de)/compression.

## Additional Context



## Documentation\*

Check one:
- [ ] No documentation needed.
- [ ] Documentation included in this PR.
- [X] **[For Experimental Features]** 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.

---------

Co-authored-by: Tom French <tom@tomfren.ch>
@github-project-automation github-project-automation bot moved this from 📋 Backlog to ✅ Done in Noir Apr 3, 2024
TomAFrench added a commit that referenced this issue Apr 3, 2024
# Description

## Problem\*

Resolves #4645 

## Summary\*

In order to have a recursive `execute_circuit` function we now have a
recursive async call. This requires boxing a future and having to making
`execute_circuit` immutable in order to attach the final main witness to
the witness stack. In our normal execution flow we could move the
`ProgramExecutor` after our recursive async call to execute_circuit, we
now need a lifetime on `self`.

I also switched all `execute_circuit` methods in ACVM JS to use
`execute_program` under the hood so that we do not have a breaking
change yet but can still test `execute_program` using all of our already
existing tests.

I then added a couple extra acvm js tests for multiple acir calls and
full witness stack (de)/compression.

## Additional Context



## Documentation\*

Check one:
- [ ] No documentation needed.
- [ ] Documentation included in this PR.
- [X] **[For Experimental Features]** 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.

---------

Co-authored-by: Tom French <tom@tomfren.ch>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ACIR/ACVM enhancement New feature or request js Noir's JavaScript packages
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant