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

[Bug] Negative signed integer in the input causes input parsing error #2812

Open
queretareu opened this issue Oct 11, 2023 · 0 comments
Open
Labels
bug Something isn't working

Comments

@queretareu
Copy link

🐛 Bug Report

When providing a negative signed integer as input in the input file, Leo fails to parse the input file and throws an error.

Steps to Reproduce

Run the following piece of code:

leo new hello
cd hello
cat <<EOF > src/main.leo
program hello.aleo {
 transition main(public a: i32, b: i32) {
      let c: i32 = a + b;
      assert(c == 0i32);
  }
}
EOF
cat << EOF > inputs/hello.in
[main]
public a: i32 = -1i32;
b: i32 = 1i32
EOF
leo execute

Code snippet to reproduce

Source code in src/main.leo:

program hello.aleo {
 transition main(public a: i32, b: i32) {
      let c: i32 = a + b;
      assert(c == 0i32);
  }
}

Input file in inputs/hello.in:

[main]
public a: i32 = -1i32;
b: i32 = 1i32

Stack trace & error message

       Leo ✅ Compiled 'main.leo' into Aleo instructions
Warning: Failed to parse input file

Error [ECLI0377018]: Failed to execute the `execute` command.
SnarkVM Error: 'hello.aleo/main' expects 2 inputs, but 0 were provided.

Expected Behavior

The input file should be parsed successfully and the program should execute without any errors.

Your Environment

Leo version: leo 1.9.4
Rust version: cargo 1.70.0 (ec8a8a0ca 2023-04-25)
OS: Ubuntu 22.04 LTS

@queretareu queretareu added the bug Something isn't working label Oct 11, 2023
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
Development

No branches or pull requests

1 participant