From da5b2317205efc72b98cdc922289acefe3f76a13 Mon Sep 17 00:00:00 2001 From: Lion - dapplion <35266934+dapplion@users.noreply.github.com> Date: Mon, 27 Oct 2025 00:47:25 +0100 Subject: [PATCH] Prevent dropping large binary data to logs (#8290) Testing non finalized checkpoint sync noticed this log that dumps blob data in Debug format to the logs. Log only block root and commitment of each blob Co-Authored-By: dapplion <35266934+dapplion@users.noreply.github.com> --- beacon_node/network/src/sync/block_sidecar_coupling.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/beacon_node/network/src/sync/block_sidecar_coupling.rs b/beacon_node/network/src/sync/block_sidecar_coupling.rs index cd9276f7e3..d5858c23f1 100644 --- a/beacon_node/network/src/sync/block_sidecar_coupling.rs +++ b/beacon_node/network/src/sync/block_sidecar_coupling.rs @@ -8,7 +8,7 @@ use lighthouse_network::{ }, }; use std::{collections::HashMap, sync::Arc}; -use tracing::Span; +use tracing::{Span, debug}; use types::{ BlobSidecar, ChainSpec, ColumnIndex, DataColumnSidecar, DataColumnSidecarList, EthSpec, Hash256, RuntimeVariableList, SignedBeaconBlock, @@ -323,10 +323,10 @@ impl RangeBlockComponentsRequest { // if accumulated sidecars is not empty, log an error but return the responses // as we can still make progress. if blob_iter.next().is_some() { - tracing::debug!( - remaining_blobs=?blob_iter.collect::>(), - "Received sidecars that don't pair well", - ); + let remaining_blobs = blob_iter + .map(|b| (b.index, b.block_root())) + .collect::>(); + debug!(?remaining_blobs, "Received sidecars that don't pair well",); } Ok(responses)