Skip to content

Commit

Permalink
Add extra error messages when payload_id was not obtained
Browse files Browse the repository at this point in the history
  • Loading branch information
Tumas committed Apr 25, 2024
1 parent 81065f1 commit 83dec58
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions eth1_api/src/execution_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ impl<P: Preset, W: Wait> ExecutionService<P, W> {
finalized_eth1_block_hash: ExecutionBlockHash,
payload_attributes: Either<Phase, PayloadAttributes<P>>,
) -> Option<ForkChoiceUpdatedResponse> {
let payload_id_expected = payload_attributes.as_ref().right().is_some();

let response = self
.api
.forkchoice_updated(
Expand All @@ -126,6 +128,10 @@ impl<P: Preset, W: Wait> ExecutionService<P, W> {

match response {
Ok(response) => {
if response.payload_id.is_none() && payload_id_expected {
warn!("payload_id expected but was none: {response:?}");
}

if response.payload_status.status.is_invalid() {
warn!(
"engine_forkchoiceUpdated returned INVALID status \
Expand Down
4 changes: 4 additions & 0 deletions validator/src/validator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -873,6 +873,10 @@ impl<P: Preset, W: Wait + Sync> Validator<P, W> {
};

let Some(payload_id) = payload_id else {
error!(
"payload_id from execution layer was not received; This will lead to missed block"
);

return Ok(None);
};

Expand Down

0 comments on commit 83dec58

Please sign in to comment.