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

keccakf1600 test fails with internal bitsize error #5687

Closed
michaeljklein opened this issue Aug 6, 2024 · 1 comment
Closed

keccakf1600 test fails with internal bitsize error #5687

michaeljklein opened this issue Aug 6, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@michaeljklein
Copy link
Contributor

Aim

Attempted to test _ hash function on 25 0's as part of #5614:

#[test]
fn keccakf1600_test() {
    let _ = solve_array_input_blackbox_call(
        [(FieldElement::zero(), false); 25].into(),
        25,
        keccakf1600_op,
    );
}

Expected Behavior

Expected the blackbox call to be solved successfully, constraining the 25 output witnesses to the results of the keccakf1600 function.

Bug

Solving panics on a bitsize assertion here:

---- keccakf1600_zeros stdout ----
thread 'keccakf1600_zeros' panicked at /Users/michaelklein/Coding/rust/noir/acvm-repo/acvm/src/pwg/blackbox/mod.rs:110:17:
assertion `left == right` failed
  left: 254
 right: 64

This seems to be a bug because I am calling the function on all FieldElement::zero()'s and the following assertion passes:

assert_eq!(FieldElement::zero().num_bits(), 0);

To Reproduce

Workaround

None

Workaround Description

No response

Additional Context

No response

Project Impact

None

Blocker Context

No response

Nargo Version

No response

NoirJS Version

No response

Proving Backend Tooling & Version

No response

Would you like to submit a PR for this Issue?

None

Support Needs

No response

@michaeljklein michaeljklein added the bug Something isn't working label Aug 6, 2024
@github-project-automation github-project-automation bot moved this to 📋 Backlog in Noir Aug 6, 2024
@michaeljklein
Copy link
Contributor Author

Maxim found that I was using the incorrect max number of bits for ACVM constants: #5614

(Test now passing)

@github-project-automation github-project-automation bot moved this from 📋 Backlog to ✅ Done in Noir Aug 22, 2024
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
Archived in project
Development

No branches or pull requests

1 participant