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

Failed test for comparison gate #114

Closed
mrain opened this issue Aug 24, 2022 · 0 comments · Fixed by #115
Closed

Failed test for comparison gate #114

mrain opened this issue Aug 24, 2022 · 0 comments · Fixed by #115
Assignees

Comments

@mrain
Copy link
Contributor

mrain commented Aug 24, 2022

test gadgets::cmp::test::test_cmp_gates ... FAILED

failures:
---- gadgets::cmp::test::test_cmp_gates stdout ----
thread 'gadgets::cmp::test::test_cmp_gates' panicked at 'assertion failed: circuit.check_circuit_satisfiability(&[]).is_ok()', relation/src/gadgets/cmp.rs:232:9
stack backtrace:
   0: rust_begin_unwind
             at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:584:5
   1: core::panicking::panic_fmt
             at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/core/src/panicking.rs:142:14
   2: core::panicking::panic
             at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/core/src/panicking.rs:48:5
   3: jf_relation::gadgets::cmp::test::test_is_le
   4: core::ops::function::FnOnce::call_once
   5: core::ops::function::FnOnce::call_once
             at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/core/src/ops/function.rs:248:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.


failures:
    gadgets::cmp::test::test_cmp_gates

Corresponding error message:
Err(GateCheckFailure(373, "gate: Logic OR Gate, wire values: [Fp256(BigInteger256([0, 0, 0, 0])), Fp256(BigInteger256([0, 0, 0, 0])), Fp256(BigInteger256([0, 0, 0, 0])), Fp256(BigInteger256([0, 0, 0, 0])), Fp256(BigInteger256([0, 0, 0, 0]))], pub_input: Fp256 \"(0000000000000000000000000000000000000000000000000000000000000000)\", expected_gate_output: Fp256 \"(30644E72E131A029B85045B68181585D2833E84879B9709143E1F593F0000000)\", gate_output: Fp256 \"(0000000000000000000000000000000000000000000000000000000000000000)\""))

Suspected problem: logic_or should use LogicOrValueGate instead of LogicOrGate. Didn't implement test to cover this case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant