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

Nargo proofs should be specified in the Nargo.toml #2222

Closed
Tracked by #2441
phated opened this issue Aug 8, 2023 · 2 comments · Fixed by AztecProtocol/aztec-packages#6320
Closed
Tracked by #2441

Nargo proofs should be specified in the Nargo.toml #2222

phated opened this issue Aug 8, 2023 · 2 comments · Fixed by AztecProtocol/aztec-packages#6320
Labels
enhancement New feature or request

Comments

@phated
Copy link
Contributor

phated commented Aug 8, 2023

Problem

Currently, creating multiple proofs with different inputs requires changing the Prover.toml file or creating many files and using the --prover-name flag. The latter leads to a proliferation of toml files in a project.

Instead of separate toml files, we should think about "proofs" the same way that cargo thinks about "examples" in that you specify zero or more [[examples]] in your Cargo.toml and you can run a specific example with cargo run --example [NAME]. We should allow zero or more [[proofs]] to be specified in the Nargo.toml and then allow --proof on the appropriate commands to select one proof by name.

The above also pairs nicely with workspaces, such that you could do nargo prove --package foobar --proof first-proof without needing to worry about resolving a filepath from inside a workspace package.

Happy Case

Proofs are specified in the Nargo.toml, reducing proliferation of toml files in projects.

Alternatives Considered

We also considered taking proof data from stdin, but that doesn't work well with the concept of workspaces.

And we considered an interactive session to take inputs, but that doesn't fit with the mental model of these being examples with inputs that the user might not have easily (e.g. the result of some hashing function).

Additional Context

No response

Would you like to submit a PR for this Issue?

Yes

Support Needs

No response

@phated phated added the enhancement New feature or request label Aug 8, 2023
@github-project-automation github-project-automation bot moved this to 📋 Backlog in Noir Aug 8, 2023
@phated phated self-assigned this Aug 18, 2023
@kevaundray
Copy link
Contributor

I don't really understand this sentence "Proofs are specified in the Nargo.toml," -- from the rest of the paragraph, I think this means that the inputs to a Noir program should now be specified in the Nargo.toml with a particular name for each group of inputs.

  • Perhaps you could show a pseudo structure and pseudo Nargo.toml to help me understand?
  • Can you speak to how this idea meshes with adding the ability for users to provide inputs to a Noir program via the CLI?

@Savio-Sou
Copy link
Collaborator

I think this means that the inputs to a Noir program should now be specified in the Nargo.toml
That'd be my interpretation as well.

Assigning P-LOW for now as this seems to be a file structuring nice to have that is not blocking any works.

Guessing E-LOW.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

3 participants