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

Passing arrays from memory into brillig adds constraints #4262

Closed
TomAFrench opened this issue Feb 5, 2024 · 0 comments · Fixed by AztecProtocol/aztec-packages#4460
Closed

Comments

@TomAFrench
Copy link
Member

TomAFrench commented Feb 5, 2024

Copying across from DMs:

The core of the problem is that we've got an array in memory which we want to push across to brillig, however brillig only accepts inputs from the witness map. This means that whenever we want to send this array across the brillig boundary we need to read the entire array from memory (as we could have written to arbitrary indices since the last time we read from memory).

This issue is stemming from the fact that we want to pass values in memory to the brillig VM however the only method we have to do this is by reading every single value out of memory and into the witness map which ends up creating a boatload of constraints.

Originally posted by @TomAFrench in #4244 (comment)

@github-project-automation github-project-automation bot moved this to 📋 Backlog in Noir Feb 5, 2024
TomAFrench added a commit to AztecProtocol/aztec-packages that referenced this issue Feb 6, 2024
This PR allows the `BrilligSolver` to read inputs directly from ACIR
memory. This allows us to remove constraints which are generated purely
to load values out of memory to pass into ACIR.

Resolves noir-lang/noir#4262
@github-project-automation github-project-automation bot moved this from 📋 Backlog to ✅ Done in Noir Feb 6, 2024
AztecBot pushed a commit to AztecProtocol/barretenberg that referenced this issue Feb 7, 2024
This PR allows the `BrilligSolver` to read inputs directly from ACIR
memory. This allows us to remove constraints which are generated purely
to load values out of memory to pass into ACIR.

Resolves noir-lang/noir#4262
TomAFrench added a commit to AztecProtocol/aztec-packages that referenced this issue Feb 7, 2024
This PR allows the `BrilligSolver` to read inputs directly from ACIR
memory. This allows us to remove constraints which are generated purely
to load values out of memory to pass into ACIR.

Resolves noir-lang/noir#4262
michaelelliot pushed a commit to Swoir/noir_rs that referenced this issue Feb 28, 2024
…l#4460)

This PR allows the `BrilligSolver` to read inputs directly from ACIR
memory. This allows us to remove constraints which are generated purely
to load values out of memory to pass into ACIR.

Resolves noir-lang/noir#4262
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant