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(miner): friendlier miner output #4219

Merged
merged 1 commit into from
Jun 22, 2022

Conversation

sdbondi
Copy link
Member

@sdbondi sdbondi commented Jun 22, 2022

Description

Cleans up the miner output:

  • output warn level to console output
  • use emojis for miner reports
  • change connect via grpc messages to info level

Motivation and Context

The miner would start with two red error messages that showed successful connections to the wallet and base node.
This PR cleans that up and adds emojis.

11:03 INFO  🔗 Connecting to base node at 127.0.0.1:18142
11:03 INFO  👛 Connecting to wallet at 127.0.0.1:18143
11:03 INFO  ⛏ Miner 0 reported 0.91MH/s with total 9.15MH/s over 10 threads. Height: 32. Target: 344194565)
11:03 INFO  ⛏ Miner 3 reported 0.59MH/s with total 5.94MH/s over 10 threads. Height: 32. Target: 344194565)
11:03 INFO  ⛏ Miner 5 reported 0.84MH/s with total 8.44MH/s over 10 threads. Height: 32. Target: 344194565)
11:03 INFO  ⛏ Miner 4 reported 0.77MH/s with total 7.69MH/s over 10 threads. Height: 32. Target: 344194565)
11:03 INFO  ⛏ Miner 6 reported 0.81MH/s with total 8.08MH/s over 10 threads. Height: 32. Target: 344194565)
11:03 INFO  ⛏ Miner 1 reported 0.79MH/s with total 7.86MH/s over 10 threads. Height: 32. Target: 344194565)
11:03 INFO  ⛏ Miner 2 reported 0.79MH/s with total 7.89MH/s over 10 threads. Height: 32. Target: 344194565)
11:03 INFO  ⛏ Miner 7 reported 0.79MH/s with total 7.91MH/s over 10 threads. Height: 32. Target: 344194565)
11:04 INFO  ⛏ Miner 9 reported 0.80MH/s with total 8.05MH/s over 10 threads. Height: 32. Target: 344194565)
11:04 INFO 💰 Found block

How Has This Been Tested?

Manually

@sdbondi sdbondi force-pushed the miner-clean-up-output branch 2 times, most recently from dea8601 to bc7b2db Compare June 22, 2022 08:35
CjS77
CjS77 previously approved these changes Jun 22, 2022
Copy link
Collaborator

@CjS77 CjS77 left a comment

Choose a reason for hiding this comment

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

LGTM, but It shouldn't be necessary to dupe messages (i.e. println + log). This should really be user-directed, and in fact, The logging backend is able to do this already.

log4rs is configurable to (for eg) direct info+ to stdout, while piping all messages to foo.log.

@sdbondi
Copy link
Member Author

sdbondi commented Jun 22, 2022

Fair enough, will go that route

@aviator-app aviator-app bot merged commit 4245838 into tari-project:development Jun 22, 2022
sdbondi added a commit to sdbondi/tari that referenced this pull request Jun 22, 2022
* development:
  fix clippies
  remove tari_core_from cbindgen build
  feat(miner): friendlier miner output (tari-project#4219)
  v0.32.5
  chore: update toolchain and fix clippy (tari-project#4212)
  feat(wallet_ffi): wallet_get_utxos() (tari-project#4209)
  chore: bump lmdb-sys dependency (tari-project#4195)
  chore(deps): upgrade randomx (tari-project#4196)
  Bump croaring to 0.5.2 - improve cross-compile in docker
  bug: remove deprecated tauri config variable (tari-project#4194)
  feat: generate wallet ffi header file automatically (tari-project#4183)
  v0.32.4
  feat(wallet-ffi): adds FFI wallet_get_utxos() and test_wallet_get_utxos() (tari-project#4180)
@sdbondi sdbondi deleted the miner-clean-up-output branch June 23, 2022 06:03
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.

3 participants