I'm looking for example getwork input and output of a successful block hash to verify a getwork client I've implemented.
I'd also accept suggestions on better ways to verify this. I've looked at TestNet but this seems to be a slow process.
I'm looking for example getwork input and output of a successful block hash to verify a getwork client I've implemented.
I'd also accept suggestions on better ways to verify this. I've looked at TestNet but this seems to be a slow process.
On testnet I get the following dump:
Miner -> bitcoind
POST / HTTP/1.1
Authorization: Basic Y2RlY2tlcjphYmMxMjM=
Host: localhost:18332
Accept: */*
Accept-Encoding: deflate, gzip
Content-type: application/json
X-Mining-Extensions: longpoll midstate rollntime submitold
X-Mining-Hashrate: 583000000
Content-Length: 45
User-Agent: cgminer 2.8.1
{"method": "getwork", "params": [], "id":0}
Response
HTTP/1.1 200 OK
Date: Fri, 01 Feb 2013 20:40:06 +0000
Connection: keep-alive
Content-Length: 592
Content-Type: application/json
Server: bitcoin-json-rpc/v0.7.2.0-g32a928e-beta
{"result":{"midstate":"d330cdcb6296c8befe66dc38ca10589aa54cb364bf2f174aea7c9329263841f9","data":"00000002b15704f4ecae05d077e54f6ec36da7f20189ef73b77603225ae56d2b00000000bcf59695a4e35a2f7535e1a86b306a3b08c212bf0b833764018fe39f01919381510c28111c0e8a3700000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000080020000","hash1":"00000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000010000","target":"00000000000000000000000000000000000000000000000000378a0e00000000"},"error":null,"id":0}
Reporting successful blockwith diff 18:
POST / HTTP/1.1
Authorization: Basic Y2RlY2tlcjphYmMxMjM=
Host: localhost:18332
Accept: */*
Accept-Encoding: deflate, gzip
Content-type: application/json
X-Mining-Extensions: longpoll midstate rollntime submitold
X-Mining-Hashrate: 661000000
Content-Length: 305
User-Agent: cgminer 2.8.1
{"method": "getwork", "params": [ "00000002b15704f4ecae05d077e54f6ec36da7f20189ef73b77603225ae56d2b00000000b052cbbdeed2489ccb13a526b77fadceef4caf7d3bb82a9eb0b69ebb90f9f5a7510c27fd1c0e8a37fa531338000000800000000000000000000000000000000000000000000000000000000000000000000000000000000080020000" ], "id":1}
I hope I didn't mix the requests.