Skip to content

Commit c7f6750

Browse files
authored
chore: fix logging (#2157)
1 parent a82945f commit c7f6750

File tree

4 files changed

+23
-23
lines changed

4 files changed

+23
-23
lines changed

crates/core/machine/src/shape/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,10 @@ impl<F: PrimeField32> CoreShapeConfig<F> {
114114
})?;
115115

116116
let shard = record.shard();
117-
tracing::info!("Shard Lifted: Index={}, Cluster={}", shard, cluster_index);
117+
tracing::debug!("Shard Lifted: Index={}, Cluster={}", shard, cluster_index);
118118
for (air, height) in heights.iter() {
119119
if shape.contains(air) {
120-
tracing::info!(
120+
tracing::debug!(
121121
"Chip {:<20}: {:<3} -> {:<3}",
122122
air,
123123
log2_ceil_usize(*height),
@@ -147,11 +147,11 @@ impl<F: PrimeField32> CoreShapeConfig<F> {
147147
.ok_or_else(|| CoreShapeError::ShapeError(record.debug_stats()))?;
148148

149149
let shard = record.shard();
150-
tracing::info!("Shard Lifted: Index={}, Cluster={}", shard, cluster_index);
150+
tracing::debug!("Shard Lifted: Index={}, Cluster={}", shard, cluster_index);
151151

152152
for (air, height) in heights.iter() {
153153
if shape.contains(air) {
154-
tracing::info!(
154+
tracing::debug!(
155155
"Chip {:<20}: {:<3} -> {:<3}",
156156
air,
157157
log2_ceil_usize(*height),

crates/core/machine/src/utils/prove.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ where
270270
// See if any deferred shards are ready to be committed to.
271271
let mut deferred =
272272
deferred.split(done, last_record, opts.split_opts);
273-
tracing::info!("deferred {} records", deferred.len());
273+
tracing::debug!("deferred {} records", deferred.len());
274274

275275
// Update the public values & prover state for the shards which do not
276276
// contain "cpu events" before committing to them.
@@ -323,7 +323,7 @@ where
323323
if shape_fixed_records.is_none() {
324324
// See if any deferred shards are ready to be committed to.
325325
let mut deferred = deferred.split(done, None, opts.split_opts);
326-
tracing::info!("deferred {} records", deferred.len());
326+
tracing::debug!("deferred {} records", deferred.len());
327327

328328
// Update the public values & prover state for the shards which do not
329329
// contain "cpu events" before committing to them.
@@ -523,15 +523,15 @@ where
523523

524524
// Log some of the `ExecutionReport` information.
525525
let mut report_aggregate = report_aggregate.lock().unwrap();
526-
tracing::info!(
526+
tracing::debug!(
527527
"execution report (totals): total_cycles={}, total_syscall_cycles={}, touched_memory_addresses={}",
528528
report_aggregate.total_instruction_count(),
529529
report_aggregate.total_syscall_count(),
530530
report_aggregate.touched_memory_addresses,
531531
);
532532
match gas {
533533
Some(Ok(gas)) => {
534-
tracing::info!("execution report (gas): {}", gas);
534+
tracing::debug!("execution report (gas): {}", gas);
535535
report_aggregate.gas = Some(gas);
536536
}
537537
Some(Err(err)) => tracing::error!("Encountered error while calculating gas: {}", err),
@@ -540,21 +540,21 @@ where
540540

541541
// Print the opcode and syscall count tables like `du`: sorted by count (descending) and
542542
// with the count in the first column.
543-
tracing::info!("execution report (opcode counts):");
543+
tracing::debug!("execution report (opcode counts):");
544544
let (width, lines) = sorted_table_lines(report_aggregate.opcode_counts.as_ref());
545545
for (label, count) in lines {
546546
if *count > 0 {
547-
tracing::info!(" {}", format_table_line(&width, &label, count));
547+
tracing::debug!(" {}", format_table_line(&width, &label, count));
548548
} else {
549549
tracing::debug!(" {}", format_table_line(&width, &label, count));
550550
}
551551
}
552552

553-
tracing::info!("execution report (syscall counts):");
553+
tracing::debug!("execution report (syscall counts):");
554554
let (width, lines) = sorted_table_lines(report_aggregate.syscall_counts.as_ref());
555555
for (label, count) in lines {
556556
if *count > 0 {
557-
tracing::info!(" {}", format_table_line(&width, &label, count));
557+
tracing::debug!(" {}", format_table_line(&width, &label, count));
558558
} else {
559559
tracing::debug!(" {}", format_table_line(&width, &label, count));
560560
}
@@ -564,7 +564,7 @@ where
564564

565565
// Print the summary.
566566
let proving_time = proving_start.elapsed().as_secs_f64();
567-
tracing::info!(
567+
tracing::debug!(
568568
"summary: cycles={}, e2e={}s, khz={:.2}",
569569
cycles,
570570
proving_time,

crates/prover/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ impl<C: SP1ProverComponents> SP1Prover<C> {
206206

207207
let vk_verification =
208208
env::var("VERIFY_VK").map(|v| v.eq_ignore_ascii_case("true")).unwrap_or(true);
209-
tracing::info!("vk verification: {}", vk_verification);
209+
tracing::debug!("vk verification: {}", vk_verification);
210210

211211
// Read the shapes from the shapes directory and deserialize them into memory.
212212
let allowed_vk_map: BTreeMap<[BabyBear; DIGEST_SIZE], usize> = if vk_verification {
@@ -846,7 +846,7 @@ impl<C: SP1ProverComponents> SP1Prover<C> {
846846
handle.join().unwrap();
847847
}
848848
handle.join().unwrap();
849-
tracing::info!("joined handles");
849+
tracing::debug!("joined handles");
850850

851851
let (_, _, vk, proof) = proofs_rx.lock().unwrap().recv().unwrap();
852852
(vk, proof)
@@ -954,7 +954,7 @@ impl<C: SP1ProverComponents> SP1Prover<C> {
954954
tracing::debug!("wrap proving time: {:?}", elapsed);
955955
let mut wrap_challenger = self.wrap_prover.config().challenger();
956956
self.wrap_prover.machine().verify(&wrap_vk, &wrap_proof, &mut wrap_challenger).unwrap();
957-
tracing::info!("wrapping successful");
957+
tracing::debug!("wrapping successful");
958958

959959
Ok(SP1ReduceProof { vk: wrap_vk, proof: wrap_proof.shard_proofs.pop().unwrap() })
960960
}

crates/prover/src/shapes.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ pub fn check_shapes<C: SP1ProverComponents>(
8383
)
8484
.collect::<BTreeSet<SP1ProofShape>>();
8585
let num_shapes = all_maximal_shapes.len();
86-
tracing::info!("number of shapes: {}", num_shapes);
86+
tracing::debug!("number of shapes: {}", num_shapes);
8787

8888
// The Merkle tree height.
8989
let height = num_shapes.next_power_of_two().ilog2() as usize;
@@ -99,7 +99,7 @@ pub fn check_shapes<C: SP1ProverComponents>(
9999
let panic_tx = panic_tx.clone();
100100
s.spawn(move || {
101101
while let Ok(shape) = shape_rx.lock().unwrap().recv() {
102-
tracing::info!("shape is {:?}", shape);
102+
tracing::debug!("shape is {:?}", shape);
103103
let program = catch_unwind(AssertUnwindSafe(|| {
104104
// Try to build the recursion program from the given shape.
105105
prover.program_from_shape(shape.clone(), None)
@@ -168,7 +168,7 @@ pub fn build_vk_map<C: SP1ProverComponents + 'static>(
168168
let height = dummy_set.len().next_power_of_two().ilog2() as usize;
169169
(dummy_set, vec![], height)
170170
} else {
171-
tracing::info!("building vk map");
171+
tracing::debug!("building vk map");
172172

173173
// Setup the channels.
174174
let (vk_tx, vk_rx) = std::sync::mpsc::channel();
@@ -193,7 +193,7 @@ pub fn build_vk_map<C: SP1ProverComponents + 'static>(
193193
}
194194

195195
let num_shapes = all_shapes.len();
196-
tracing::info!("number of shapes: {} in {:?}", num_shapes, start.elapsed());
196+
tracing::debug!("number of shapes: {} in {:?}", num_shapes, start.elapsed());
197197

198198
let height = num_shapes.next_power_of_two().ilog2() as usize;
199199
let chunk_size = indices_set.as_ref().map(|indices| indices.len()).unwrap_or(num_shapes);
@@ -260,7 +260,7 @@ pub fn build_vk_map<C: SP1ProverComponents + 'static>(
260260
let vk = vk.unwrap();
261261

262262
let vk_digest = vk.hash_babybear();
263-
tracing::info!(
263+
tracing::debug!(
264264
"program {} = {:?}, {}% done",
265265
i,
266266
vk_digest,
@@ -296,14 +296,14 @@ pub fn build_vk_map<C: SP1ProverComponents + 'static>(
296296
let panic_indices = panic_rx.iter().collect::<Vec<_>>();
297297
for (i, shape) in subset_shapes {
298298
if panic_indices.contains(&i) {
299-
tracing::info!("panic shape {}: {:?}", i, shape);
299+
tracing::debug!("panic shape {}: {:?}", i, shape);
300300
}
301301
}
302302

303303
(vk_set, panic_indices, height)
304304
})
305305
};
306-
tracing::info!("compress vks generated, number of keys: {}", vk_set.len());
306+
tracing::debug!("compress vks generated, number of keys: {}", vk_set.len());
307307
(vk_set, panic_indices, height)
308308
}
309309

0 commit comments

Comments
 (0)