Author

Topic: [finished] Programming job - implement extranonce.subscribe into cgminer (Read 3780 times)

legendary
Activity: 885
Merit: 1006
NiceHash.com
Quote
This is an old thread, but perhaps someone will come across this and reply.

I was hoping that the last question would be answered.  I've been searching the Internet for hours and while I understand how to implement this feature, I can't what the purpose of it is.  It would be impossible to exhaust all the possible nonces for a given extranonce1 in any reasonable amount of time.

Does anyone know why this feature is important?

This feature is important for our service since we are shifting sellers (miners) between various buying orders. By doing this the miners are getting different jobs and to do this without reconnecting the miner we developed the extranonce.subscribe feature, allowing a miner to get new job without being disconnected, thus improving mining efficiency. This feature is now used by several proxies and services. More details here: https://www.nicehash.com/index.jsp?p=software#devs and various upgraded firmwares here: https://www.nicehash.com/index.jsp?p=software#cgminer

Locking thread now; more info on NiceHash is in this thread: https://bitcointalksearch.org/topic/ann-nicehashcom-sell-buy-hash-rate-cloud-mining-service-multipool-562238.
sr. member
Activity: 392
Merit: 250
OP should please lock the thread since the job have been finished by hyperwang.
hero member
Activity: 544
Merit: 507
what is the difference between mining with and without extranonce.subscribe?  Huh
hero member
Activity: 525
Merit: 531
legendary
Activity: 885
Merit: 1006
NiceHash.com
There is a small change or better say additional optional request. Instead of implementing "--extranonce-subscribe" parameter it would be much better if you could implement extension in the same way as it has been implemented in BFGminer - in this case one would simply add "#xnsub" at the end of the pool URI to enable extranonce subscribe (for example stratum+tcp://stratum.nicehash.com/#xnsub). This is important because it enables the user to set this without modifying configuration (in some cases ASIC devices won't allow you to set cgminer configuration), also, this enables user to enable extension on a per-pool basis thus not use this extension on pools that does not support extranonce subscription. Please revise the BFGminer implementation and let us know if you could implement handling of extensions the same way BFGminer does (since BFGminer and cgminer are somehow similar maybe you could even reuse some code). If this is doable and you could implement "#xnsub" to be added at the end of the pool URI instead of "--extranonce-subscribe" option, we are willing to rise the payment to 1 BTC.
legendary
Activity: 885
Merit: 1006
NiceHash.com
legendary
Activity: 885
Merit: 1006
NiceHash.com
Hi,

*edit: job finished by hyperwang

We are looking for someone to implement and test a small stratum protocol extension called mining.extranonce.subscribe (as described here https://www.nicehash.com/software/#devs) into cgminer. Basically it is mainly only a copy-paste&test job since the implementation has already been done in sgminer and bfgminer.

(btw: we've already proposed this to ckolivas and other official cgminer developers, but they're too busy)

For us it is especially important for this feature to be implemented in cgminer since the majority of ASIC device manufacturers burns cgminer into their devices and in some cases it is hard to put a custom (patched) version later into such devices.

This feature has already been included, for example, in the latest sgminer. Search for "extranonce" here: https://github.com/nicehash/sgminer/commits/master or in official sgminer GIT source code at https://github.com/sgminer-dev/sgminer/commits/master, it has also been implemented in BFGMiner (https://bitcointalk.org/?topic=626361.msg8390976#msg8390976)

The job includes:

- fork latest https://github.com/ckolivas/cgminer into your own github repo;
- add extranonce.subscription patch;
- change the way extranonce.subscription is handled; instead the current default=on (optional "--no-extranonce") you should add "--extranonce-subscribe" so that one must explicitly enable extranonce.subscription ("--extranonce-subscribe" : true) ... similar to the way it was added to BFGMiner (https://bitcointalk.org/?topic=626361.msg8390976#msg8390976);
- please do it in such a way (preferably in single commit or similarly) so that others would be able to pull it very easily into the various other cgminer forks with a single pull request;
- make win32 binaries and test the binaries against stratum.nicehash.com and stratum.westhash.com to make sure that extranonce.subscription is working and extranonce changes are received and used properly without disconnect from stratum servers.

Payment: 0.75 BTC when all the above is done (this is an easy job).

Thank you and let us know if you need any more info!
NiceHash

p.s.: one attempt to do this was already done by badman74, but this work hasn't been finished, nevertheless you can take a look at it here: https://github.com/badman74/cgminer/commits/master
Jump to: