Skip to content

Commit

Permalink
chore(repo): cleanup captured vars in format calls
Browse files Browse the repository at this point in the history
  • Loading branch information
petarvujovic98 committed Oct 7, 2024
1 parent e26ef1b commit d04e8a0
Show file tree
Hide file tree
Showing 11 changed files with 15 additions and 24 deletions.
2 changes: 1 addition & 1 deletion core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,6 @@ mod tests {
)
.await
.expect("proof aggregation failed");
println!("aggregated proof: {:?}", aggregated_proof);
println!("aggregated proof: {aggregated_proof:?}");
}
}
5 changes: 1 addition & 4 deletions core/src/preflight/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,8 @@ pub async fn prepare_taiko_chain_input(
RaikoError::Preflight("No L1 inclusion block hash for the requested block".to_owned())
})?;
info!(
"L1 inclusion block number: {:?}, hash: {:?}. L1 state block number: {:?}, hash: {:?}",
l1_inclusion_block_number,
l1_inclusion_block_hash,
"L1 inclusion block number: {l1_inclusion_block_number:?}, hash: {l1_inclusion_block_hash:?}. L1 state block number: {:?}, hash: {l1_state_block_hash:?}",
l1_state_header.number,
l1_state_block_hash
);

// Fetch the tx data from either calldata or blobdata
Expand Down
5 changes: 1 addition & 4 deletions host/src/cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,7 @@ pub async fn validate_input(

let cached_block_hash = cache_input.block.header.hash_slow();
let real_block_hash = block.header.hash.unwrap();
debug!(
"cache_block_hash={:?}, real_block_hash={:?}",
cached_block_hash, real_block_hash
);
debug!("cache_block_hash={cached_block_hash:?}, real_block_hash={real_block_hash:?}");

// double check if cache is valid
if cached_block_hash == real_block_hash {
Expand Down
2 changes: 1 addition & 1 deletion host/src/server/api/v3/proof/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ async fn proof_handler(
for (task, req) in tasks {
let raw_proof = manager.get_task_proof(&task).await?;
let proof = serde_json::from_slice(&raw_proof)?;
debug!("req: {:?} gets proof: {:?}", req, proof);
debug!("req: {req:?} gets proof: {proof:?}");
proofs.push(proof);
}

Expand Down
6 changes: 3 additions & 3 deletions lib/src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ impl<DB: Database<Error = ProviderError> + DatabaseCommit + OptimisticDatabase>
} = executor
.execute((&block, total_difficulty).into())
.map_err(|e| {
error!("Error executing block: {:?}", e);
error!("Error executing block: {e:?}");
e
})?;
// Filter out the valid transactions so that the header checks only take these into account
Expand Down Expand Up @@ -294,8 +294,8 @@ impl RethBlockBuilder<MemDb> {
state_trie.insert_rlp(&state_trie_index, state_account)?;
}

debug!("Accounts touched {:?}", account_touched);
debug!("Storages touched {:?}", storage_touched);
debug!("Accounts touched {account_touched:?}");
debug!("Storages touched {storage_touched:?}");

Ok(state_trie.hash())
}
Expand Down
2 changes: 1 addition & 1 deletion pipeline/src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ impl CommandBuilder {
println!("Using {tool}: {out}");
Some(PathBuf::from(out))
} else {
println!("Command succeeded with unknown output: {:?}", stdout);
println!("Command succeeded with unknown output: {stdout:?}");
None
}
} else {
Expand Down
3 changes: 1 addition & 2 deletions provers/risc0/driver/src/bonsai.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,9 @@ pub async fn verify_bonsai_receipt<O: Eq + Debug + DeserializeOwned>(
let client = bonsai_sdk::alpha_async::get_client_from_env(risc0_zkvm::VERSION).await?;
let bonsai_err_log = session.logs(&client);
return Err(BonsaiExecutionError::Fatal(format!(
"Workflow exited: {} - | err: {} | log: {:?}",
"Workflow exited: {} - | err: {} | log: {bonsai_err_log:?}",
res.status,
res.error_msg.unwrap_or_default(),
bonsai_err_log
)));
}
}
Expand Down
2 changes: 1 addition & 1 deletion provers/risc0/driver/src/snarks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ pub async fn verify_groth16_snark_impl(
if verify_call_res.is_ok() {
tracing_info!("SNARK verified successfully using {groth16_verifier_addr:?}!");
} else {
tracing_err!("SNARK verification failed: {:?}!", verify_call_res);
tracing_err!("SNARK verification failed: {verify_call_res:?}!");
}

Ok(make_risc0_groth16_proof(enc_seal, image_id))
Expand Down
7 changes: 3 additions & 4 deletions provers/sp1/driver/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -270,9 +270,8 @@ impl Prover for Sp1Prover {
block_inputs,
};
info!(
"Aggregating {:?} proofs with input: {:?}",
"Aggregating {:?} proofs with input: {aggregation_input:?}",
input.proofs.len(),
aggregation_input
);

let mut stdin = SP1Stdin::new();
Expand All @@ -285,7 +284,7 @@ impl Prover for Sp1Prover {
stdin.write_proof(block_proof.into(), stark_vk.clone());
}
_ => {
error!("unsupported proof type for aggregation: {:?}", sp1_proof);
error!("unsupported proof type for aggregation: {sp1_proof:?}");
}
}
}
Expand Down Expand Up @@ -418,7 +417,7 @@ fn verify_sol(fixture: &RaikoProofFixture) -> ProverResult<()> {
.current_dir(&*CONTRACT_PATH)
.stdout(std::process::Stdio::inherit()) // Inherit the parent process' stdout
.spawn();
info!("Verification started {:?}", child);
info!("Verification started {child:?}");
child.map_err(|e| ProverError::GuestError(format!("Failed to run forge: {e}")))?;

Ok(())
Expand Down
2 changes: 1 addition & 1 deletion provers/sp1/driver/src/verifier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ async fn main() {
}
})
.unwrap_or_else(|| PathBuf::from(DATA).join("taiko_mainnet-328833.json"));
println!("Reading GuestInput from {:?}", path);
println!("Reading GuestInput from {path:?}");
let json = std::fs::read_to_string(path).unwrap();

// Deserialize the input.
Expand Down
3 changes: 1 addition & 2 deletions provers/sp1/guest/src/zk_op.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ harness::zk_suits!(
p.x().to_big_endian(&mut p_x).unwrap();
p.y().to_big_endian(&mut p_y).unwrap();

println!("{:?}, {:?}:?", p_x, p_y);
println!("{p_x:?}, {p_y:?}:?");

// Deserialize AffinePoint in Sp1
let p = be_bytes_to_point(&input);
Expand Down Expand Up @@ -154,4 +154,3 @@ harness::zk_suits!(
}
}
);

0 comments on commit d04e8a0

Please sign in to comment.