<p>Traditionally, pools gave miners work units covering the entire nonce range 0-4,294,967,295. When the miner finishes work, he requests a new work unit with a different extraNonce (or payout address). Different miners also get work units with different details.</p>

<p>To reduce load, pools are now moving on to a setting where the miner can himself change details of the generation transaction and compute the Merkle root, so he can do as much work as he pleases without needing new assignment from the pool.</p>

CC BY-SA 3.0
2013-08-27T13:38:27.503Z
What is the 'extraNonce' field? I saw this question (http://bitcoin.stackexchange.com/questions/5048/what-is-the-extranonce) but it wasn't all that clear. I can't find anything about elsewhere.
Anonymous
CC BY-SA 3.0
2013-08-27T13:39:55.510Z
Ah, this article explains better: https://en.bitcoin.it/wiki/Transactions - Thanks anyway.
Anonymous
CC BY-SA 3.0
2014-04-18T17:02:44.233Z
You say that pools give miners work units covering the entire nonce range... do you mean that a miner could eventually span the entire range or that the entire range is provided up front? If the assigned range is a subset of the whole range, what determines how big of a range is assigned? Also, if only one block can ever be mined at once and the number of miners goes up, wouldn't the assigned ranges start to diminish ultimately lowering one's change of finding the winning nonce? I suppose in a pool it doesnt matter who finds it...
a432511
CC BY-SA 3.0
2014-04-19T17:17:22.040Z
@a432511: A block header consists of 640 bits. A (traditional) work unit consists of 608 of these fixed by the pool and the other 32 bits chosen by the miner. This gives the miner 4 billion different hashes to try. Each has a chance to be a valid block depending on the difficulty. If doesn't find a block he requests another work unit (with different 608 bits), and so on. Of course if there are more miners the difficulty will be higher.
Meni Rosenfeld
CC BY-SA 3.0
2014-05-12T14:46:13.437Z
@MeniRosenfeld Hm, I still don't quite understand. So the block header may not have a valid nonce at a given difficulty? Then the pool would generate a new block with a new 608 bits? See this question too: http://bitcoin.stackexchange.com/questions/25283/how-is-block-assembled
a432511
CC BY-SA 3.0
2014-05-12T14:47:53.980Z
@MeniRosenfeld What do you mean 608 fixed by the pool? Would a subset of the 608 bits be assigned to each miner in the pool? When you say the 32 is chosen by the miner, you mean each "hasher" in the pool can choose the 32 bits.
a432511
CC BY-SA 3.0
2014-05-12T15:06:47.167Z
@a432511: The pool gives the miner a work unit which is a string of 608 bits. These are all the fields described in https://en.bitcoin.it/wiki/Protocol_specification#Block_Headers except for the nonce - version, prev block hash, Merkle root, Timestamp, bits (difficulty). The 32-bit nonce field is filled in by the miner. He tries each one of the 4 billion possibilities (2^32) hoping to find a combination that hashes to a value that satisfies the difficulty requirement. Most of the time none of the combinations will do so, so he will request a new work unit and continue trying.
Meni Rosenfeld
CC BY-SA 3.0
2014-05-12T15:08:03.160Z
@a432511: The Merkle root field is the representation of all the transactions in the block. However the pool will not make drastic changes to the transaction list whenever it assigns a new work unit (whether to the same miner or a different one). It will modify slightly the generation transaction, resulting in a new Merkle root. The rest of the fields can stay the same, but the change in Merkle root guarantees a fresh new chance.
Meni Rosenfeld
CC BY-SA 3.0
2014-05-12T15:09:07.943Z
@a432511: Again, I am describing a traditional pool. Pools these days have a variety of other tricks.
Meni Rosenfeld
CC BY-SA 3.0
2014-05-13T00:24:10.147Z
@MeniRosenfeld You sir are fantastic at explaining this. And, I am getting it! Another question (maybe all this back and forth is better suited for a different medium) - What is the generation transaction? Is this a transaction added to the stack by the pool operator (or solo miner)? Is it a zero value transaction?
a432511
CC BY-SA 3.0
2014-05-13T00:26:12.373Z
let us [continue this discussion in chat](http://chat.stackexchange.com/rooms/14479/discussion-between-a432511-and-meni-rosenfeld)
a432511
CC BY-SA 3.0
2013-08-27T13:25:10.300Z
2013-08-27T13:25:10.300Z
Meni Rosenfeld
<p>What does the mining-pool architecture look like? Obviously GPU's can hash data much faster than it can be distributed via the internet, so I assume pools must allocate a range of nonces for miners to work on at any given time?</p>

<p>So if there were 2 miners, would the pool server allocate nonces 1-100,000 to miner 1, 100,101-200,000 to miner 2, then keep allocating the work as each set of nonces are completed? Or do I have it wrong?</p>

<p>I tried digging into the source of Eloipool, but it all seems very cryptic/there is very little (if any?) documentation?</p>

<mining-pools>
How do mining pools distribute work effectively?
Anonymous
# How do mining pools distribute work effectively?

(Asked by: username_0 on 2013-08-27)

What does the mining-pool architecture look like? Obviously GPU's can hash data much faster than it can be distributed via the internet, so I assume pools must allocate a range of nonces for miners to work on at any given time?

So if there were 2 miners, would the pool server allocate nonces 1-100,000 to miner 1, 100,101-200,000 to miner 2, then keep allocating the work as each set of nonces are completed? Or do I have it wrong?

I tried digging into the source of Eloipool, but it all seems very cryptic/there is very little (if any?) documentation?

**Tags:** mining-pools


---

## 1 answers

### Answer by username_1 on 2013-08-27. Score: 7 | Accepted answer

Traditionally, pools gave miners work units covering the entire nonce range 0-4,294,967,295. When the miner finishes work, he requests a new work unit with a different extraNonce (or payout address). Different miners also get work units with different details.

To reduce load, pools are now moving on to a setting where the miner can himself change details of the generation transaction and compute the Merkle root, so he can do as much work as he pleases without needing new assignment from the pool.

> **Comments:**
> **username_0**: What is the 'extraNonce' field? I saw this question (http://bitcoin.stackexchange.com/questions/5048/what-is-the-extranonce) but it wasn't all that clear. I can't find anything about elsewhere.  
> **username_0**: Ah, this article explains better: https://en.bitcoin.it/wiki/Transactions - Thanks anyway.  
> **username_2**: You say that pools give miners work units covering the entire nonce range... do you mean that a miner could eventually span the entire range or that the entire range is provided up front? If the assigned range is a subset of the whole range, what determines how big of a range is assigned? Also, if only one block can ever be mined at once and the number of miners goes up, wouldn't the assigned ranges start to diminish ultimately lowering one's change of finding the winning nonce? I suppose in a pool it doesnt matter who finds it...  
> **username_1**: @username_2: A block header consists of 640 bits. A (traditional) work unit consists of 608 of these fixed by the pool and the other 32 bits chosen by the miner. This gives the miner 4 billion different hashes to try. Each has a chance to be a valid block depending on the difficulty. If doesn't find a block he requests another work unit (with different 608 bits), and so on. Of course if there are more miners the difficulty will be higher.  
> **username_2**: @username_1 Hm, I still don't quite understand. So the block header may not have a valid nonce at a given difficulty? Then the pool would generate a new block with a new 608 bits? See this question too: http://bitcoin.stackexchange.com/questions/25283/how-is-block-assembled  
> **username_2**: @username_1 What do you mean 608 fixed by the pool? Would a subset of the 608 bits be assigned to each miner in the pool? When you say the 32 is chosen by the miner, you mean each "hasher" in the pool can choose the 32 bits.  
> **username_1**: @username_2: The pool gives the miner a work unit which is a string of 608 bits. These are all the fields described in https://en.bitcoin.it/wiki/Protocol_specification#Block_Headers except for the nonce - version, prev block hash, Merkle root, Timestamp, bits (difficulty). The 32-bit nonce field is filled in by the miner. He tries each one of the 4 billion possibilities (2^32) hoping to find a combination that hashes to a value that satisfies the difficulty requirement. Most of the time none of the combinations will do so, so he will request a new work unit and continue trying.  
> **username_1**: @username_2: The Merkle root field is the representation of all the transactions in the block. However the pool will not make drastic changes to the transaction list whenever it assigns a new work unit (whether to the same miner or a different one). It will modify slightly the generation transaction, resulting in a new Merkle root. The rest of the fields can stay the same, but the change in Merkle root guarantees a fresh new chance.  
> **username_1**: @username_2: Again, I am describing a traditional pool. Pools these days have a variety of other tricks.  
> **username_2**: @username_1 You sir are fantastic at explaining this. And, I am getting it! Another question (maybe all this back and forth is better suited for a different medium) - What is the generation transaction? Is this a transaction added to the stack by the pool operator (or solo miner)? Is it a zero value transaction?  
> **username_2**: let us [continue this discussion in chat](http://chat.stackexchange.com/rooms/14479/discussion-between-username_2-and-username_1-username_1)  

---

