From a78ed3afdf4cd0e8e40b7e44c3087fcc1af2d0c0 Mon Sep 17 00:00:00 2001 From: KaydenML Date: Thu, 31 Oct 2024 18:39:45 -0600 Subject: [PATCH] fix: remove deneb fork --- src/types/pubsub.rs | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/types/pubsub.rs b/src/types/pubsub.rs index e864926..8b06179 100644 --- a/src/types/pubsub.rs +++ b/src/types/pubsub.rs @@ -294,16 +294,15 @@ impl PubsubMessage

{ } GossipKind::DataColumnSidecar(subnet_id) => { match fork_context.from_context_bytes(gossip_topic.fork_digest) { - // TODO(das): Remove Deneb fork - Some(fork) if *fork >= Phase::Deneb => { + Some(_fork) => { + // Load the DataColumnSidecar regardless of the specific fork phase let col_sidecar = Arc::new( DataColumnSidecar::from_ssz_default(data) .map_err(|e| format!("{:?}", e))?, ); - let sidecar_epoch = - misc::compute_epoch_at_slot::

(col_sidecar.slot()); - let peer_das_enabled = - sidecar_epoch >= fork_context.chain_config().eip7594_fork_epoch; + let sidecar_epoch = misc::compute_epoch_at_slot::

(col_sidecar.slot()); + let peer_das_enabled = sidecar_epoch >= fork_context.chain_config().eip7594_fork_epoch; + if peer_das_enabled { Ok(PubsubMessage::DataColumnSidecar(Box::new(( *subnet_id, @@ -316,8 +315,8 @@ impl PubsubMessage

{ )) } } - Some(_) | None => Err(format!( - "data_column_sidecar topic invalid for given fork digest {:?}", + None => Err(format!( + "data_column_sidecar topic invalid for unknown fork digest {:?}", gossip_topic.fork_digest )), }