Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Enrich the sync log on handling the block request #11747

Merged
merged 2 commits into from
Jul 28, 2022

Conversation

liuchengxu
Copy link
Contributor

Add more info to the sync log to help debug the issue like
paritytech/polkadot-sdk#531.

cc @arkpar


debug!(
target: LOG_TARGET,
"Sending result of block request from {peer} starting at `{from_block_id:?}`: \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be put into the if branch? Because we don't send any block response in the None case? We can instead add a second logging that says that we don't send any response.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, actually we still send a response in terms of the OutgoingResponse below, which contains a result Err(()) in the case of None. blocks will be displayed as Some(100) or None which indicates we send 100 blocks or we don't send back any blocks, should be clear enough for the diagnostic purpose IMO.

@bkchr bkchr added A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit labels Jul 18, 2022
@bkchr
Copy link
Member

bkchr commented Jul 18, 2022

bot merge

@paritytech-processbot
Copy link

Waiting for commit status.

@paritytech-processbot
Copy link

Merge cancelled due to error. Error: Statuses failed for 32e36c9

@bkchr bkchr merged commit b8591d6 into paritytech:master Jul 28, 2022
DaviRain-Su pushed a commit to octopus-network/substrate that referenced this pull request Aug 23, 2022
Add more info to the log to help debug the issue like
https://github.com/paritytech/substrate/issues/11732.

Co-authored-by: Bastian Köcher <info@kchr.de>
ark0f pushed a commit to gear-tech/substrate that referenced this pull request Feb 27, 2023
Add more info to the log to help debug the issue like
https://github.com/paritytech/substrate/issues/11732.

Co-authored-by: Bastian Köcher <info@kchr.de>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants