-
Notifications
You must be signed in to change notification settings - Fork 43
/
Copy pathNiceHash_extranonce_subscribe_extension.txt
24 lines (16 loc) · 1.48 KB
/
NiceHash_extranonce_subscribe_extension.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Uppon successful subscription to stratum with "mining.subscribe" method, client should send "mining.extranonce.subscribe" method.
{"id": X, "method": "mining.extranonce.subscribe", "params": []}\n
This informs the server (pool) that client (miner) supports extranonce1 change on-the-fly without the need to reestablish
connection. Servers supporting this method will reply:
{"id": X, "result": true, "error": null}\n
If the server does not support method, reply will be:
{"id": X, "result": false, "error": [20, "Not supported.", null]}\n
Server may also simply ignore this subscription and return no reply or return invalid method. Some pools may return
incorrectly formed error message. Some pools may drop connection (in such cases, it is best to offer user a way to
turn extranonce subscriptions off for certain pools - via config for example). In all cases, client does not perform
any logic when receiving back these replies. With mining.extranonce.subscribe subscription, client should handle extranonce1
changes correctly. Server would send:
{"id": null, "method": "mining.set_extranonce", "params": ["08000002", 4]}\n
First parameter is string extranonce1 value, second parameter is integer value of extranonce2 size. Miner shall start using
new extranonce1 when new job is provided with mining.notify. Work has to be switched, even if new job has same id
(because extranonce1 is different). Failure to do so will cause shares above target until new job with different id is provided.