Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Merged by Bors] - Log a debug message when a request fails for a beacon node candidate #4036

Closed
Closed
Changes from 1 commit
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 validator_client/src/beacon_node_fallback.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use crate::http_metrics::metrics::{inc_counter_vec, ENDPOINT_ERRORS, ENDPOINT_RE
use environment::RuntimeContext;
use eth2::BeaconNodeHttpClient;
use futures::future;
use slog::{error, info, warn, Logger};
use slog::{debug, error, info, warn, Logger};
use slot_clock::SlotClock;
use std::fmt;
use std::fmt::Debug;
Expand Down Expand Up @@ -413,6 +413,7 @@ impl<T: SlotClock, E: EthSpec> BeaconNodeFallback<T, E> {
let mut errors = vec![];
let mut to_retry = vec![];
let mut retry_unsynced = vec![];
let log = &self.log.clone();

// Run `func` using a `candidate`, returning the value or capturing errors.
//
Expand All @@ -427,6 +428,11 @@ impl<T: SlotClock, E: EthSpec> BeaconNodeFallback<T, E> {
match func(&$candidate.beacon_node).await {
Ok(val) => return Ok(val),
Err(e) => {
debug!(
log,
"Request failed for candidate beacon node {}. BN candidate may not be ready.",
$candidate.beacon_node.to_string(),
);
michaelsproul marked this conversation as resolved.
Show resolved Hide resolved
// If we have an error on this function, make the client as not-ready.
//
// There exists a race condition where the candidate may have been marked
Expand Down