From 0f79d2e60d5b0279b19910dab78fe93503b7d1fe Mon Sep 17 00:00:00 2001 From: Bryan Stitt Date: Tue, 16 May 2023 18:29:56 -0700 Subject: [PATCH] more loud logs --- web3_proxy/src/rpcs/many.rs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/web3_proxy/src/rpcs/many.rs b/web3_proxy/src/rpcs/many.rs index cf8e7f1c..3bfe94ad 100644 --- a/web3_proxy/src/rpcs/many.rs +++ b/web3_proxy/src/rpcs/many.rs @@ -633,8 +633,8 @@ impl Web3Rpcs { None => { // none of the servers gave us a time to retry at debug!( - "{:?} - no servers in {} gave a retry time! Skipped {:?}", - request_ulid, self, skip + "{:?} - no servers in {} gave a retry time! Skipped {:?}. {:#?}", + request_ulid, self, skip, usable_rpcs_by_tier_and_head_number ); // TODO: bring this back? need to think about how to do this with `allow_backups` @@ -1933,13 +1933,16 @@ async fn watch_for_block( skip_rpcs: &[Arc], watch_consensus_rpcs: &mut watch::Receiver>>, ) -> Web3ProxyResult { - debug!("waiting for {:?}", needed_block_num); - let mut best_block_num: Option = watch_consensus_rpcs .borrow_and_update() .as_ref() .and_then(|x| x.best_block_num(needed_block_num, skip_rpcs).copied()); + debug!( + "waiting for {:?}. best {:?}", + needed_block_num, best_block_num + ); + match (needed_block_num, best_block_num.as_ref()) { (Some(x), Some(best)) => { if x <= best { @@ -1947,6 +1950,7 @@ async fn watch_for_block( // this happens if the block is old and all archive servers are offline // there is no chance we will get this block without adding an archive server to the config // TODO: i think this can also happen if we are being rate limited! but then waiting might work. need skip_rpcs to be smarter + warn!("watching for block {} will never succeed. best {}", x, best); return Ok(false); } }