diff --git a/beacon_node/beacon_chain/src/beacon_chain.rs b/beacon_node/beacon_chain/src/beacon_chain.rs index a94b87b400..b99bdc1674 100644 --- a/beacon_node/beacon_chain/src/beacon_chain.rs +++ b/beacon_node/beacon_chain/src/beacon_chain.rs @@ -75,7 +75,9 @@ use crate::{ kzg_utils, metrics, AvailabilityPendingExecutedBlock, BeaconChainError, BeaconForkChoiceStore, BeaconSnapshot, CachedHead, }; -use eth2::types::{EventKind, SseBlobSidecar, SseBlock, SseExtendedPayloadAttributes}; +use eth2::types::{ + EventKind, SseBlobSidecar, SseBlock, SseExtendedPayloadAttributes, SseInclusionList, +}; use execution_layer::{ BlockProposalContents, BlockProposalContentsType, BuilderParams, ChainHealth, ExecutionLayer, FailedCondition, PayloadAttributes, PayloadStatus, @@ -2395,7 +2397,10 @@ impl BeaconChain { GossipVerifiedInclusionList::verify(inclusion_list, self).inspect(|v| { metrics::inc_counter(&metrics::INCLUSION_LIST_PROCESSING_SUCCESSES); if let Some(event_handler) = self.event_handler.as_ref() { - event_handler.register(EventKind::InclusionList(Box::new(v.signed_il.clone()))); + event_handler.register(EventKind::InclusionList(SseInclusionList { + version: ForkName::Eip7805, + data: v.signed_il.clone(), + })); } }) } diff --git a/common/eth2/src/types.rs b/common/eth2/src/types.rs index ddb0c8ee24..dc7dcc120d 100644 --- a/common/eth2/src/types.rs +++ b/common/eth2/src/types.rs @@ -984,6 +984,13 @@ pub struct SseHead { pub execution_optimistic: bool, } +#[derive(PartialEq, Debug, Serialize, Deserialize, Clone)] +#[serde(bound = "E: EthSpec")] +pub struct SseInclusionList { + pub version: ForkName, + pub data: SignedInclusionList, +} + #[derive(Debug, PartialEq, Clone, Serialize, Deserialize)] pub struct BlockGossip { pub slot: Slot, @@ -1130,7 +1137,7 @@ pub enum EventKind { AttesterSlashing(Box>), BlsToExecutionChange(Box), BlockGossip(Box), - InclusionList(Box>), + InclusionList(SseInclusionList), } impl EventKind { diff --git a/consensus/types/src/inclusion_list.rs b/consensus/types/src/inclusion_list.rs index 226f48c13a..f9fd9cca89 100644 --- a/consensus/types/src/inclusion_list.rs +++ b/consensus/types/src/inclusion_list.rs @@ -27,6 +27,7 @@ pub struct InclusionList { #[serde(with = "serde_utils::quoted_u64")] pub validator_index: u64, pub inclusion_list_committee_root: Hash256, + #[serde(with = "ssz_types::serde_utils::list_of_hex_var_list")] pub transactions: Transactions, }