<p>There's two major protocols, getwork and Stratum. There's a very good comparison on the <a href="http://mining.bitcoin.cz/stratum-mining" rel="nofollow">Stratum introduction page</a>. Some miners can also use <a href="https://en.bitcoin.it/wiki/Getblocktemplate" rel="nofollow">Get Block Template (GBT)</a>, which allows them to both pool mine and to choose their own transaction content. Not many pools support this, choosing to only offer Stratum instead. </p>

CC BY-SA 3.0
2013-09-07T14:42:48.357Z
2013-09-07T14:42:48.357Z
Anonymous
<p>Stratum: the server gives the client templates that the client can use to generate its own work. Only the block header and first transaction (generation transaction) are included. Stratum uses the least bandwidth of all the protocols. Stratum also makes it very fast and efficient to switch to new work data when there is a block change, which can help keep down the reject ratio caused by stale work. Unlike the other protocols it is not HTTP, so it won't work over an HTTP proxy. There is no real specification. There is a document that explains the core features and for the rest you have to read the source code for "stratum mining proxy" and/or old posts on bitcointalk.org.</p>

<p>GBT (getblocktemplate): the server gives the client templates that the client can use to generate its own work. The client is given full block data and (if supported by server and client) this allows the client to modify the block. For instance the miner could choose which transactions to include in a block. Because of these features GBT needs to transfer more data than Stratum, so bandwidth usage is higher. These features are not supported anywhere yet, as far as I know. GBT is well documented through detailed specs.</p>

<p>Plain getwork: the way mining was done originally. The server gives the client a block header without any transactions or any way to modify the block except for the nonce value. The client is limited to trying all possible nonce values and will then need to request more work from the server. This causes massive bandwidth usage for modern mining hardware. Like Stratum it doesn't give the miner any control over what is mined. You get the worst of both worlds.</p>

<p>getwork with rollntime extension: allows the client a limited way to generate work by modifying the timestamp on the block header. If you process 10 nonce ranges per second (42.9 Ghps) you'd want to request 10 block headers from the server. As each second passes you update the timestamp on those block headers, allowing you to reuse the same work for the next second. Bandwidth usage goes up with hashrate. 429 Ghps would require 100 small request-response exchanges with the server to get enough work after every block change. Compare with GBT where bandwidth usage goes up with the size of the transactions (one big request-response exchange per block change). Which uses less bandwidth depends on your hashrate (getwork) and the size of the block you are hashing (GBT).</p>

<p>TL;DR: getwork is the old way. The rollntime extension gave it back some life, but it won't scale as mining devices get faster. There are two new protocols to improve mining: Stratum which focuses on low bandwidth usage and GBT which focuses on allowing the miner to control what goes in a block.</p>

CC BY-SA 3.0
2013-09-14T20:08:49.210Z
2013-09-14T20:08:49.210Z
Dr.Haribo
<p>Which protocols are there for mining clients to communicate with mining pool servers? How do they compare?</p>

<mining-pools><protocol><getwork><stratum><getblocktemplate>
Protocols for use between mining clients and mining pool servers
Dr.Haribo
# Protocols for use between mining clients and mining pool servers

(Asked by: username_0 on 2013-09-07)

Which protocols are there for mining clients to communicate with mining pool servers? How do they compare?

**Tags:** mining-pools, protocol, getwork, stratum, getblocktemplate


---

## 2 answers

### Answer by username_0 on 2013-09-14. Score: 9 | Accepted answer

Stratum: the server gives the client templates that the client can use to generate its own work. Only the block header and first transaction (generation transaction) are included. Stratum uses the least bandwidth of all the protocols. Stratum also makes it very fast and efficient to switch to new work data when there is a block change, which can help keep down the reject ratio caused by stale work. Unlike the other protocols it is not HTTP, so it won't work over an HTTP proxy. There is no real specification. There is a document that explains the core features and for the rest you have to read the source code for "stratum mining proxy" and/or old posts on bitcointalk.org.

GBT (getblocktemplate): the server gives the client templates that the client can use to generate its own work. The client is given full block data and (if supported by server and client) this allows the client to modify the block. For instance the miner could choose which transactions to include in a block. Because of these features GBT needs to transfer more data than Stratum, so bandwidth usage is higher. These features are not supported anywhere yet, as far as I know. GBT is well documented through detailed specs.

Plain getwork: the way mining was done originally. The server gives the client a block header without any transactions or any way to modify the block except for the nonce value. The client is limited to trying all possible nonce values and will then need to request more work from the server. This causes massive bandwidth usage for modern mining hardware. Like Stratum it doesn't give the miner any control over what is mined. You get the worst of both worlds.

getwork with rollntime extension: allows the client a limited way to generate work by modifying the timestamp on the block header. If you process 10 nonce ranges per second (42.9 Ghps) you'd want to request 10 block headers from the server. As each second passes you update the timestamp on those block headers, allowing you to reuse the same work for the next second. Bandwidth usage goes up with hashrate. 429 Ghps would require 100 small request-response exchanges with the server to get enough work after every block change. Compare with GBT where bandwidth usage goes up with the size of the transactions (one big request-response exchange per block change). Which uses less bandwidth depends on your hashrate (getwork) and the size of the block you are hashing (GBT).

TL;DR: getwork is the old way. The rollntime extension gave it back some life, but it won't scale as mining devices get faster. There are two new protocols to improve mining: Stratum which focuses on low bandwidth usage and GBT which focuses on allowing the miner to control what goes in a block.


---

### Answer by username_1 on 2013-09-07. Score: 0

There's two major protocols, getwork and Stratum. There's a very good comparison on the [Stratum introduction page](http://mining.bitcoin.cz/stratum-mining). Some miners can also use [Get Block Template (GBT)](https://en.bitcoin.it/wiki/Getblocktemplate), which allows them to both pool mine and to choose their own transaction content. Not many pools support this, choosing to only offer Stratum instead.


---

