Patches for extranonce.subscription

Mining software developers are welcome to take a look at our mining source codes at https://github.com/nicehash and include patches for extranonce.subscription into their mining software.

  • xnsub patch1; xnsub patch2; xnsub patch3; xnsub patch4; xnsub patch5; xnsub patch6
  • Specification for the stratum mining.extranonce.subscribe extension:

    Upon successful subscription to the stratum with "mining.subscribe" method, the client should send the "mining.extranonce.subscribe" method.

    {"id": X, "method": "mining.extranonce.subscribe", "params": []}\n

    This informs the server (pool) that the client (miner) supports extranonce1 change on-the-fly without the need to re-establish the connection. Servers supporting this method will reply:

    {"id": X, "result": true, "error": null}\n

    If the server does not support the method, the reply will be:

    {"id": X, "result": false, "error": [20, "Not supported.", null]}\n

    The server may also simply ignore this subscription and return no reply or return an invalid method. Some pools may return an incorrectly formed error message. Some pools may drop the connection (in such cases, it is best to offerthe  user a way to turn extranonce subscriptions off for certain pools - via config, for example). In all cases, the client does not perform any logic when receiving these replies. With mining.extranonce.subscribe subscription, client should handle extranonce1 changes correctly. The server would send:

    {"id": null, "method": "mining.set_extranonce", "params": ["08000002", 4]}\n

    The first parameter is string extranonce1 value, and the second parameter is an integer value of extranonce2 size. The miner shall start using new extranonce1 when a new job is provided with mining.notify. Work has to be switched, even if a new job has the same ID (because extranonce1 is different). Failure to do so will cause shares above the target until a new job with a different ID is provided.

General help

Earnings & Payments

Mining

Software & Hardware

Mining guides

NiceHash Miner

Personal Support

Haven't found what you were looking for?
Submit a ticket to our support professionals.

Request personal support