Repository navigation
chore(chain,wire): lower three per-message debug logs to trace - #20
Open
lorenzolfm wants to merge 1 commit into
Open
lorenzolfm wants to merge 1 commit into
lorenzolfm wants to merge 1 commit into
Conversation
`Header builds on top of our best chain` fires once per header, and the per-P2P-message `Received`/`Writing` lines and `Handling node request` (which Debug-prints the whole GetHeaders locator) fire once per message. Together they were 99% of `--debug` output during signet header sync.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description and Notes
Part of
getfloresta/floresta#167("[tracking-issue] Audit logging and identify improvements").This PR only changes the level of three
debug!call sites totrace!. They fire once per header or once per P2P message, and they made up nearly all--debugoutput:--debug, beforeHeader builds on top of our best chaincrates/floresta-chain/src/pruned_utreexo/chain_state.rsReceived {cmd} from peer N/Writing {cmd} to peer Ncrates/floresta-wire/src/p2p_wire/peer.rsHandling node request: {request:?}(prints the full GetHeaders locator)crates/floresta-wire/src/p2p_wire/peer.rsAfter this change,
--debugleaves the connection lifecycle (attempts, transport, timeouts, address exchange) readable instead of buried under header sync.Not in this PR (possible follow-ups): adding height/hash to the header line, logging just the command name instead of
{request:?}, and changing the default--debugfilter directive.How to verify the changes you have done?
Fresh signet run, 4 minutes each, same machine. Header sync completes (height 330k) in all runs.
--debug--debugRUST_LOG=debug,floresta_chain=trace,floresta_wire=trace+--debugcargo +nightly fmt --check,cargo hack clippy --feature-powerset --all-targets -- -D warningsonfloresta-chainandfloresta-wire, andcargo test -p floresta-chain -p floresta-wirepass.