|
@@ -160,9 +160,15 @@ impl Circuit<bls12_381::Scalar> for ZKVMCircuit {
|
|
|
ConstraintInstruction::Lc2Add(index) => {
|
|
ConstraintInstruction::Lc2Add(index) => {
|
|
|
lc2 = lc2 + (coeff_one, variables[index]);
|
|
lc2 = lc2 + (coeff_one, variables[index]);
|
|
|
}
|
|
}
|
|
|
|
|
+ ConstraintInstruction::Lc0AddOne => {
|
|
|
|
|
+ lc0 = lc0 + CS::one();
|
|
|
|
|
+ }
|
|
|
ConstraintInstruction::Lc1AddOne => {
|
|
ConstraintInstruction::Lc1AddOne => {
|
|
|
lc1 = lc1 + CS::one();
|
|
lc1 = lc1 + CS::one();
|
|
|
}
|
|
}
|
|
|
|
|
+ ConstraintInstruction::Lc2AddOne => {
|
|
|
|
|
+ lc2 = lc2 + CS::one();
|
|
|
|
|
+ }
|
|
|
ConstraintInstruction::Enforce => {
|
|
ConstraintInstruction::Enforce => {
|
|
|
cs.enforce(
|
|
cs.enforce(
|
|
|
|| "constraint",
|
|
|| "constraint",
|
|
@@ -186,7 +192,9 @@ enum ConstraintInstruction {
|
|
|
Lc0Add(VariableIndex),
|
|
Lc0Add(VariableIndex),
|
|
|
Lc1Add(VariableIndex),
|
|
Lc1Add(VariableIndex),
|
|
|
Lc2Add(VariableIndex),
|
|
Lc2Add(VariableIndex),
|
|
|
|
|
+ Lc0AddOne,
|
|
|
Lc1AddOne,
|
|
Lc1AddOne,
|
|
|
|
|
+ Lc2AddOne,
|
|
|
Enforce,
|
|
Enforce,
|
|
|
}
|
|
}
|
|
|
|
|
|