Skip to content
Merged
Show file tree
Hide file tree
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
8 changes: 7 additions & 1 deletion crates/common/src/pbs/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,13 @@ pub enum BuilderEvent {
GetStatusResponse,
SubmitBlockRequest(Box<SignedBlindedBeaconBlock>),
SubmitBlockResponse(Box<SubmitBlindedBlockResponse>),
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<ValidatorRegistration>),
RegisterValidatorResponse,
}
Expand Down
11 changes: 4 additions & 7 deletions crates/pbs/src/routes/submit_block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,24 +49,21 @@ pub async fn handle_submit_block<S: BuilderApiState, A: BuilderApi<S>>(

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()))
.map(|relay| &**relay.id)
.collect::<Vec<_>>()
.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(),
});
};

Expand Down