<p>By default a bitcoin node does not hand out duplicate getworks. Neither do any of the mining pools. So you don't need to do anything special, just point your miners at some source of work units, either a pool or your own instance of bitcoin, and off you go.</p>

CC BY-SA 3.0
2011-10-06T00:18:13.837Z
It is technically possible for duplicate getworks to occur, but it's so unlikely as to probably never occur.
David Perry
CC BY-SA 3.0
2011-10-05T22:45:58.173Z
2011-10-05T22:45:58.173Z
nanotube
<p>Remember that coinbase has no input transactions, its input script can contain some arbitrary message. As long as the pool assigns each work unit with different message, there will be no duplicated work. <a href="https://bitcointalk.org/index.php?topic=392108.0" rel="nofollow noreferrer">[1]</a>:</p>

<blockquote>
  <p>Pools change a value in the coinbase message for each worker/piece of
  work they assign.  Unless the pool wrote their own software and did it
  HORRIBLY wrong, there is absolutely no way that any two workers will
  be hashing the same values.</p>
</blockquote>

CC BY-SA 4.0
2018-12-16T06:18:02.833Z
2018-12-16T06:18:02.833Z
JustWonder
<p>My understanding of the mining mechanism is this:</p>

<ul>
<li>The miner connects to a Bitcoin client (or pool) and submits a getwork request</li>
<li>The client (or pool) responds with a chunk of data containing the block data, including the randomized bits, and the nonce (the bit which the miner changes)</li>
<li>The miner increments the nonce multiple times until it either finds a solution or overflows, at which point it submits a new getwork request to the client (or pool)</li>
</ul>

<p>Since the client/pool is responsible for handing out the getwork requests, the client/pool is also responsible for guarding against duplication. Since the entropy of the data handed out by getwork must, by definition, be greater than or equal to the output entropy of SHA256 (2^256 bits) it should have the same or lower chance of collision (1/2^256).</p>

<p>In this case a "collision" would be handing the same work to multiple miners and so we can say that multiple miners being given duplicate work has so low a risk of occurrence as to be a negligible risk.</p>

<p>One of my favorite comp sci professors once told me that the chance of such a collision (per unit of work) is about the same as winning the state lottery 11 times in a row, then being struck by lightning, surviving and being elected president. And he had the math to back this up...</p>

CC BY-SA 3.0
2011-10-05T22:49:12.650Z
2011-10-05T23:00:44.897Z
2011-10-05T23:00:44.897Z
David Perry
<p>Someone has n machines to mine for bitcoins. What's the simplest way to ensure that mining work isn't duplicated?</p>

<p>(Will separate machines naturally work on different hashes even with the same recipient of rewards, or will there need to be some sort of pool software running organising nodes? Would having each new node create a wallet first be sufficent?)</p>

<mining-pools><getwork>
How do I keep my miners from doing duplicate work?
billpg
# How do I keep my miners from doing duplicate work?

(Asked by: username_0 on 2011-10-05)

Someone has n machines to mine for bitcoins. What's the simplest way to ensure that mining work isn't duplicated?

(Will separate machines naturally work on different hashes even with the same recipient of rewards, or will there need to be some sort of pool software running organising nodes? Would having each new node create a wallet first be sufficent?)

**Tags:** mining-pools, getwork


---

## 3 answers

### Answer by username_2 on 2011-10-05. Score: 5 | Accepted answer

My understanding of the mining mechanism is this:

* The miner connects to a Bitcoin client (or pool) and submits a getwork request
* The client (or pool) responds with a chunk of data containing the block data, including the randomized bits, and the nonce (the bit which the miner changes)
* The miner increments the nonce multiple times until it either finds a solution or overflows, at which point it submits a new getwork request to the client (or pool)

Since the client/pool is responsible for handing out the getwork requests, the client/pool is also responsible for guarding against duplication. Since the entropy of the data handed out by getwork must, by definition, be greater than or equal to the output entropy of SHA256 (2^256 bits) it should have the same or lower chance of collision (1/2^256).

In this case a "collision" would be handing the same work to multiple miners and so we can say that multiple miners being given duplicate work has so low a risk of occurrence as to be a negligible risk.

One of my favorite comp sci professors once told me that the chance of such a collision (per unit of work) is about the same as winning the state lottery 11 times in a row, then being struck by lightning, surviving and being elected president. And he had the math to back this up...


---

### Answer by username_1 on 2011-10-05. Score: 3

By default a bitcoin node does not hand out duplicate getworks. Neither do any of the mining pools. So you don't need to do anything special, just point your miners at some source of work units, either a pool or your own instance of bitcoin, and off you go.

> **Comments:**
> **username_2**: It is technically possible for duplicate getworks to occur, but it's so unlikely as to probably never occur.  

---

### Answer by username_3 on 2018-12-16. Score: 0

Remember that coinbase has no input transactions, its input script can contain some arbitrary message. As long as the pool assigns each work unit with different message, there will be no duplicated work. [[1]](https://bitcointalk.org/index.php?topic=392108.0):

> Pools change a value in the coinbase message for each worker/piece of
> work they assign. Unless the pool wrote their own software and did it
> HORRIBLY wrong, there is absolutely no way that any two workers will
> be hashing the same values.


---

