From a4723b68a0e8ec92d223cc01bccec4c67d85467b Mon Sep 17 00:00:00 2001 From: ltitanb Date: Thu, 21 Nov 2024 20:09:18 +0000 Subject: [PATCH] relays var name --- crates/common/src/pbs/event.rs | 8 +++++++- crates/pbs/src/routes/submit_block.rs | 11 ++++------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/crates/common/src/pbs/event.rs b/crates/common/src/pbs/event.rs index 043f8df9..93a3499e 100644 --- a/crates/common/src/pbs/event.rs +++ b/crates/common/src/pbs/event.rs @@ -31,7 +31,13 @@ pub enum BuilderEvent { GetStatusResponse, SubmitBlockRequest(Box), SubmitBlockResponse(Box), - MissedPayload { block_hash: B256, relays: String }, + MissedPayload { + /// Hash for the block for which no payload was received + block_hash: B256, + /// Relays which delivered the header but for which no payload was + /// received + missing_relays: String, + }, RegisterValidatorRequest(Vec), RegisterValidatorResponse, } diff --git a/crates/pbs/src/routes/submit_block.rs b/crates/pbs/src/routes/submit_block.rs index 66e2ed23..8773ce27 100644 --- a/crates/pbs/src/routes/submit_block.rs +++ b/crates/pbs/src/routes/submit_block.rs @@ -49,7 +49,7 @@ pub async fn handle_submit_block>( Err(err) => { if let Some(fault_pubkeys) = state.get_relays_by_block_hash(slot, block_hash) { - let fault_relays = state + let missing_relays = state .relays() .iter() .filter(|relay| fault_pubkeys.contains(&relay.pubkey())) @@ -57,16 +57,13 @@ pub async fn handle_submit_block>( .collect::>() .join(","); - error!(%err, %block_hash, fault_relays, "CRITICAL: no payload received from relays"); - state.publish_event(BuilderEvent::MissedPayload { - block_hash, - relays: fault_relays, - }); + error!(%err, %block_hash, missing_relays, "CRITICAL: no payload received from relays"); + state.publish_event(BuilderEvent::MissedPayload { block_hash, missing_relays }); } else { error!(%err, %block_hash, "CRITICAL: no payload delivered and no relay for block hash. Was getHeader even called?"); state.publish_event(BuilderEvent::MissedPayload { block_hash, - relays: String::default(), + missing_relays: String::default(), }); };