<p>On testnet I get the following dump:</p>

<p>Miner -> bitcoind</p>

<pre><code>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}
</code></pre>

<p>Response</p>

<pre><code>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}
</code></pre>

<p>Reporting successful blockwith diff 18:</p>

<pre><code>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}
</code></pre>

<p>I hope I didn't mix the requests.</p>

CC BY-SA 3.0
2013-02-01T20:45:18.037Z
2013-02-01T20:45:18.037Z
cdecker
<p>I'm looking for example getwork input and output of a successful block hash to verify a getwork client I've implemented. </p>

<p>I'd also accept suggestions on better ways to verify this. I've looked at TestNet but this seems to be a slow process. </p>

CC BY-SA 3.0
2012-12-16T20:23:47.397Z
The best thing I've come up with at the moment is looking at the block explorer and trying to manually recreate the block header in the format of getwork data and compare it to the resulting hash.
Glen T
CC BY-SA 3.0
2012-12-17T12:41:09.647Z
You can try running some miner and wireshark the traffic between your machine and a pool / testnet server client.
ThePiachu
CC BY-SA 3.0
2012-12-18T05:37:06.573Z
Thanks for the suggestion but my problem is I'm unable to capture a successful block hash.
Glen T
CC BY-SA 3.0
2012-12-18T05:58:25.207Z
You can always try setting up mining on testnet and try to capture a block there.
ThePiachu
CC BY-SA 3.0
2012-12-19T15:38:50.980Z
Have tried but wasn't able to generate a block yet sadly.
Glen T
<mining-pools><testnet><mining-software><getwork><testing>
Example accepted getwork function input and output?
Glen T
# Example accepted getwork function input and output?

(Asked by: username_0 on 2012-12-15)

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.

**Tags:** mining-pools, testnet, mining-software, getwork, testing

> **Comments:**
> **username_0**: The best thing I've come up with at the moment is looking at the block explorer and trying to manually recreate the block header in the format of getwork data and compare it to the resulting hash.  
> **username_1**: You can try running some miner and wireshark the traffic between your machine and a pool / testnet server client.  
> **username_0**: Thanks for the suggestion but my problem is I'm unable to capture a successful block hash.  
> **username_1**: You can always try setting up mining on testnet and try to capture a block there.  
> **username_0**: Have tried but wasn't able to generate a block yet sadly.  

---

## 1 answers

### Answer by username_2 on 2013-02-01. Score: 3 | Accepted answer

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.


---

