noir-lang / noir

Noir is a domain specific language for zero knowledge proofs
https://noir-lang.org
Apache License 2.0
824 stars 178 forks source link

Hex encoded field elements in Prover.toml > u128 throws w/ unhelpful message #3436

Open colinnielsen opened 8 months ago

colinnielsen commented 8 months ago

Aim

When:

What: Since the target type is > u120, the toml parser crashes.

Screenshot 2023-11-06 at 1 39 50 PM

Workaround: Stringify the inputs

Screenshot 2023-11-06 at 1 41 33 PM

Expected Behavior

Nargo should parse the inputs as big integers OR have a the error message ask the user to stringify fields.

Bug

.

To Reproduce

  1. git clone git@github.com:colinnielsen/noir-field-parsing.git
  2. cd noir-field-parsing
  3. nargo execute

Installation Method

Binary

Nargo Version

0.17.0+b6819f6261e63cea3e653a1b874727a2b5919f5e

Additional Context

No response

Would you like to submit a PR for this Issue?

No

Support Needs

No response

Savio-Sou commented 4 months ago

Possibly similar to https://github.com/noir-lang/noir/issues/2456#issuecomment-1894048525, where the culprit was TOML can only hold numeric values up to i64; anything larger needs to be a hex / string.