-
Notifications
You must be signed in to change notification settings - Fork 7
prosper-miner service #62
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: master
Are you sure you want to change the base?
prosper-miner service #62
Conversation
This command allows for the collection of statistics at any time, instead of waiting until submitting results.
Add notification channels for the current hash rate and for submissions. This goroutine and these notification channels allow programs to provide users with current statistics.
If `InitMiners` has not completed (because LXRHash is building the 1GB table file) and the `ReportHashRate` timer is triggered, the `SendCommand` call dereferences a null pointer. (It might be a good idea to add a check in `SendCommand`.) This change defers starting the `ReportHashRate` goroutine until the end of `InitMiners`.
Add the "startfeed" and "stopfeed" commands. The feed will print a message when a share is submitted and print the current hash rate at regular intervals.
891ff3a fixed a crash by moving a goroutine. This change fixes that fix by putting the goroutine outside of the loop.
This call duplicates a call made in client.Listen, which calls client.Close when the context is cancelled.
This change, which has only been tested on Windows 10, adds a Windows service (eventually also a *NIX/macOS daemon.) The newly-added service command can start, stop, install and uninstall the service on Windows, provided the account running the command has sufficient privileges. This service has a JSON-RPC server which listens on a named pipe. The change also adds the rpc and feed commands, which can control and query the state of the miner service.
Prior to this change, subscriptions only delivered each event to one client, generally in a round-robin fashion. This change ensures that each event is delivered to all clients. Add status subscriptions. As of this commit, subscribed clients receive notifications for connection to and disconnection from the pool.
This call duplicates a call that happens when the context is cancelled and resulted in freeing a semaphore twice.
Add the selectConfigFile which handles finding the proper config file by priority. Add tests for selectConfigFile.
|
I've verified that the service works on macOS, x86_64 and arm64 linux in addition to x86_64 Windows. The missing feature has been merged to LXRHash. I'm currently working on merging the configuration code used by the service and the foreground process. Last week I documented the protocol that prosper-miner speaks to controlling processes. I've documented but not implemented a flow for registration via the GUI. |
This collection of changes allows the prosper-miner to run as a Windows service (and hopefully a *NIX daemon soon.) This change adds the following commands to the executable:
service: install, uninstall, start and stop the servicerpc: control and query the service using JSON-RPC over a named-pipefeed: print notifications from the service when a share is submitted and regular notifications of the hash rateThis PR needs some work in the following areas:
the service does not yet work on non-Windows platformsthe service currently depends on Add InitWithPath pegnet/LXRHash#71, which has not been mergedlxr.HashParallelbecause of some unanswered questionsI'm opening this PR so the appropriate people can start reviewing and asking questions.
This PR is built on the changes submitted in #61.