NebulousLabs / Sia-GPU-Miner

A GPU Miner for Sia
MIT License
151 stars 79 forks source link

Push initial code #2

Closed JoshVorick closed 9 years ago

JoshVorick commented 9 years ago

This is the code that mines blocks using the GPU. It works with the Sia hardfork branch (Sends and receive raw block bytes).

In it's current state, the miner prints a good amount of helpful information to the terminal (hash rate, thread number, when it finds a good nonce), but has zero interactivity.

This program mines endlessly until the program is killed (e.g. ctrl-c), meaning there is no way to stop mining from within the program itself.

It also exits if curl ever fails to communicate properly with siad. Ideally, it would only pause, notify the user, then let the user try again or kill the miner.

The program guesses at a good number of threads to use, and lets the user know the hash rate after each iteration. It does not give a hashrate when a block is mined, because the miner terminates early and therefore doesn't know how many hashes were tried.