Skip to content

Commit 4a1af6c

Browse files
authored
cleanup verbose log (#669)
With RUST_LOG="debug" by default there will log many verbose message which make result unreadable. Most of debug log are left over to debug in #368 As PR 368 already done, this PR is aim for debug log cleanup
1 parent bd90bc5 commit 4a1af6c

File tree

3 files changed

+10
-37
lines changed

3 files changed

+10
-37
lines changed

ceno_zkvm/src/scheme/prover.rs

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -157,9 +157,6 @@ impl<E: ExtensionField, PCS: PolynomialCommitmentScheme<E>> ZKVMProver<E, PCS> {
157157
cs.w_expressions.len(),
158158
cs.lk_expressions.len(),
159159
);
160-
for lk_s in &cs.lk_expressions_namespace_map {
161-
tracing::debug!("opcode circuit {}: {}", circuit_name, lk_s);
162-
}
163160
let opcode_proof = self.create_opcode_proof(
164161
circuit_name,
165162
&self.pk.pp,
@@ -613,10 +610,9 @@ impl<E: ExtensionField, PCS: PolynomialCommitmentScheme<E>> ZKVMProver<E, PCS> {
613610
let pcs_open_span = entered_span!("pcs_open", profiling_3 = true);
614611
let opening_dur = std::time::Instant::now();
615612
tracing::debug!(
616-
"[opcode {}]: build opening proof for {} polys at {:?}",
613+
"[opcode {}]: build opening proof for {} polys",
617614
name,
618-
witnesses.len(),
619-
input_open_point
615+
witnesses.len()
620616
);
621617
let wits_opening_proof = PCS::simple_batch_open(
622618
pp,
@@ -1051,7 +1047,7 @@ impl<E: ExtensionField, PCS: PolynomialCommitmentScheme<E>> ZKVMProver<E, PCS> {
10511047
// TODO implement mechanism to skip commitment
10521048

10531049
let pcs_opening = entered_span!("pcs_opening");
1054-
let (fixed_opening_proof, fixed_commit) = if !fixed.is_empty() {
1050+
let (fixed_opening_proof, _fixed_commit) = if !fixed.is_empty() {
10551051
(
10561052
Some(
10571053
PCS::simple_batch_open(
@@ -1073,12 +1069,9 @@ impl<E: ExtensionField, PCS: PolynomialCommitmentScheme<E>> ZKVMProver<E, PCS> {
10731069
};
10741070

10751071
tracing::debug!(
1076-
"[table {}] build opening proof for {} fixed polys at {:?}: values = {:?}, commit = {:?}",
1072+
"[table {}] build opening proof for {} fixed polys",
10771073
name,
1078-
fixed.len(),
1079-
input_open_point,
1080-
fixed_in_evals,
1081-
fixed_commit,
1074+
fixed.len()
10821075
);
10831076
let wits_opening_proof = PCS::simple_batch_open(
10841077
pp,
@@ -1092,12 +1085,9 @@ impl<E: ExtensionField, PCS: PolynomialCommitmentScheme<E>> ZKVMProver<E, PCS> {
10921085
exit_span!(pcs_opening);
10931086
let wits_commit = PCS::get_pure_commitment(&wits_commit);
10941087
tracing::debug!(
1095-
"[table {}] build opening proof for {} polys at {:?}: values = {:?}, commit = {:?}",
1088+
"[table {}] build opening proof for {} polys",
10961089
name,
10971090
witnesses.len(),
1098-
input_open_point,
1099-
wits_in_evals,
1100-
wits_commit,
11011091
);
11021092

11031093
Ok((
@@ -1249,7 +1239,6 @@ impl TowerProver {
12491239
virtual_polys.add_mle_list(vec![&eq, &q1, &q2], *alpha_denominator);
12501240
}
12511241
}
1252-
tracing::debug!("generated tower proof at round {}/{}", round, max_round_index);
12531242

12541243
let wrap_batch_span = entered_span!("wrap_batch");
12551244
// NOTE: at the time of adding this span, visualizing it with the flamegraph layer

ceno_zkvm/src/scheme/verifier.rs

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -478,10 +478,9 @@ impl<E: ExtensionField, PCS: PolynomialCommitmentScheme<E>> ZKVMVerifier<E, PCS>
478478
}
479479

480480
tracing::debug!(
481-
"[opcode {}] verify opening proof for {} polys at {:?}",
481+
"[opcode {}] verify opening proof for {} polys",
482482
name,
483483
proof.wits_in_evals.len(),
484-
input_opening_point
485484
);
486485
PCS::simple_batch_verify(
487486
vp,
@@ -770,12 +769,9 @@ impl<E: ExtensionField, PCS: PolynomialCommitmentScheme<E>> ZKVMVerifier<E, PCS>
770769
}
771770

772771
tracing::debug!(
773-
"[table {}] verified opening proof for {} fixed polys at {:?}: values = {:?}, commit = {:?}",
772+
"[table {}] verified opening proof for {} fixed polys",
774773
name,
775774
proof.fixed_in_evals.len(),
776-
input_opening_point,
777-
proof.fixed_in_evals,
778-
circuit_vk.fixed_commit,
779775
);
780776

781777
PCS::simple_batch_verify(
@@ -788,12 +784,9 @@ impl<E: ExtensionField, PCS: PolynomialCommitmentScheme<E>> ZKVMVerifier<E, PCS>
788784
)
789785
.map_err(ZKVMError::PCSError)?;
790786
tracing::debug!(
791-
"[table {}] verified opening proof for {} polys at {:?}: values = {:?}, commit = {:?}",
787+
"[table {}] verified opening proof for {} polys",
792788
name,
793789
proof.wits_in_evals.len(),
794-
input_opening_point,
795-
proof.wits_in_evals,
796-
proof.wits_commit
797790
);
798791

799792
Ok(input_opening_point)
@@ -909,7 +902,6 @@ impl TowerVerify {
909902
},
910903
transcript,
911904
);
912-
tracing::debug!("verified tower proof at layer {}/{}", round + 1, max_num_variables-1);
913905

914906
// check expected_evaluation
915907
let rt: Point<E> = sumcheck_claim.point.iter().map(|c| c.elements).collect();

sumcheck/src/prover_v2.rs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -99,19 +99,11 @@ impl<'a, E: ExtensionField> IOPProverStateV2<'a, E> {
9999
// Nesting is possible, but then `tracing-forest` does the wrong thing when measuring duration.
100100
// TODO: investigate possibility of nesting with correct duration of parent span
101101
let span = entered_span!("prove_rounds", profiling_5 = true);
102-
for i in 0..num_variables {
102+
for _ in 0..num_variables {
103103
let prover_msg = IOPProverStateV2::prove_round_and_update_state(
104104
&mut prover_state,
105105
&challenge,
106106
);
107-
if thread_id < 2 {
108-
tracing::debug!(
109-
"thread {}: sumcheck round {}/{}",
110-
thread_id,
111-
i + 1,
112-
num_variables
113-
);
114-
}
115107
thread_based_transcript.append_field_element_exts(&prover_msg.evaluations);
116108

117109
challenge = Some(

0 commit comments

Comments
 (0)