This commit is contained in:
Giacomo Pasini 2025-04-24 11:17:12 +02:00
parent 7420d1caa3
commit c8e5dd9df9
No known key found for this signature in database
GPG Key ID: FC08489D2D895D4B
2 changed files with 12 additions and 9 deletions

View File

@ -42,6 +42,11 @@ async fn main() -> Result<(), Box<dyn error::Error>> {
password: Some(password),
};
let filter =
EnvFilter::try_from_default_env().unwrap_or_else(|_| EnvFilter::new(&args.log_level));
fmt::fmt().with_env_filter(filter).with_target(false).init();
proofcheck::verify_proof(
args.start_block,
args.batch_size,
@ -50,11 +55,6 @@ async fn main() -> Result<(), Box<dyn error::Error>> {
&args.zeth_binary_dir.unwrap_or_else(|| std::env::current_dir().unwrap()).join("zeth-ethereum"),
).await?;
let filter =
EnvFilter::try_from_default_env().unwrap_or_else(|_| EnvFilter::new(&args.log_level));
fmt::fmt().with_env_filter(filter).with_target(false).init();
let consensus = NomosClient::new(Url::parse(&url).unwrap(), basic_auth);
let mut current_tip = HeaderId::default();

View File

@ -16,10 +16,11 @@ pub async fn verify_proof(
block_number + block_count - 1
);
let proof = reqwest::get(format!(
"{}/?block_start={}&block_count={}",
prover_url, block_number, block_count
)).await
let url = prover_url.join(&format!(
"/?block_start={}&block_count={}",
block_number, block_count
)).map_err(|e| format!("Failed to construct URL: {}", e))?;
let proof = reqwest::get(url).await
.map_err(|e| format!("Failed to fetch proof: {}", e))?
.bytes()
.await
@ -50,5 +51,7 @@ pub async fn verify_proof(
));
}
info!("Proof verification successful");
Ok(())
}