-
Notifications
You must be signed in to change notification settings - Fork 219
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
Compiler error hashing a field #1842
Comments
@vezenovm can you verify if this is an issue with the new SSA code? |
@kevaundray Yeah I'll look into it |
With the addition of slices this brings a new, but easily solvable bug. use dep::std::hash;
fn main(thing : Field) {
let x = thing.to_le_bytes(8);
let chash = hash::keccak256(x, 8);
assert(chash[0] > 0 | chash[1] > 0);
}
#[test]
fn test_main() {
let thing = 123;
main(thing);
} For the new SSA this bug will can fixed in Noir by converting the output of |
@vezenovm we should probably wait, yes. There are slice related changes I'd like to merge as well that would be breaking changes or would require changing method signatures to fix old bugs. For example the |
Aim
I'm new to Noir and trying to learn more about how it works. My first example was just to attempt to hash a Field.
nargo check
succeeds just fine, but if I attempt to actually run the test or prove, I get the below compiler error.Expected Behavior
The test would run and field would be hashed (or show me the error of my ways)
Bug
To Reproduce
Try to run
nargo test
on the following circuit:Installation Method
Binary
Nargo Version
nargo 0.6.0 (git version hash: 0181813, is dirty: false)
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: