Skip to content

Commit

Permalink
Fix/debug constraints (#142)
Browse files Browse the repository at this point in the history
* Modifying verify constraints logs

* Cargo fmt
  • Loading branch information
RogerTaule authored Dec 18, 2024
1 parent fcc5982 commit 5bd7639
Showing 1 changed file with 17 additions and 9 deletions.
26 changes: 17 additions & 9 deletions proofman/src/constraints.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ pub fn verify_constraints_proof<F: Field>(
let air_name = &pctx.global_info.airs[air_instance.airgroup_id][air_instance.air_id].name;
let mut valid_constraints_prover = true;
log::info!(
"{}: ► Instance #{}: Air [{}:{}] {}",
"{}: ► Instance #{} of {} (Airgroup {} - Air {})",
MY_NAME,
air_instance_index,
air_instance.air_instance_id.unwrap(),
air_name,
air_instance.airgroup_id,
air_instance.air_id,
air_name,
);
for constraint in &constraints[air_instance_index] {
let line_str = unsafe { CStr::from_ptr(constraint.line) };
Expand Down Expand Up @@ -104,17 +104,25 @@ pub fn verify_constraints_proof<F: Field>(
log::info!(
"{}: ··· {}",
MY_NAME,
format!("\u{2717} Not all constraints for Instance #{} were verified", air_instance_index,)
.bright_red()
.bold()
format!(
"\u{2717} Not all constraints for Instance #{} of {} were verified",
air_instance.air_instance_id.unwrap(),
air_name
)
.bright_red()
.bold()
);
} else {
log::info!(
"{}: {}",
MY_NAME,
format!("\u{2713} All constraints for Instance #{} were verified", air_instance_index,)
.bright_green()
.bold()
format!(
"\u{2713} All constraints for Instance #{} of {} were verified",
air_instance.air_instance_id.unwrap(),
air_name
)
.bright_green()
.bold()
);
}

Expand Down

0 comments on commit 5bd7639

Please sign in to comment.