resolve merge conflicts

This commit is contained in:
Eitan Seri-Levi
2026-04-30 01:51:26 +02:00
544 changed files with 48684 additions and 18351 deletions

View File

@@ -21,12 +21,16 @@ pub struct ServerSentEventHandler<E: EthSpec> {
late_head: Sender<EventKind<E>>,
light_client_finality_update_tx: Sender<EventKind<E>>,
light_client_optimistic_update_tx: Sender<EventKind<E>>,
block_reward_tx: Sender<EventKind<E>>,
proposer_slashing_tx: Sender<EventKind<E>>,
attester_slashing_tx: Sender<EventKind<E>>,
bls_to_execution_change_tx: Sender<EventKind<E>>,
block_gossip_tx: Sender<EventKind<E>>,
inclusion_list_tx: Sender<EventKind<E>>,
execution_payload_tx: Sender<EventKind<E>>,
execution_payload_gossip_tx: Sender<EventKind<E>>,
execution_payload_available_tx: Sender<EventKind<E>>,
execution_payload_bid_tx: Sender<EventKind<E>>,
payload_attestation_message_tx: Sender<EventKind<E>>,
}
impl<E: EthSpec> ServerSentEventHandler<E> {
@@ -49,12 +53,16 @@ impl<E: EthSpec> ServerSentEventHandler<E> {
let (late_head, _) = broadcast::channel(capacity);
let (light_client_finality_update_tx, _) = broadcast::channel(capacity);
let (light_client_optimistic_update_tx, _) = broadcast::channel(capacity);
let (block_reward_tx, _) = broadcast::channel(capacity);
let (proposer_slashing_tx, _) = broadcast::channel(capacity);
let (attester_slashing_tx, _) = broadcast::channel(capacity);
let (bls_to_execution_change_tx, _) = broadcast::channel(capacity);
let (block_gossip_tx, _) = broadcast::channel(capacity);
let (inclusion_list_tx, _) = broadcast::channel(capacity);
let (execution_payload_tx, _) = broadcast::channel(capacity);
let (execution_payload_gossip_tx, _) = broadcast::channel(capacity);
let (execution_payload_available_tx, _) = broadcast::channel(capacity);
let (execution_payload_bid_tx, _) = broadcast::channel(capacity);
let (payload_attestation_message_tx, _) = broadcast::channel(capacity);
Self {
attestation_tx,
@@ -71,12 +79,16 @@ impl<E: EthSpec> ServerSentEventHandler<E> {
late_head,
light_client_finality_update_tx,
light_client_optimistic_update_tx,
block_reward_tx,
proposer_slashing_tx,
attester_slashing_tx,
bls_to_execution_change_tx,
block_gossip_tx,
inclusion_list_tx,
execution_payload_tx,
execution_payload_gossip_tx,
execution_payload_available_tx,
execution_payload_bid_tx,
payload_attestation_message_tx,
}
}
@@ -145,10 +157,6 @@ impl<E: EthSpec> ServerSentEventHandler<E> {
.light_client_optimistic_update_tx
.send(kind)
.map(|count| log_count("light client optimistic update", count)),
EventKind::BlockReward(_) => self
.block_reward_tx
.send(kind)
.map(|count| log_count("block reward", count)),
EventKind::ProposerSlashing(_) => self
.proposer_slashing_tx
.send(kind)
@@ -169,6 +177,26 @@ impl<E: EthSpec> ServerSentEventHandler<E> {
.inclusion_list_tx
.send(kind)
.map(|count| log_count("inclusion list", count)),
EventKind::ExecutionPayload(_) => self
.execution_payload_tx
.send(kind)
.map(|count| log_count("execution payload", count)),
EventKind::ExecutionPayloadGossip(_) => self
.execution_payload_gossip_tx
.send(kind)
.map(|count| log_count("execution payload gossip", count)),
EventKind::ExecutionPayloadAvailable(_) => self
.execution_payload_available_tx
.send(kind)
.map(|count| log_count("execution payload available", count)),
EventKind::ExecutionPayloadBid(_) => self
.execution_payload_bid_tx
.send(kind)
.map(|count| log_count("execution payload bid", count)),
EventKind::PayloadAttestationMessage(_) => self
.payload_attestation_message_tx
.send(kind)
.map(|count| log_count("payload attestation message", count)),
};
if let Err(SendError(event)) = result {
trace!(?event, "No receivers registered to listen for event");
@@ -231,10 +259,6 @@ impl<E: EthSpec> ServerSentEventHandler<E> {
self.light_client_optimistic_update_tx.subscribe()
}
pub fn subscribe_block_reward(&self) -> Receiver<EventKind<E>> {
self.block_reward_tx.subscribe()
}
pub fn subscribe_attester_slashing(&self) -> Receiver<EventKind<E>> {
self.attester_slashing_tx.subscribe()
}
@@ -255,6 +279,26 @@ impl<E: EthSpec> ServerSentEventHandler<E> {
self.inclusion_list_tx.subscribe()
}
pub fn subscribe_execution_payload(&self) -> Receiver<EventKind<E>> {
self.execution_payload_tx.subscribe()
}
pub fn subscribe_execution_payload_gossip(&self) -> Receiver<EventKind<E>> {
self.execution_payload_gossip_tx.subscribe()
}
pub fn subscribe_execution_payload_available(&self) -> Receiver<EventKind<E>> {
self.execution_payload_available_tx.subscribe()
}
pub fn subscribe_execution_payload_bid(&self) -> Receiver<EventKind<E>> {
self.execution_payload_bid_tx.subscribe()
}
pub fn subscribe_payload_attestation_message(&self) -> Receiver<EventKind<E>> {
self.payload_attestation_message_tx.subscribe()
}
pub fn has_attestation_subscribers(&self) -> bool {
self.attestation_tx.receiver_count() > 0
}
@@ -303,10 +347,6 @@ impl<E: EthSpec> ServerSentEventHandler<E> {
self.late_head.receiver_count() > 0
}
pub fn has_block_reward_subscribers(&self) -> bool {
self.block_reward_tx.receiver_count() > 0
}
pub fn has_proposer_slashing_subscribers(&self) -> bool {
self.proposer_slashing_tx.receiver_count() > 0
}
@@ -326,4 +366,24 @@ impl<E: EthSpec> ServerSentEventHandler<E> {
pub fn has_inclusion_list_subscribers(&self) -> bool {
self.inclusion_list_tx.receiver_count() > 0
}
pub fn has_execution_payload_subscribers(&self) -> bool {
self.execution_payload_tx.receiver_count() > 0
}
pub fn has_execution_payload_gossip_subscribers(&self) -> bool {
self.execution_payload_gossip_tx.receiver_count() > 0
}
pub fn has_execution_payload_available_subscribers(&self) -> bool {
self.execution_payload_available_tx.receiver_count() > 0
}
pub fn has_execution_payload_bid_subscribers(&self) -> bool {
self.execution_payload_bid_tx.receiver_count() > 0
}
pub fn has_payload_attestation_message_subscribers(&self) -> bool {
self.payload_attestation_message_tx.receiver_count() > 0
}
}