Post
Topic
Board Mining (Altcoins)
Re: [ANN] sgminer v5 - new unified multi-algorithm on-the-fly kernel switching miner
by
langes01x
on 09/07/2014, 00:59:22 UTC
I have proposal for stratum extension to support algorithm change without reconnects.

First, we need to normalize name of the algorithms; example:

Code:
scrypt, nscrypt, x11, x13, x15

Miner subscribes to server that it is capable of switching algorithms. It also sends parameter list. Each parameter consists of 3 parameters: algorithm name, factor and cost. Factor is speed in MH/s (it is only important to be relative to other provided factors of other algorithms), cost is daily cost of rig in USD.

Example for 2 algorithms:

Code:
{"id": X, "method": "mining.algorithm.subscribe", "params": [["scrypt", "1", "2.5"], ["x11", "4.2", "2"]]}\n

Server then calculates which is best algorithm for this rig considering provided factors and costs. Before any work is provided and on algorithm switch, server sends (example to switch to x11):

{"id": null, "method": "mining.set_algorithm", "params": ["x11"]}\n

Immediately after that server sends new difficulty and new work.
There is no need to have the server do this. It would be just as easy to create a client-side switcher that can figure out when it should switch between different algorithms. I've created a switcher like this for the TradeMyBit pool that uses sgminer v5 no-restart switching (and the old method of switching for backwards compatibility). As long as the NiceHash pool has an API that returns the profitability of each algorithm then it's just a matter of deciding if or when you want to switch.

See https://bitcointalk.org/index.php?topic=661827