Configurable progress reporting #13

Merged
uwiger merged 1 commits from uw-progress-reporting into master 2025-09-24 14:44:10 +09:00
Owner

The headless miner can now be configured to autostart with either progress or debug reporting. Example:

zxh start uwiger-gmhive_client -gmhc report progress

Valid options are debug, progress and silent (default).

Reporting can also be started from the shell, using either gmhc_events:debug() or gmhc_events:progress(). Only one reporter can be running at any given time. gmhc_events:stop() stops a running reporter.

Example progress reporting:

2025-09-23T14:06:36.548Z Trying nonce: 17369556461970787123
2025-09-23T14:06:36.998Z Trying nonce: 17369556461970837700
2025-09-23T14:06:37.490Z Found! Reporting 1 cycles to leader.
2025-09-23T14:06:37.521Z Trying nonce: 17369556461970938854
2025-09-23T14:06:37.941Z Trying nonce: 17369556461971040008
2025-09-23T14:06:38.439Z Found! Reporting 1 cycles to leader.
2025-09-23T14:06:38.481Z Trying nonce: 17369556461971124303
2025-09-23T14:06:38.706Z The hive has produced a solution! Sequence: 249625
2025-09-23T14:06:38.736Z Trying nonce: 17719205799749851452
2025-09-23T14:06:38.824Z Unexpected 'result': {error,{runtime,{invalid_output,0}}}
2025-09-23T14:06:38.925Z Trying nonce: 17719205799751154915

The reporting strings are available via the function gmhc_events:rpt_progress(EventTag, Info). The returned string doesn't add starting or ending newlines, nor the timestamp shown above.

The headless miner can now be configured to autostart with either progress or debug reporting. Example: ``` zxh start uwiger-gmhive_client -gmhc report progress ``` Valid options are `debug`, `progress` and `silent` (default). Reporting can also be started from the shell, using either `gmhc_events:debug()` or `gmhc_events:progress()`. Only one reporter can be running at any given time. `gmhc_events:stop()` stops a running reporter. Example progress reporting: ``` 2025-09-23T14:06:36.548Z Trying nonce: 17369556461970787123 2025-09-23T14:06:36.998Z Trying nonce: 17369556461970837700 2025-09-23T14:06:37.490Z Found! Reporting 1 cycles to leader. 2025-09-23T14:06:37.521Z Trying nonce: 17369556461970938854 2025-09-23T14:06:37.941Z Trying nonce: 17369556461971040008 2025-09-23T14:06:38.439Z Found! Reporting 1 cycles to leader. 2025-09-23T14:06:38.481Z Trying nonce: 17369556461971124303 2025-09-23T14:06:38.706Z The hive has produced a solution! Sequence: 249625 2025-09-23T14:06:38.736Z Trying nonce: 17719205799749851452 2025-09-23T14:06:38.824Z Unexpected 'result': {error,{runtime,{invalid_output,0}}} 2025-09-23T14:06:38.925Z Trying nonce: 17719205799751154915 ``` The reporting strings are available via the function `gmhc_events:rpt_progress(EventTag, Info)`. The returned string doesn't add starting or ending newlines, nor the timestamp shown above.
uwiger added 1 commit 2025-09-23 23:53:43 +09:00
uwiger requested review from dimitar.p.ivanov 2025-09-23 23:53:43 +09:00
uwiger requested review from spivee 2025-09-23 23:53:43 +09:00
uwiger requested review from zxq9 2025-09-23 23:53:44 +09:00
spivee approved these changes 2025-09-24 11:37:12 +09:00
spivee left a comment
Member

Handy! Craig is adding new messages downstream, as we speak, but our users running headless miners currently are savvy enough to comprehend what a 404 message in their systemd logs would mean, so I guess it is fine. 'One day' I am sure that 'someone' will get these things streamlined down to one central list of cases ;)

Handy! Craig is adding new messages downstream, as we speak, but our users running headless miners currently are savvy enough to comprehend what a 404 message in their systemd logs would mean, so I guess it is fine. 'One day' I am sure that 'someone' will get these things streamlined down to one central list of cases ;)
zxq9 approved these changes 2025-09-24 14:36:15 +09:00
zxq9 left a comment
Owner

This is great!

This is great!
Owner

Handy! Craig is adding new messages downstream, as we speak, but our users running headless miners currently are savvy enough to comprehend what a 404 message in their systemd logs would mean, so I guess it is fine. 'One day' I am sure that 'someone' will get these things streamlined down to one central list of cases ;)

Not exactly adding messages, but matching messages that weren't being matched and fell back to being printed as Erlang terms straight in the text message window -- which was exploding muggle brains!

> Handy! Craig is adding new messages downstream, as we speak, but our users running headless miners currently are savvy enough to comprehend what a 404 message in their systemd logs would mean, so I guess it is fine. 'One day' I am sure that 'someone' will get these things streamlined down to one central list of cases ;) Not exactly adding messages, but matching messages that weren't being matched and fell back to being printed as Erlang terms straight in the text message window -- which was exploding muggle brains!
uwiger merged commit 8cb2c76614 into master 2025-09-24 14:44:10 +09:00
Sign in to join this conversation.
No Milestone
No project
3 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: QPQ-AG/gmhive_client#13
No description provided.