From ebb8bea461805ae5d7d825ee3297a937aad02356 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 9 Feb 2026 21:20:34 +0000 Subject: [PATCH] Address code review feedback - Fix comment about available time computation to reflect actual implementation - Use current time for reconstructed column timestamps instead of max partial timestamp Co-authored-by: michaelsproul <4452260+michaelsproul@users.noreply.github.com> --- beacon_node/beacon_chain/src/block_times_cache.rs | 2 +- .../beacon_chain/src/data_column_verification.rs | 12 +++++------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/beacon_node/beacon_chain/src/block_times_cache.rs b/beacon_node/beacon_chain/src/block_times_cache.rs index 03dc5ae5d2..f4cef7cdf9 100644 --- a/beacon_node/beacon_chain/src/block_times_cache.rs +++ b/beacon_node/beacon_chain/src/block_times_cache.rs @@ -43,7 +43,7 @@ pub struct BlockDelays { pub execution_time: Option, /// The delay from the start of the slot before the block became available /// - /// Equal to max(`observed + execution_time`, `all_blobs_observed` or `all_data_columns_observed`). + /// Equal to max(`executed`, `all_blobs_observed` or `all_data_columns_observed`) minus slot start time. pub available: Option, /// Time after `available`. pub attestable: Option, diff --git a/beacon_node/beacon_chain/src/data_column_verification.rs b/beacon_node/beacon_chain/src/data_column_verification.rs index 1ed3726500..1fed1dc7ac 100644 --- a/beacon_node/beacon_chain/src/data_column_verification.rs +++ b/beacon_node/beacon_chain/src/data_column_verification.rs @@ -16,7 +16,7 @@ use ssz_types::VariableList; use std::iter; use std::marker::PhantomData; use std::sync::Arc; -use std::time::Duration; +use std::time::{Duration, SystemTime, UNIX_EPOCH}; use tracing::{debug, instrument}; use types::data::ColumnIndex; use types::{ @@ -475,12 +475,10 @@ impl KzgVerifiedCustodyDataColumn { spec, )?; - // Use the maximum timestamp from the partial set for reconstructed columns - let seen_timestamp = partial_set_of_columns - .iter() - .map(|col| col.seen_timestamp) - .max() - .unwrap_or_default(); + // Use the current time as the seen_timestamp for reconstructed columns + let seen_timestamp = SystemTime::now() + .duration_since(UNIX_EPOCH) + .unwrap_or_else(|_| Duration::from_secs(0)); Ok(all_data_columns .into_iter()