Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove deneb fork #2

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions src/types/pubsub.rs
Original file line number Diff line number Diff line change
Expand Up @@ -294,16 +294,15 @@ impl<P: Preset> PubsubMessage<P> {
}
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::<P>(col_sidecar.slot());
let peer_das_enabled =
sidecar_epoch >= fork_context.chain_config().eip7594_fork_epoch;
let sidecar_epoch = misc::compute_epoch_at_slot::<P>(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,
Expand All @@ -316,8 +315,8 @@ impl<P: Preset> PubsubMessage<P> {
))
}
}
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
)),
}
Expand Down