Skip to content

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

@phated

Description

@phated

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions