-
Notifications
You must be signed in to change notification settings - Fork 1.2k
feat: remove useless debug logs and improve mocktime logging #6707
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
…eNodes' which triggers on each send / receive bytes
… member `IsMiningPhase` be anonymous function
Firstly, production code (even in debug mode) should not operate as unit test by calling heavy GetMN just to be sure that implementation is not broken. Secondly, since mn_rr hard-fork is activated it doesn't affect any new blocks; but it is used for validation of old blocks only. Thirdly, it removes useless log record (especially now when no more 4x payments for Evo Nodes). 2025-05-31T19:40:51.578629Z (mocktime: 2014-12-04T17:29:28Z) [httpworker] [evo/deterministicmns.cpp:1023] [BuildNewListFromBlock] [mnpayments] CDeterministicMNManager::BuildNewListFromBlock -- MN ae67835776b01b4ad9b153c829bf30fe70e8c3699a09ddcebe431712c38cee63, nConsecutivePayments=0
Firstly, it's easier to spot changes in mocktime and calculate how long if time is logged in seconds. Secondly, the start time `2014-12-04T17:15:37Z` (genesis block) is not round number which makes calculation of "how much exactly time pass" even more difficult.
WalkthroughThis set of changes primarily focuses on reducing and simplifying debug logging across several source files. In 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (5)
💤 Files with no reviewable changes (3)
🧰 Additional context used🧬 Code Graph Analysis (1)src/llmq/blockprocessor.cpp (1)
🪛 GitHub Actions: Clang Diff Format Checksrc/llmq/blockprocessor.cpp[error] 220-330: Clang format differences found. The file does not adhere to the required code style and formatting rules. Please run clang-format to fix formatting issues. ⏰ Context from checks skipped due to timeout of 90000ms (2)
🔇 Additional comments (3)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Issue being fixed or feature implemented
I have been lately watching to debug logs really a lot while investigating various flackiness in functional tests, and there are some adjustment that I found as useful.
What was done?
remove mapSendableNodes
anremove mapReceivableNodes
lines that are triggered for almost each received network packageThere's still plenty logs about network connection, but that particular line is useless.
CQuorumBlockProcessor::ProcessCommitment
is simplified to just ProcessCommitment2014-12-04T17:15:37Z
and2014-12-04T17:15:38Z
I find difficult to do, especially if mocktime bumped for more than 1 second or multiple times; it requires to do some math also over module 60 (60 seconds in minute).How Has This Been Tested?
It makes reading by eyes much more friendly because less items to read and lines a bit shorter, and less matches by block hash / protx hashes when you are looking for some particular records.
As positive side effect, total size of all logs of all functional tests is decreased for ~200Mb (1.7Gb -> 1.5Gb).
Breaking Changes
N/A
Checklist: