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 check is not just a check #700

Open
LHerskind opened this issue Jan 27, 2023 · 3 comments
Open

nargo check is not just a check #700

LHerskind opened this issue Jan 27, 2023 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@LHerskind
Copy link
Contributor

Description

The nargo check command is described as being a check of the contraint system, but running it will also generate a PROVER.toml and a VERIFIER.toml so it is not just a check

Aim

Run nargo check to check the contraint system for errors.

Expected behavior

Either return that no errors were found or give me some errors.

Bug

When executed a PROVER.toml and VERIFIER.toml is generated (iff they did not exist already).

Run nargo check in any noir project that don't have a PROVER.toml and VERIFIER.toml file.

Additional context

If PROVER.toml and VERIFIER.toml already exist, they are not overwritten even if there have been changes to the underlying circuit which if run from "fresh" would result in a PROVER.toml and VERIFIER.toml with other variables.

@LHerskind LHerskind added the bug Something isn't working label Jan 27, 2023
@kevaundray
Copy link
Contributor

Related to #1851 and #1940

@TomAFrench What are your thoughts on this?

@TomAFrench
Copy link
Member

I would agree with Lasse that this command is a little muddled. Looking at the check_crate_and_report_errors function which this command runs we have

/// Run the lexing, parsing, name resolution, and type checking passes and report any warnings
/// and errors found.

It's not clear why the Prover.toml and Verifier.toml come into that at all.

We also print Constraint system successfully built! despite no constraint system actually being built, we can include an assert(false) into our program and nargo check will still report a successfully built constraint system (I'd argue that for Noir users, a unsatisfiable constraint system is not a success).

We should pare back this command to just run the type checking, etc. to be Nargo's clippy and move the input file generation to a new/different command.

@kevaundray
Copy link
Contributor

@Ethan-000 assigning this task to you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
6 participants