ccs-hack icon indicating copy to clipboard operation
ccs-hack copied to clipboard

Tests for R1CS check constraints

Open 0xJepsen opened this issue 1 year ago • 0 comments

Right now this is a hacked together implementation which has been a really wonderful learning tool. However to move towards production implementations it would be nice to build confidence in our implementation with a variety of tests. These would be a good place to start.

  • [ ] Test for R1CS satisfaction: This should check that the is_satisfied_by method correctly determines whether a given instance and witness satisfy the R1CS. This should include tests with both satisfying and non-satisfying instances and witnesses.
  • [ ] Test for R1CS creation: This should check that the R1CS is created correctly given valid inputs and that it correctly rejects invalid inputs. It should test the new method and verify that the assert! statements correctly enforce the constraints on the inputs.
  • [ ] Test for conversion to CCS: This should check that the to_ccs method correctly converts the R1CS to a CCS. It should test that the properties of the CCS (like its size and the properties of its multisets and constants) match what's expected based on the original R1CS.

0xJepsen avatar May 15 '23 09:05 0xJepsen