Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: konradp on March 28, 2014, 02:12:35 PM



Title: How does stratum response look like?
Post by: konradp on March 28, 2014, 02:12:35 PM
Hi,

On this page: http://mining.bitcoin.cz/stratum-mining we can read that the answer to the "subscribe" action should look like this:
{"id": 1, "result": [[["mining.set_difficulty", "b4b6693b72a50c7116db18d6497cac52"], ["mining.notify", "ae6812eb4cd7735a302a8a9dd95cf71f"]], "08000002", 4], "error": null}\n

But when I start cpuminer with https://bitminter.com pool and watch tcp sockets I see something like this:
{"result":[["mining.notify","1"],"0074aa5f",6],"error":null,"id":1}

Why is that?




Title: Re: How does stratum response look like?
Post by: konradp on March 31, 2014, 12:55:22 PM
Anyone?


Title: Re: How does stratum response look like?
Post by: elbandi on March 31, 2014, 03:11:30 PM
It's a sessionid. if a pool is resumed, cgminer can submit the unsended shares to pool.


Title: Re: How does stratum response look like?
Post by: konradp on April 01, 2014, 05:47:35 AM
OK, but what I mean is that these two formats are different. In one case we have
Code:
 "result": [[[ 
(sub, sub, sub array)
And the second one:
Code:
"result":[[ 
(sub, sub array)