diff --git a/client/consensus/common/src/import_queue/basic_queue.rs b/client/consensus/common/src/import_queue/basic_queue.rs index 653c883215..66b81242e9 100644 --- a/client/consensus/common/src/import_queue/basic_queue.rs +++ b/client/consensus/common/src/import_queue/basic_queue.rs @@ -251,6 +251,12 @@ async fn block_import_process( ) .await; + log::debug!( + target: LOG_TARGET, + "send block import results to buffered link {:?} {:?}", + res.imported, + res.block_count, + ); result_sender.blocks_processed(res.imported, res.block_count, res.results); } } diff --git a/client/consensus/common/src/import_queue/buffered_link.rs b/client/consensus/common/src/import_queue/buffered_link.rs index c23a4b0d5d..da2c84eb93 100644 --- a/client/consensus/common/src/import_queue/buffered_link.rs +++ b/client/consensus/common/src/import_queue/buffered_link.rs @@ -38,7 +38,7 @@ //! }); //! ``` -use crate::import_queue::{Link, RuntimeOrigin}; +use crate::import_queue::{Link, RuntimeOrigin, LOG_TARGET}; use futures::prelude::*; use sc_utils::mpsc::{tracing_unbounded, TracingUnboundedReceiver, TracingUnboundedSender}; use sp_runtime::traits::{Block as BlockT, NumberFor}; @@ -95,6 +95,7 @@ impl Link for BufferedLinkSender { count: usize, results: Vec<(BlockImportResult, B::Hash)>, ) { + log::debug!(target: LOG_TARGET, "send results to block import worker {imported} {count}",); let _ = self .tx .unbounded_send(BlockImportWorkerMsg::BlocksProcessed(imported, count, results)); @@ -127,8 +128,13 @@ impl BufferedLinkReceiver { /// Send action for the synchronization to perform. pub fn send_actions(&mut self, msg: BlockImportWorkerMsg, link: &mut dyn Link) { match msg { - BlockImportWorkerMsg::BlocksProcessed(imported, count, results) => - link.blocks_processed(imported, count, results), + BlockImportWorkerMsg::BlocksProcessed(imported, count, results) => { + log::debug!( + target: LOG_TARGET, + "send results to chainsyncservice {imported} {count}", + ); + link.blocks_processed(imported, count, results) + }, BlockImportWorkerMsg::JustificationImported(who, hash, number, success) => link.justification_imported(who, &hash, number, success), BlockImportWorkerMsg::RequestJustification(hash, number) => diff --git a/client/network/sync/src/engine.rs b/client/network/sync/src/engine.rs index eca0ebfe41..c1fdaddb85 100644 --- a/client/network/sync/src/engine.rs +++ b/client/network/sync/src/engine.rs @@ -657,6 +657,7 @@ where ToServiceCommand::ClearJustificationRequests => self.chain_sync.clear_justification_requests(), ToServiceCommand::BlocksProcessed(imported, count, results) => { + log::debug!(target: "sync", "syncingengine on_blocks_processed {imported} {count}"); for result in self.chain_sync.on_blocks_processed(imported, count, results) { match result { Ok((id, req)) => self.chain_sync.send_block_request(id, req), diff --git a/client/network/sync/src/lib.rs b/client/network/sync/src/lib.rs index 29c4bc840b..86ba86c835 100644 --- a/client/network/sync/src/lib.rs +++ b/client/network/sync/src/lib.rs @@ -2691,7 +2691,7 @@ where count: usize, results: Vec<(Result>, BlockImportError>, B::Hash)>, ) -> Box), BadPeer>>> { - trace!(target: "sync", "Imported {} of {}", imported, count); + trace!(target: "sync", "Imported {} of {} {}", imported, count, self.queue_blocks.len()); let mut output = Vec::new(); @@ -2703,6 +2703,7 @@ where gap_sync.blocks.clear_queued(hash); } } + trace!(target: "sync", "queue cleared {}", self.queue_blocks.len()); for (result, hash) in results { if has_error { break diff --git a/client/network/sync/src/service/chain_sync.rs b/client/network/sync/src/service/chain_sync.rs index f9e0e401fd..b68c59f9ec 100644 --- a/client/network/sync/src/service/chain_sync.rs +++ b/client/network/sync/src/service/chain_sync.rs @@ -206,6 +206,7 @@ impl Link for SyncingService { count: usize, results: Vec<(Result>, BlockImportError>, B::Hash)>, ) { + log::debug!(target: "sync", "send results to syncingengine {imported} {count}"); let _ = self .tx .unbounded_send(ToServiceCommand::BlocksProcessed(imported, count, results));