Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion relations/src/sr1cs/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ impl<F: Field> Sr1csAdapter<F> {
cs: &ConstraintSystemRef<F>,
) -> Result<ConstraintSystemRef<F>, SynthesisError> {
assert_eq!(cs.num_predicates(), 1);
assert!(cs.has_predicate(R1CS_PREDICATE_LABEL));
let matrices = &cs.to_matrices().unwrap()[R1CS_PREDICATE_LABEL];
let mut public_variables = BTreeMap::new();
let mut witness_variables = BTreeMap::new();
Expand Down Expand Up @@ -187,10 +188,11 @@ impl<F: Field> Sr1csAdapter<F> {
///
/// # Panics
///
/// Panics is the constraint system does not have the R1CS predicate registered.
/// Panics if the constraint system does not have the R1CS predicate registered.
pub fn r1cs_to_sr1cs_with_assignment(
cs: &mut ConstraintSystem<F>,
) -> Result<ConstraintSystemRef<F>, SynthesisError> {
assert!(cs.has_predicate(R1CS_PREDICATE_LABEL));
let matrices = &cs.to_matrices().unwrap()[R1CS_PREDICATE_LABEL];
let mut public_variables = BTreeMap::new();
let mut witness_variables = BTreeMap::new();
Expand Down