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

Deprecate the #[recursive] attribute from functions #6185

Closed
TomAFrench opened this issue Sep 30, 2024 · 1 comment · Fixed by AztecProtocol/aztec-packages#9479
Closed

Deprecate the #[recursive] attribute from functions #6185

TomAFrench opened this issue Sep 30, 2024 · 1 comment · Fixed by AztecProtocol/aztec-packages#9479
Assignees

Comments

@TomAFrench
Copy link
Member

This attribute was added at the point where barretenberg was compiled into nargo and so we needed a way inside of Noir to specify whether nargo prove should generate a recursive proof. As this is no longer the case it makes more sense to allow the user to generate different types of proof by selecting this on the CLI when interacting with their chosen backend.

We should deprecate this attribute and remove it so we don't need to track what kind of proof to generate inside of the Noir program artifact.

@github-project-automation github-project-automation bot moved this to 📋 Backlog in Noir Sep 30, 2024
@TomAFrench
Copy link
Member Author

This is going to be a pretty decently sized breaking change as we're going to have to:

  • update the bb.js interface to allow passing in whether to generate a recursive or keccak proof
    • Update noir_js_backend_barretenberg to match.
  • ditto for the bb interface (this only applies to the plonk commands as the honk commands are already split)
  • Remove the recursive flag from the Circuit struct which will break serialization format.
    • can be avoided by leaving a dummy field in the Circuit struct but we might as well tackle it at the same time.

@github-project-automation github-project-automation bot moved this from 📋 Backlog to ✅ Done in Noir Nov 1, 2024
AztecBot pushed a commit to AztecProtocol/barretenberg that referenced this issue Nov 2, 2024
…(#9479)

Resolves noir-lang/noir#6185

* Remove the `recursive` field from ACIR formats and the `Circuit`
definition
* Add `--recursive` to `bb` CLI
* Add `recursive` to `main.ts`, the backend API and Wasm

This is effectively undoing a lot of what was done
[here](AztecProtocol/aztec-packages@9c965a7#diff-2b9fe3a6f248b96aefc37782cc4c321567eed5dd10ab24472620a68c0fb4506bR29).
Interestingly there many more Wasm methods that need the `recursive`
parameter now: whereas previously only `acir_create_proof` and
`acir_verify_proof` used it, now anything that calls `create_circuit`
needs it because circuit creation builds all the constraints already,
which depend on this.

TODO:
- [x] Remove the `#[recursive]` attribute from Noir
- [x] Should the "prove and verify" methods that return nothing have a
recursive parameter?
- [x] Remove `#[recursive]` from `noir-protocol-circuits`
- [x] Update `bb-prover` where it uses uses `noir-protocol-circuits` to
use the correct `recursive` flag
- [x] Add `--recursive` to `cli.ts` under `bb-prover`
- [x] Check all calls to `executeBB` and pass `--recursive` if it calls
a `bb` command that needs it

---------

Co-authored-by: Tom French <[email protected]>
Co-authored-by: Tom French <[email protected]>
AztecBot pushed a commit to AztecProtocol/aztec-nr that referenced this issue Nov 2, 2024
…(#9479)

Resolves noir-lang/noir#6185

* Remove the `recursive` field from ACIR formats and the `Circuit`
definition
* Add `--recursive` to `bb` CLI
* Add `recursive` to `main.ts`, the backend API and Wasm

This is effectively undoing a lot of what was done
[here](AztecProtocol/aztec-packages@9c965a7#diff-2b9fe3a6f248b96aefc37782cc4c321567eed5dd10ab24472620a68c0fb4506bR29).
Interestingly there many more Wasm methods that need the `recursive`
parameter now: whereas previously only `acir_create_proof` and
`acir_verify_proof` used it, now anything that calls `create_circuit`
needs it because circuit creation builds all the constraints already,
which depend on this.

TODO:
- [x] Remove the `#[recursive]` attribute from Noir
- [x] Should the "prove and verify" methods that return nothing have a
recursive parameter?
- [x] Remove `#[recursive]` from `noir-protocol-circuits`
- [x] Update `bb-prover` where it uses uses `noir-protocol-circuits` to
use the correct `recursive` flag
- [x] Add `--recursive` to `cli.ts` under `bb-prover`
- [x] Check all calls to `executeBB` and pass `--recursive` if it calls
a `bb` command that needs it

---------

Co-authored-by: Tom French <[email protected]>
Co-authored-by: Tom French <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

2 participants