diff --git a/beacon_node/beacon_chain/src/payload_envelope_verification/import.rs b/beacon_node/beacon_chain/src/payload_envelope_verification/import.rs index cc61d11f25..fc6cd6926e 100644 --- a/beacon_node/beacon_chain/src/payload_envelope_verification/import.rs +++ b/beacon_node/beacon_chain/src/payload_envelope_verification/import.rs @@ -226,7 +226,6 @@ impl BeaconChain { signed_envelope, import_data, payload_verification_outcome, - self.spec.clone(), )) } diff --git a/beacon_node/beacon_chain/src/payload_envelope_verification/mod.rs b/beacon_node/beacon_chain/src/payload_envelope_verification/mod.rs index 330c87c30d..bfd459ed2e 100644 --- a/beacon_node/beacon_chain/src/payload_envelope_verification/mod.rs +++ b/beacon_node/beacon_chain/src/payload_envelope_verification/mod.rs @@ -132,7 +132,6 @@ impl ExecutedEnvelope { envelope: MaybeAvailableEnvelope, import_data: EnvelopeImportData, payload_verification_outcome: PayloadVerificationOutcome, - spec: Arc, ) -> Self { match envelope { MaybeAvailableEnvelope::Available(available_envelope) => { diff --git a/beacon_node/beacon_chain/src/pending_payload_cache/pending_column.rs b/beacon_node/beacon_chain/src/pending_payload_cache/pending_column.rs index ae2c556007..021983f8a5 100644 --- a/beacon_node/beacon_chain/src/pending_payload_cache/pending_column.rs +++ b/beacon_node/beacon_chain/src/pending_payload_cache/pending_column.rs @@ -23,12 +23,6 @@ impl PendingColumn { } } - // TODO(gloas): insert_from_partial - - pub fn has_cell(&self, index: usize) -> bool { - self.cells.get(index).is_some_and(|c| c.is_some()) - } - pub fn cell_matches(&self, index: usize, cell: &Cell, proof: &KzgProof) -> Option { self.cells .get(index)? diff --git a/beacon_node/beacon_chain/src/pending_payload_cache/pending_components.rs b/beacon_node/beacon_chain/src/pending_payload_cache/pending_components.rs index 1d2899d9ee..9d16ecbdf6 100644 --- a/beacon_node/beacon_chain/src/pending_payload_cache/pending_components.rs +++ b/beacon_node/beacon_chain/src/pending_payload_cache/pending_components.rs @@ -81,13 +81,6 @@ impl PendingComponents { self.envelope = Some(envelope); } - /// Returns the number of blobs expected by reading the bid's kzg commitments. - /// Returns an error if the bid is not cached. This function should only be called - /// after ensuring that the bid has been cached. - pub fn num_blobs_expected(&self) -> usize { - self.num_blobs_expected - } - pub fn num_completed_columns(&self) -> usize { self.verified_data_columns .values() diff --git a/beacon_node/beacon_chain/src/test_utils.rs b/beacon_node/beacon_chain/src/test_utils.rs index de944af5b9..1ba6fa64d6 100644 --- a/beacon_node/beacon_chain/src/test_utils.rs +++ b/beacon_node/beacon_chain/src/test_utils.rs @@ -3832,12 +3832,10 @@ pub fn generate_data_column_sidecars_from_block( ) .unwrap(); - // TODO(gloas): The fixture is Fulu format. Generate Gloas-specific fixture once format - // is finalized, or compute columns dynamically for Gloas tests. let (cells, proofs) = template_data_columns .into_iter() .map(|sidecar| { - let DataColumnSidecarFulu { + let DataColumnSidecarGloas { column, kzg_proofs, .. } = sidecar; // There's only one cell per column for a single blob diff --git a/beacon_node/network/src/network_beacon_processor/gossip_methods.rs b/beacon_node/network/src/network_beacon_processor/gossip_methods.rs index c7c8bc1d46..4d1f522cf0 100644 --- a/beacon_node/network/src/network_beacon_processor/gossip_methods.rs +++ b/beacon_node/network/src/network_beacon_processor/gossip_methods.rs @@ -3627,6 +3627,23 @@ impl NetworkBeaconProcessor { self.propagate_if_timely(is_timely, message_id, peer_id) } + /// If a payload envelope is still valid with respect to the current time (i.e., its slot + /// matches the current slot), propagate it on gossip. Otherwise, ignore it. + fn propagate_envelope_if_timely( + &self, + envelope_slot: Slot, + message_id: MessageId, + peer_id: PeerId, + ) { + let is_timely = self + .chain + .slot_clock + .now() + .is_some_and(|current_slot| envelope_slot == current_slot); + + self.propagate_if_timely(is_timely, message_id, peer_id) + } + /// If a sync committee signature or sync committee contribution is still valid with respect to /// the current time (i.e., timely), propagate it on gossip. Otherwise, ignore it. fn propagate_sync_message_if_timely( @@ -3831,6 +3848,12 @@ impl NetworkBeaconProcessor { let process_fn = Box::pin(async move { match chain.verify_envelope_for_gossip(envelope).await { Ok(verified_envelope) => { + let envelope_slot = verified_envelope.signed_envelope.slot(); + inner_self.propagate_envelope_if_timely( + envelope_slot, + message_id, + peer_id, + ); inner_self .process_gossip_verified_execution_payload_envelope( peer_id,