Skip to content
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

feat: improve logging for tari_mining_node #3449

Merged
merged 2 commits into from Oct 18, 2021

Conversation

StriderDM
Copy link
Contributor

@StriderDM StriderDM commented Oct 13, 2021

Description

This PR improves the logging for tari_mining_node by making use of the log4rs target, it also sets the default logging level to info.
This PR also adds basic statistics for pool mining which are automatically displayed at a 20s interval.

Motivation and Context

How Has This Been Tested?

Manually

Copy link
Contributor

@philipr-za philipr-za left a comment

Choose a reason for hiding this comment

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

Tested this out and I have two comments:
Firstly, the stats are only displayed when a share is found and between finding a share there is no activity on the terminal at all. I would prefer a periodic output of the stats including the number of threads being used.

Secondly, the output is still linked to the log level of the miner directly. This means the log file also only has the minimal Info in it and if you change this level to Debug the terminal is flooded. Rather have a unique Target for the terminal output and then pipe the actual logs into the file.

Copy link
Contributor

@philipr-za philipr-za left a comment

Choose a reason for hiding this comment

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

Looking way better. Just one question, the estimated Sol/s number seems off? What unit is in? I think just include the unit for clarity.

@StriderDM
Copy link
Contributor Author

It is (S/s), which is the share rate as seen in the pool UI. Only counting the solutions found rather than how many hashes the miner is doing.

@philipr-za
Copy link
Contributor

It is (S/s), which is the share rate as seen in the pool UI. Only counting the solutions found rather than how many hashes the miner is doing.

Def need to put hashrate, this is the key metric that a Miner cares about and tries to optimize.

This PR improves the logging for tari_mining_node by making use of the log4rs target, it also sets the default logging level to info.
This PR also adds basic statistics for pool mining which are automatically displayed on a 20s interval.

Review comments
Add additional log target, split logging messages between terminal and file.
Updated stratum miner to display basic statistics every 20 seconds instead of when changing jobs.
Added info message to indicate hashing is in progress for stratum miner.
Added hash rate to displayed statistics in additon to share rate.
Included metric for share and hash rates.

Error handling for rejected share
@aviator-app aviator-app bot merged commit db9eb96 into tari-project:development Oct 18, 2021
sdbondi added a commit to sdbondi/tari that referenced this pull request Oct 18, 2021
* development:
  fix: ensure that accumulated orphan chain data is committed before header validation (tari-project#3462)
  fix: remove is_synced check for transaction validation (tari-project#3459)
  feat: improve logging for tari_mining_node (tari-project#3449)
sdbondi added a commit to sdbondi/tari that referenced this pull request Oct 18, 2021
* development:
  fix: ensure that accumulated orphan chain data is committed before header validation (tari-project#3462)
  fix: remove is_synced check for transaction validation (tari-project#3459)
  feat: improve logging for tari_mining_node (tari-project#3449)
sdbondi added a commit to sdbondi/tari that referenced this pull request Oct 25, 2021
* development: (31 commits)
  feat!: revalidate all outputs (tari-project#3471)
  fix: check SAF message inflight and check stored_at is in past (tari-project#3444)
  feat!: apps should not depend on other app configs (tari-project#3469)
  fix: fix recovery test reporting message (tari-project#3479)
  chore: improve cucumber tests to wait for broadcast (tari-project#3461)
  test: use TCP node for daily sync test (tari-project#3464)
  fix: remove unbounded vec allocations from base node grpc/p2p messaging (tari-project#3467)
  fix: upgrade rustyline dependencies (tari-project#3476)
  fix(dht): discard encrypted message with no destination (tari-project#3472)
  fix: remove consensus breaking change in transaction input (tari-project#3474)
  feat: tx weight takes tariscript and output features into account [igor] (tari-project#3411)
  fix: validate dht header before dedup cache (tari-project#3468)
  fix: sha256sum isn't available on all *nix platforms (tari-project#3466)
  fix: typo in console wallet (tari-project#3465)
  fix: ensure that accumulated orphan chain data is committed before header validation (tari-project#3462)
  fix: remove is_synced check for transaction validation (tari-project#3459)
  feat: improve logging for tari_mining_node (tari-project#3449)
  fix: remove unnecessary wallet dependency (tari-project#3438)
  test: simplify cucumber tests (tari-project#3457)
  ci: create script to update DNS records from hashes.txt (tari-project#3458)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants