Skip to content

Commit 49c20fd

Browse files
committed
refactor: demo logs
1 parent 3ae049b commit 49c20fd

File tree

3 files changed

+48
-11
lines changed

3 files changed

+48
-11
lines changed

beacon_node/beacon_chain/src/data_availability_checker/overflow_lru_cache.rs

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ use parking_lot::{MappedRwLockReadGuard, RwLock, RwLockReadGuard, RwLockWriteGua
1515
use std::cmp::Ordering;
1616
use std::num::NonZeroUsize;
1717
use std::sync::Arc;
18-
use tracing::{Span, debug, debug_span};
18+
use tracing::{Span, debug, debug_span, info};
1919
use types::beacon_block_body::KzgCommitments;
2020
use types::blob_sidecar::BlobIdentifier;
2121
use types::{
@@ -365,6 +365,26 @@ impl<E: EthSpec> PendingComponents<E> {
365365
// Not enough execution proofs yet
366366
return Ok(None);
367367
}
368+
369+
// Log when minimum proofs requirement is met
370+
let proof_ids: Vec<_> = self.verified_execution_proofs
371+
.iter()
372+
.map(|p| p.proof_id.as_u8().to_string())
373+
.collect();
374+
375+
let slot = self.verified_execution_proofs
376+
.first()
377+
.map(|p| p.slot);
378+
379+
self.span.in_scope(|| {
380+
if let Some(slot) = slot {
381+
info!("[Ethproofs] Minimum required execution proofs received: {}/{} proof_ids=[{}] slot={}",
382+
num_proofs, min_proofs, proof_ids.join(", "), slot);
383+
} else {
384+
info!("[Ethproofs] Minimum required execution proofs received: {}/{} proof_ids=[{}]",
385+
num_proofs, min_proofs, proof_ids.join(", "));
386+
}
387+
});
368388
}
369389

370390
// Block is available, construct `AvailableExecutedBlock`
@@ -396,6 +416,15 @@ impl<E: EthSpec> PendingComponents<E> {
396416
};
397417

398418
self.span.in_scope(|| {
419+
let proof_count = self.execution_proof_subnet_count();
420+
if proof_count > 0 {
421+
let slot = self.block.as_ref().map(|b| b.as_block().slot());
422+
if let Some(slot) = slot {
423+
info!("[Ethproofs] Block ready for validation with {} execution proofs slot={}", proof_count, slot);
424+
} else {
425+
info!("[Ethproofs] Block ready for validation with {} execution proofs", proof_count);
426+
}
427+
}
399428
debug!("Block and all data components are available");
400429
});
401430
Ok(Some(AvailableExecutedBlock::new(

beacon_node/network/src/network_beacon_processor/gossip_methods.rs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -806,6 +806,16 @@ impl<T: BeaconChainTypes> NetworkBeaconProcessor<T> {
806806

807807
self.propagate_validation_result(message_id, peer_id, MessageAcceptance::Accept);
808808

809+
let gossip_verified_proof_slot = gossip_verified_proof.slot();
810+
let gossip_verified_proof_subnet = gossip_verified_proof.subnet_id();
811+
812+
info!(
813+
%block_root,
814+
subnet_id = %gossip_verified_proof_subnet,
815+
slot = %gossip_verified_proof_slot,
816+
"[Ethproofs] Execution proof accepted and gossiped to peers"
817+
);
818+
809819
// Process the verified proof through DA checker
810820
self.process_gossip_verified_execution_proof(
811821
peer_id,
@@ -1368,7 +1378,7 @@ impl<T: BeaconChainTypes> NetworkBeaconProcessor<T> {
13681378
info!(
13691379
%block_root,
13701380
%subnet_id,
1371-
"Gossipsub execution proof processed, imported fully available block"
1381+
"[Ethproofs] Block fully available, imported with execution proofs"
13721382
);
13731383
self.chain.recompute_head_at_current_slot().await;
13741384

zkvm_execution_layer/src/ethproofs_demo.rs

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -215,21 +215,19 @@ pub fn validate_proof(proof: &ExecutionProof) -> bool {
215215
match VERIFIER_STORE.get(&prover_uuid) {
216216
Some(verifier_entry) => {
217217
info!(
218-
slot = %proof.slot,
219-
block_hash = %proof.block_hash,
220-
verifier = verifier_entry.name,
221-
"[Ethproofs] Verification started"
218+
"[Ethproofs] Verification started: verifier={} slot={}",
219+
verifier_entry.name,
220+
proof.slot
222221
);
223222

224223
// Run the actual cryptographic verification
225224
match (verifier_entry.verify_fn)(&proof.proof_data, &vk.vk) {
226225
Ok(result) => {
227226
info!(
228-
slot = %proof.slot,
229-
block_hash = %proof.block_hash,
230-
verifier = verifier_entry.name,
231-
verification_result = result,
232-
"[Ethproofs] Verification completed"
227+
"[Ethproofs] Verification completed: verifier={} slot={} result={}",
228+
verifier_entry.name,
229+
proof.slot,
230+
result
233231
);
234232
result
235233
}

0 commit comments

Comments
 (0)