<p>The advantage of <code>getblocktemplate</code> is that work units from it last longer, because you can change the extraNonce field. That's nice if you're writing an fpga miner, because it saves bandwidth. </p>

<p><s><code>getwork</code> will probably never go away. It's useful and not very hard to maintain. Note that that's a personal opinion; I'm not one of the Bitcoin developers.</s></p>

<p>Edit: <code>getwork</code> has been removed in v0.10.0, so you have to use <code>getblocktemplate</code>.</p>

CC BY-SA 3.0
2013-06-04T06:01:08.613Z
Just out of curiosity how does it save bandwidth. If the nonce is the maximum value it simple wraps back and starts again right from 0. And since I dont have a very fast fpga the probabilty that some one finds a nonce before I complte the entire cycle is very high. BUt I still kepp calling get work and inserting the data onto the uart lines of my fpga miner from my python script runing on the host computer. So how does it save bandwidth
Enthusiast
CC BY-SA 3.0
2013-06-04T06:19:57.567Z
`it simple wraps back` If you check the same nonce again, you'll get the same result. If you didn't get a block the first time, you won't get one the second time. Bandwidth savings only really matters in pooled mining.
Nick ODell
CC BY-SA 3.0
2013-06-04T06:21:22.893Z
What I meant was before I can do the same hash again the block would have already been solved by someone else and I will get the fresh data from the uart line.
Enthusiast
CC BY-SA 3.0
2013-06-04T06:46:17.297Z
A 6 Ghash/s FPGA will burn through all of the values for the nonce field in less than a second. So, not necessarily.
Nick ODell
CC BY-SA 3.0
2013-06-04T06:52:58.693Z
Can you take a look at http://bitcoin.stackexchange.com/questions/11456/i-am-unable-to-figure-the-getwork-api question
Enthusiast
CC BY-SA 3.0
2013-06-04T04:47:23.340Z
2015-03-22T00:01:14.877Z
2015-03-22T00:01:14.877Z
Nick ODell
<p>I am working on an fpga mining device just for fun. I realized that there is a getblocktemplate function which replaces the getwork Json-rpc call. So do I need to switch over to it and change all the code or can I continue using it . Will getwork be removed from bitcoin later or will it still be supported? </p>

<getwork><getblocktemplate>
Should I use getwork or getblocktemplate
Enthusiast
# Should I use getwork or getblocktemplate

(Asked by: username_0 on 2013-06-04)

I am working on an fpga mining device just for fun. I realized that there is a getblocktemplate function which replaces the getwork Json-rpc call. So do I need to switch over to it and change all the code or can I continue using it . Will getwork be removed from bitcoin later or will it still be supported?

**Tags:** getwork, getblocktemplate


---

## 1 answers

### Answer by username_1 on 2013-06-04. Score: 4 | Accepted answer

The advantage of `getblocktemplate` is that work units from it last longer, because you can change the extraNonce field. That's nice if you're writing an fpga miner, because it saves bandwidth.

~~`getwork` will probably never go away. It's useful and not very hard to maintain. Note that that's a personal opinion; I'm not one of the Bitcoin developers.~~

Edit: `getwork` has been removed in v0.10.0, so you have to use `getblocktemplate`.

> **Comments:**
> **username_0**: Just out of curiosity how does it save bandwidth. If the nonce is the maximum value it simple wraps back and starts again right from 0. And since I dont have a very fast fpga the probabilty that some one finds a nonce before I complte the entire cycle is very high. BUt I still kepp calling get work and inserting the data onto the uart lines of my fpga miner from my python script runing on the host computer. So how does it save bandwidth  
> **username_1**: `it simple wraps back` If you check the same nonce again, you'll get the same result. If you didn't get a block the first time, you won't get one the second time. Bandwidth savings only really matters in pooled mining.  
> **username_0**: What I meant was before I can do the same hash again the block would have already been solved by someone else and I will get the fresh data from the uart line.  
> **username_1**: A 6 Ghash/s FPGA will burn through all of the values for the nonce field in less than a second. So, not necessarily.  
> **username_0**: Can you take a look at http://bitcoin.stackexchange.com/questions/11456/i-am-unable-to-figure-the-getwork-api question  

---

