You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We (https://github.com/FuzzingLabs) find that the compiler fails to raise overflow errors at compilation while adding/subtracting two constants together.
Expected Behavior
The documentation explicitly states that this particular error occurs during the creation of a proof of correct execution. However, it's important to note that Noir language closely resembles Rust, and in this case, such errors are raised during the compilation process.
Bug
Create a Noir project with the following command: nargo new test_issue
Compile the project using the following command: nargo compile
fnmain(){// No error is raised if all static values are less than u8 maxlet var1:u8 = 255 + 1;// Similarly, no error is raised when using a variable with a static valuelet var:u8 = 255;let var2:u8 = var + var;// This also applies in the negative direction and other integer typeslet var3:i64 = -18446744073709551616 - 1;}
To Reproduce
No response
Installation Method
None
Nargo Version
No response
Additional Context
No response
Would you like to submit a PR for this Issue?
No
Support Needs
No response
The text was updated successfully, but these errors were encountered:
Note that this behaviour is by design such that tests will still produce println output. We previously would halt compilation and return an error but that resulted in poor UX as shown in #3207.
We could restore this behaviour but would have to add an allow_unsatisfiable parameter to force creation of an invalid circuit for tests.
Aim
We (https://github.com/FuzzingLabs) find that the compiler fails to raise overflow errors at compilation while adding/subtracting two constants together.
Expected Behavior
The documentation explicitly states that this particular error occurs during the creation of a proof of correct execution. However, it's important to note that Noir language closely resembles Rust, and in this case, such errors are raised during the compilation process.
Bug
nargo new test_issue
nargo compile
To Reproduce
No response
Installation Method
None
Nargo Version
No response
Additional Context
No response
Would you like to submit a PR for this Issue?
No
Support Needs
No response
The text was updated successfully, but these errors were encountered: