From a6b771f265f5ccd81b42936896d97c1af5a2fd32 Mon Sep 17 00:00:00 2001 From: Jimmy Chen Date: Thu, 22 Dec 2022 00:19:22 +1100 Subject: [PATCH 1/4] Add more logging to `Error::MaxDistanceExceeded` --- beacon_node/beacon_chain/src/state_advance_timer.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/beacon_node/beacon_chain/src/state_advance_timer.rs b/beacon_node/beacon_chain/src/state_advance_timer.rs index f73223fa5..3d21a14c8 100644 --- a/beacon_node/beacon_chain/src/state_advance_timer.rs +++ b/beacon_node/beacon_chain/src/state_advance_timer.rs @@ -186,7 +186,7 @@ async fn state_advance_timer( head_slot, }) => debug!( log, - "Refused to advance head state"; + "Refused to advance head state. Chain may be syncing or lagging too far behind"; "head_slot" => head_slot, "current_slot" => current_slot, ), From 14aa87aff3e5c3d6fde2cf7e8de2952bdea12be1 Mon Sep 17 00:00:00 2001 From: Jimmy Chen Date: Thu, 22 Dec 2022 00:19:38 +1100 Subject: [PATCH 2/4] Fix code comment --- beacon_node/http_api/src/lib.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/beacon_node/http_api/src/lib.rs b/beacon_node/http_api/src/lib.rs index 30a222145..e5336ef6a 100644 --- a/beacon_node/http_api/src/lib.rs +++ b/beacon_node/http_api/src/lib.rs @@ -1125,11 +1125,8 @@ pub fn serve( .map(|()| warp::reply()) }, ); - /* - * beacon/blocks - */ - // POST beacon/blocks + // POST beacon/blinded_blocks let post_beacon_blinded_blocks = eth_v1 .and(warp::path("beacon")) .and(warp::path("blinded_blocks")) From ccfd092845dc1d90db20369f00069644a64bfc8a Mon Sep 17 00:00:00 2001 From: Jimmy Chen Date: Thu, 22 Dec 2022 00:22:37 +1100 Subject: [PATCH 3/4] Fix blob request logging and incorrect enum type --- beacon_node/network/src/sync/network_context.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/beacon_node/network/src/sync/network_context.rs b/beacon_node/network/src/sync/network_context.rs index 5917c7ecc..19efd97c4 100644 --- a/beacon_node/network/src/sync/network_context.rs +++ b/beacon_node/network/src/sync/network_context.rs @@ -178,7 +178,7 @@ impl SyncNetworkContext { ExpectedBatchTy::OnlyBlock => { trace!( self.log, - "Sending BlocksByRange Request"; + "Sending BlocksByRange request"; "method" => "BlocksByRange", "count" => request.count, "peer" => %peer_id, @@ -197,7 +197,7 @@ impl SyncNetworkContext { ExpectedBatchTy::OnlyBlockBlobs => { debug!( self.log, - "Sending BlockBlock by range request"; + "Sending BlobsByRange request"; "method" => "Mixed by range request", "count" => request.count, "peer" => %peer_id, @@ -245,7 +245,7 @@ impl SyncNetworkContext { ExpectedBatchTy::OnlyBlock => { trace!( self.log, - "Sending backfill BlocksByRange Request"; + "Sending backfill BlocksByRange request"; "method" => "BlocksByRange", "count" => request.count, "peer" => %peer_id, @@ -264,7 +264,7 @@ impl SyncNetworkContext { ExpectedBatchTy::OnlyBlockBlobs => { debug!( self.log, - "Sending BlockBlock by range request"; + "Sending backfill BlobsByRange request"; "method" => "Mixed by range request", "count" => request.count, "peer" => %peer_id, @@ -272,7 +272,7 @@ impl SyncNetworkContext { // create the shared request id. This is fine since the rpc handles substream ids. let id = self.next_id(); - let request_id = RequestId::Sync(SyncRequestId::RangeSidecarPair { id }); + let request_id = RequestId::Sync(SyncRequestId::BackFillSidecarPair { id }); // Create the blob request based on the blob request. let blobs_request = Request::BlobsByRange(BlobsByRangeRequest { From f7bb458c5e5c25a0500822a76bd8741f4082bba0 Mon Sep 17 00:00:00 2001 From: Jimmy Chen Date: Thu, 22 Dec 2022 02:01:11 +1100 Subject: [PATCH 4/4] Fix incorrect logging --- beacon_node/network/src/sync/network_context.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/beacon_node/network/src/sync/network_context.rs b/beacon_node/network/src/sync/network_context.rs index 19efd97c4..251ac92bb 100644 --- a/beacon_node/network/src/sync/network_context.rs +++ b/beacon_node/network/src/sync/network_context.rs @@ -197,7 +197,7 @@ impl SyncNetworkContext { ExpectedBatchTy::OnlyBlockBlobs => { debug!( self.log, - "Sending BlobsByRange request"; + "Sending BlocksByRange and BlobsByRange requests"; "method" => "Mixed by range request", "count" => request.count, "peer" => %peer_id, @@ -264,7 +264,7 @@ impl SyncNetworkContext { ExpectedBatchTy::OnlyBlockBlobs => { debug!( self.log, - "Sending backfill BlobsByRange request"; + "Sending backfill BlocksByRange and BlobsByRange requests"; "method" => "Mixed by range request", "count" => request.count, "peer" => %peer_id,