You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
An internal assert in the logic gates XOR and AND is failing for larger input (i.e. a BlsScarar crated from 4 large u64). The output seems to be correct.
To Reproduce
In constraint_system::logic::tests::test_logic_xor_and_constraint we only test rather small BlsScalars. Adding a test for larger values causes a panic in 'src/constraint_system/logic.rs:286:9' in the function 'logic_gate'
#[test]fnlogic_xor(){let res = gadget_tester(
|composer| {let a = BlsScalar::from_raw([0xffefffff00000001,0x53bda402fffe5bfe,0x3319d80809a1d805,0x73eda758299d7d48,]);let b = BlsScalar::from_raw([0xffeffa89f2eebc13,0x19420effaad6cb43,0x0000138739efccab,0x2979bc292cccde11,]);let witness_a = composer.append_witness(a);let witness_b = composer.append_witness(b);let bits = 32*8;let xor_res =
composer.component_xor(witness_a, witness_b, bits);// Check that the XOR result is indeed what we are expecting.
composer.assert_equal_constant(xor_res, a ^ b,None);},500,);assert!(res.is_ok());}
Expected behaviour
The function 'logic_gate' shouldn't panic with arbitrary input
Describe the bug
An internal assert in the logic gates XOR and AND is failing for larger input (i.e. a
BlsScarar
crated from 4 largeu64
). The output seems to be correct.To Reproduce
In
constraint_system::logic::tests::test_logic_xor_and_constraint
we only test rather smallBlsScalars
. Adding a test for larger values causes a panic in 'src/constraint_system/logic.rs:286:9' in the function 'logic_gate'Expected behaviour
The function 'logic_gate' shouldn't panic with arbitrary input
Logs/Screenshot
This is the error message:
Platform
all
Additional context
n/a
The text was updated successfully, but these errors were encountered: