Skip to content

Commit 2da5396

Browse files
committed
refactor: ethproofs logs
1 parent e0fac34 commit 2da5396

File tree

3 files changed

+11
-13
lines changed

3 files changed

+11
-13
lines changed

zkvm_execution_layer/src/dummy_proof_gen.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,7 @@ impl DummyProofGenerator {
5454
.into_bytes();
5555

5656
// Use proof_id 0 (Fallback verifier) to mark this as a dummy proof
57-
let fallback_proof_id = ExecutionProofId::new(0)
58-
.expect("proof_id 0 is always valid");
57+
let fallback_proof_id = ExecutionProofId::new(0).expect("proof_id 0 is always valid");
5958
ExecutionProof::new(
6059
fallback_proof_id,
6160
slot,

zkvm_execution_layer/src/dummy_proof_verifier.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use crate::ethproofs_demo::{EthproofsValidator, ProofValidator};
22
use crate::proof_verification::{ProofVerificationResult, ProofVerifier, VerificationError};
33
use std::sync::Arc;
44
use std::time::Duration;
5-
use tracing::info;
5+
use tracing::debug;
66
use types::{ExecutionProof, ExecutionProofId};
77

88
/// TODO(ethproofs): Ethproofs demo implementation of proof verification.
@@ -58,7 +58,7 @@ impl ProofVerifier for DummyVerifier {
5858
std::thread::sleep(self.verification_delay);
5959
}
6060

61-
info!(
61+
debug!(
6262
proof_id = %self.proof_id,
6363
block_hash = %proof.block_hash,
6464
"[Ethproofs] Verifying proof"

zkvm_execution_layer/src/ethproofs_demo.rs

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use once_cell::sync::Lazy;
44
use reqwest::StatusCode;
55
use serde::{Deserialize, Serialize};
66
use std::time::{Duration, Instant};
7-
use tracing::{info, warn};
7+
use tracing::{debug, info, warn};
88
use types::ExecutionProof;
99

1010
/// Trait for validating proofs
@@ -169,7 +169,7 @@ pub fn validate_proof(proof: &ExecutionProof) -> bool {
169169
info!(
170170
slot = %proof.slot,
171171
block_hash = %proof.block_hash,
172-
"[Ethproofs] Fallback proof accepted without cryptographic verification"
172+
"[Ethproofs] Fallback proof accepted"
173173
);
174174
return true;
175175
}
@@ -190,7 +190,7 @@ pub fn validate_proof(proof: &ExecutionProof) -> bool {
190190
Some(store) => {
191191
match store.get(&prover_uuid) {
192192
Some(vk) => {
193-
info!(
193+
debug!(
194194
slot = %proof.slot,
195195
block_hash = %proof.block_hash,
196196
prover_id = %prover_uuid,
@@ -205,7 +205,6 @@ pub fn validate_proof(proof: &ExecutionProof) -> bool {
205205
info!(
206206
slot = %proof.slot,
207207
block_hash = %proof.block_hash,
208-
prover_id = %prover_uuid,
209208
verifier = verifier_entry.name,
210209
"[Ethproofs] Verification started"
211210
);
@@ -216,7 +215,7 @@ pub fn validate_proof(proof: &ExecutionProof) -> bool {
216215
info!(
217216
slot = %proof.slot,
218217
block_hash = %proof.block_hash,
219-
prover_id = %prover_uuid,
218+
verifier = verifier_entry.name,
220219
verification_result = result,
221220
"[Ethproofs] Verification completed"
222221
);
@@ -226,9 +225,9 @@ pub fn validate_proof(proof: &ExecutionProof) -> bool {
226225
warn!(
227226
slot = %proof.slot,
228227
block_hash = %proof.block_hash,
229-
prover_id = %prover_uuid,
228+
verifier = verifier_entry.name,
230229
error = %e,
231-
"[Ethproofs] Verification failed with error"
230+
"[Ethproofs] Verification failed"
232231
);
233232
false
234233
}
@@ -239,7 +238,7 @@ pub fn validate_proof(proof: &ExecutionProof) -> bool {
239238
slot = %proof.slot,
240239
block_hash = %proof.block_hash,
241240
prover_id = %prover_uuid,
242-
"[Ethproofs] No verifier registered for this prover, cannot verify proof"
241+
"[Ethproofs] No registered verifier"
243242
);
244243
false
245244
}
@@ -250,7 +249,7 @@ pub fn validate_proof(proof: &ExecutionProof) -> bool {
250249
slot = %proof.slot,
251250
block_hash = %proof.block_hash,
252251
prover_id = %prover_uuid,
253-
"[Ethproofs] No verification key found for this prover"
252+
"[Ethproofs] No verification key found"
254253
);
255254
false
256255
}

0 commit comments

Comments
 (0)