-
Notifications
You must be signed in to change notification settings - Fork 43
/
Copy pathOctopus_NiceHash_v1.0.txt
95 lines (70 loc) · 2.67 KB
/
Octopus_NiceHash_v1.0.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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
-------------------------------------------------------------------------
NiceHash presents
=========================================================================
Octopus mining protocol modification v1.0
=========================================================================
(WARNING: this is a draft NON-release version)
I. Introduction
II. Concept
III. Specifications (RFC)
IV. Real world scenario
V. Contact
I. Introduction
---------------
This specification concerns mining software that is connecting to the Nicehash
platform.
Mining pools must follow official specifications and not this specification.
Octopus mining protocol uses it's own stratum-like mining protocol.
Miner iterate through 8 bytes of nonce, but as per official specification found at
https://github.com/Conflux-Chain/conflux-doc/blob/master/docs/stratum.md
there is no extranonce1 definition, which leads to possibility that miners are working
on the same input data which would result in duplicated work.
II. Concept
-----------
Because there is no no extranonce1 and extranonce2, for NiceHash to
properly work with Octopus, we need to cut off some bytes (at least 1) of
nonce for NiceHash, the rest (max 7) are for miners.
Unfortunately, currently available mining software is not adjusted for
this modification. It is a simple modification, but has to be performed,
else miners would get shares above target.
III. Specifications (RFC)
-------------------------
Nonce size for miner is determinted according to the new parameter called
'xn' passed in by the pool (server) when sending job. 'xn' is hex string
and must not be larger than 2 bytes (4 hex digits). 'xn' stands for
extranonce.
IV. Real world scenario
-----------------------
NiceHash server sends following job to miner:
{
"id": 0,
"jsonrpc": "2.0",
"method": "mining.notify",
"params": [
"0000000086cef644",
"2302785",
"0x817ded7e4677f7fd952632a7e37a0e969863b286fb1b14a7ff20bc62e832a8e2",
"0x55e63b88c2000000000000000000000000000000000000000000000000"
],
"xn": "30"
}
In this case, 'xn' tells miner that miner's nonce is 7 bytes, because
'xn' is 1 byte. For this particular input data, miner should only iterate
last 7 bytes of nonce and keep first byte fixed at '30'.
When solution is found, miner responds with submit:
{
"id": 2,
"jsonrpc": "2.0",
"method": "mining.submit",
"params": [
"1LXeP87tRaoFk58i6hyJUSmoerL13SzUEu",
"0000000086cef644",
"0x30000000002978da",
"0x817ded7e4677f7fd952632a7e37a0e969863b286fb1b14a7ff20bc62e832a8e2"
]
}
In this case first byte of nonce "0x30000000002978da" is predefined 'xn' byte '30'.
V. Contact
----------
www.nicehash.com