decred / gominer

Go (golang) based GPU miner for Decred.
GNU General Public License v3.0
160 stars 80 forks source link

Remote management / Status API #163

Closed gabrielboliveira closed 6 years ago

gabrielboliveira commented 7 years ago

I asked this question on #support at Decred Slack, but since no one answered I came here to suggest a new feature on Gominer.

It would be great if it had a remote management and status API, for example Claymore's mining software. There are a few tools to monitor and manage the the miner, such as ethmon.

Claymore's tool exposes a socket so you can retrieve hash rate, connected pool, accepted and rejected shares, etc. Also you can restart and upload config files to change. Example code on how to connect to it.

I wanted to create a notification tool with status information, and remote watch the miner. I could watch the log file and create a REST middleware, but if the miner software itself exposed these methods would be perfect.

jcvernaleo commented 7 years ago

Personally I don't love the idea of being able to control gominer remotely. One can easily always run it in tmux or screen to allow persistant connections and if one has a cluster of them for example use existing tools to manage multiple machines over ssh. Also remote management would require auth of some kind which is a complexity I'd prefer not to see in gominer.

That said, some sort of remote monitering api would be very cool so I'm totally in favor of something like that.

gabrielboliveira commented 7 years ago

@jcvernaleo I agree with the remote control issues. Indeed other miners that implement this does not consider any auth, only enable/disable the control part.

What i've seen is that some tool to manage multiple local miners, but again it's not a easy thing to configure.

The monitor API is as simple as exposing the same information logged on info level, I believe.

jcvernaleo commented 7 years ago

I think (and I could be wrong so feel free to check and correct me) that the logging in gominer's INFO level is not all totally thought out. Might be worth opening a separate issue to go through and make sure the logging levels are correct and have good things in them if a monitor api was going to take similar data.

gabrielboliveira commented 7 years ago

What I consider essential information:

Maybe:

What do you think?

jcvernaleo commented 7 years ago

I would add device name to the device info list.

gabrielboliveira commented 7 years ago

@jcvernaleo agreed!

How do we proceed with this feature? I could help.

jcvernaleo commented 7 years ago

If you are a dev yourself you can join the #dev channel in slack and try to start hacking on it yourself. There should be people there who can help. @jolan in particular is the main gominer dev right now.