diff --git a/sz-poc-offsite-2025/evm/lightnode/src/main.rs b/sz-poc-offsite-2025/evm/lightnode/src/main.rs index a37dbda..181fbd6 100644 --- a/sz-poc-offsite-2025/evm/lightnode/src/main.rs +++ b/sz-poc-offsite-2025/evm/lightnode/src/main.rs @@ -42,6 +42,11 @@ async fn main() -> Result<(), Box> { 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> { &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(); diff --git a/sz-poc-offsite-2025/evm/lightnode/src/proofcheck.rs b/sz-poc-offsite-2025/evm/lightnode/src/proofcheck.rs index 888e8d1..a3a3b72 100644 --- a/sz-poc-offsite-2025/evm/lightnode/src/proofcheck.rs +++ b/sz-poc-offsite-2025/evm/lightnode/src/proofcheck.rs @@ -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(()) }