Skip to content

[Logging][Mining] Add BCLog::MINING category.#920

Merged
codeofalltrades merged 1 commit intoVeil-Project:masterfrom
Zannick:bclog
Apr 10, 2021
Merged

[Logging][Mining] Add BCLog::MINING category.#920
codeofalltrades merged 1 commit intoVeil-Project:masterfrom
Zannick:bclog

Conversation

@Zannick
Copy link
Collaborator

@Zannick Zannick commented Apr 4, 2021

Problem

Mining code uses the BLOCKCREATION logging category, which includes logging about difficulty targets, staking, zerocoins, etc, making it harder to investigate mining-specific issues.

Root Cause

Using the BLOCKCREATION category for lots of different information.

Solution

Adds a new logging category MINING to aid debugging mining specifically
without including block template creation logs that may be noisier.

Converts most logs in BitcoinMiner and RandomXMiner to use this category
instead of BLOCKCREATION.

Fixes one unlikely logging statement to include the function name.

Bounty Payment Address

sv1qqpswvjy7s9yrpcmrt3fu0kd8rutrdlq675ntyjxjzn09f965z9dutqpqgg85esvg8mhmyka5kq5vae0qnuw4428vs9d2gu4nz643jv5a72wkqqq73mnxr

Unit Testing Results

Tested by running and sending the command logging [\"mining\"] to enable.

Copy link
Collaborator

@CaveSpectre11 CaveSpectre11 left a comment

Choose a reason for hiding this comment

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

One small correction and then it should be good.

@CaveSpectre11 CaveSpectre11 added Component: Core App Related to the application itself. Component: Miner Both PoW and PoS block creation Tag: Waiting For Code Review Waiting for code review from a core developer labels Apr 5, 2021
Adds a new logging category MINING to aid debugging mining specifically
without including block template creation logs that may be noisier.

Converts most logs in BitcoinMiner and RandomXMiner to use this category
instead of BLOCKCREATION.

Fixes one unlikely logging statement to include the function name.
Copy link
Collaborator

@CaveSpectre11 CaveSpectre11 left a comment

Choose a reason for hiding this comment

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

utACK 8dfd59a

Copy link
Collaborator

@codeofalltrades codeofalltrades left a comment

Choose a reason for hiding this comment

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

ACK 8dfd59a
Tested on Win10

@codeofalltrades codeofalltrades added Code Review: Passed Tag: Waiting For QA A pull review is waiting for QA to test the pull request and removed Tag: Waiting For Code Review Waiting for code review from a core developer labels Apr 7, 2021
@codeofalltrades codeofalltrades merged commit be63fb7 into Veil-Project:master Apr 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Code Review: Passed Component: Core App Related to the application itself. Component: Miner Both PoW and PoS block creation Tag: Waiting For QA A pull review is waiting for QA to test the pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants