<blockquote>
  <p>Due to the very low probability of successful generation, this makes
  it unpredictable which worker computer in the network will be able to
  generate the next block.</p>
</blockquote>

<ul>
<li><a href="http://en.bitcoin.it/wiki/Proof_of_work" rel="nofollow">http://en.bitcoin.it/wiki/Proof_of_work</a></li>
</ul>

<p>This is what makes proof-of-work based cryptocurrencies like Bitcoin different from any other form of electronic money.  With access to mining being open to all, there is no way to control (or corrupt) the transaction verification process.  </p>

<p>For instance, let's say there was a law passed everywhere mandating that no payments to Wikileaks would be allowed -- that any miner including a payment to the Wikileaks payment address would be punished.</p>

<p>That is a form of centralized control and some miners would comply.  But because other miners would continue verifying those transactions regardless, the worst that would happen is that payments to Wikileaks might get ignored by a block or three of miners who did comply with the law until another miner ignoring the law gets a block.  The economic advantage goes to the uncorrupted miners (who recognize the laws of math and ignore the laws made by man).</p>

CC BY-SA 3.0
2013-04-28T18:03:18.233Z
2013-04-28T18:03:18.233Z
Stephen Gornick
<p>The problem that have to be solved is called Proof of work which is basically a brute force.</p>
<p>So you need to know what hash functions are to understand the problem, don't worry its easy and anyone can understand it because solving this puzzle doesn't require intelligence but patience.</p>
<p>A hash function is just a function that when you give it an input of X byte size (data, image, text, anything ...) it produces a fixed length of bytes, for example you give it 5gb video it will produce a string that is 256 byte long(the output size can change from function to function).</p>
<p>Hash functions have some properties and one of them is when you give it different input it always produces a completely different output, so if change only one bit in that 5gb video the output of the hash function is going to change radically. same rule applies when concatenating the video with some random bits.</p>
<p>So in bitcoin, miners keeps listening for transactions and from these transaction they create a block but in order for all participating nodes to accept this block they have to change a specified region in the block and see if the resulting output starts with x number of zero's (because in computers everything is ones and zeroes).</p>
<p>If the result is not correct(output string does not start with 30 zeroes) they change that region again and check the output, until they finally find the right combination of bits in that region that when you pass that block to the hash function it will produce a string that starts with 30 zeroes.</p>
<p>To explain more i will give you a real example:</p>
<ol>
<li><p>miner listens for incoming transaction</p>
</li>
<li><p>I create a block that contains all these transaction</p>
</li>
<li><p>inside the block there is specified region that is 32 bit long that is independent from the transaction (for the sake of simplicity lets say all bits in this region is set to 0)</p>
</li>
<li><p>miner hash that block and check the output, if it is a string that starts with 30 zeroes it quickly broadcast it to the network and say i win I found the solution to the puzzle it is a block with these transaction that i selected and that contains this region, you can check it yourself</p>
</li>
<li><p>if the result is not a string that starts with 30 zeroes, the miner changes that region increments it for example (00000.....001) and hashes the block one more time and check if the output starts with 30 zeroes , this step is repeated until the miner can finally find a correct combination of ones and zeroes in that block region so that when he hashes that block with the hash function it will produce a string that starts with 30 zeroes (notice this number changes).</p>
</li>
</ol>
<p>and he has to do this fast because there are lots of miners and the first one to find the block is gonna win. so you can see that the term puzzle is quite (juuust a little bit) misleading.</p>
<p>mining pools are just a bunch of computers that try to find that special combination in the block region(called nonce by the way) to make it easier and faster.</p>

CC BY-SA 4.0
2020-07-19T17:58:18.063Z
2020-07-20T11:38:58.757Z
2020-07-20T11:38:58.757Z
ezio
<p>Bitcoin miners find a random number (called a "Nonce") that when inserted into the current block makes the hash be below the current target. They then send that current block around the network and everyone checks their work (the proof-of-work) by hashing the block and checking if the result is below the current target. In mining pools, miners do the same thing, but the current target is much higher (so it's easier). When they find one of these, it's called "mining a share". A small percentage of the "shares" will actually have a hash below the actual target, and the pool will make it's 25BTC profit, then distribute it out to the miners who found a share (normally using some über-complicated method to prevent cheating/pool hopping)</p>

CC BY-SA 3.0
2013-04-03T21:28:57.603Z
2013-04-03T21:28:57.603Z
lurf jurv
<p>Please explain the proof-of-work concept.</p>

<p>And how does it relate to Bitcoin mining in general, and to the proofs of work (aka shares) of mining pools?</p>

<proof-of-work><mining-theory><mining-pool-shares>
What is proof-of-work?
Dr.Haribo
# What is proof-of-work?

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

Please explain the proof-of-work concept.

And how does it relate to Bitcoin mining in general, and to the proofs of work (aka shares) of mining pools?

**Tags:** proof-of-work, mining-theory, mining-pool-shares


---

## 3 answers

### Answer by username_3 on 2013-04-03. Score: 12 | Accepted answer

Bitcoin miners find a random number (called a "Nonce") that when inserted into the current block makes the hash be below the current target. They then send that current block around the network and everyone checks their work (the proof-of-work) by hashing the block and checking if the result is below the current target. In mining pools, miners do the same thing, but the current target is much higher (so it's easier). When they find one of these, it's called "mining a share". A small percentage of the "shares" will actually have a hash below the actual target, and the pool will make it's 25BTC profit, then distribute it out to the miners who found a share (normally using some über-complicated method to prevent cheating/pool hopping)


---

### Answer by username_1 on 2013-04-28. Score: 4

> Due to the very low probability of successful generation, this makes
> it unpredictable which worker computer in the network will be able to
> generate the next block.

* <http://en.bitcoin.it/wiki/Proof_of_work>

This is what makes proof-of-work based cryptocurrencies like Bitcoin different from any other form of electronic money. With access to mining being open to all, there is no way to control (or corrupt) the transaction verification process.

For instance, let's say there was a law passed everywhere mandating that no payments to Wikileaks would be allowed -- that any miner including a payment to the Wikileaks payment address would be punished.

That is a form of centralized control and some miners would comply. But because other miners would continue verifying those transactions regardless, the worst that would happen is that payments to Wikileaks might get ignored by a block or three of miners who did comply with the law until another miner ignoring the law gets a block. The economic advantage goes to the uncorrupted miners (who recognize the laws of math and ignore the laws made by man).


---

### Answer by username_2 on 2020-07-19. Score: 0

The problem that have to be solved is called Proof of work which is basically a brute force.

So you need to know what hash functions are to understand the problem, don't worry its easy and anyone can understand it because solving this puzzle doesn't require intelligence but patience.

A hash function is just a function that when you give it an input of X byte size (data, image, text, anything ...) it produces a fixed length of bytes, for example you give it 5gb video it will produce a string that is 256 byte long(the output size can change from function to function).

Hash functions have some properties and one of them is when you give it different input it always produces a completely different output, so if change only one bit in that 5gb video the output of the hash function is going to change radically. same rule applies when concatenating the video with some random bits.

So in bitcoin, miners keeps listening for transactions and from these transaction they create a block but in order for all participating nodes to accept this block they have to change a specified region in the block and see if the resulting output starts with x number of zero's (because in computers everything is ones and zeroes).

If the result is not correct(output string does not start with 30 zeroes) they change that region again and check the output, until they finally find the right combination of bits in that region that when you pass that block to the hash function it will produce a string that starts with 30 zeroes.

To explain more i will give you a real example:

1. miner listens for incoming transaction
2. I create a block that contains all these transaction
3. inside the block there is specified region that is 32 bit long that is independent from the transaction (for the sake of simplicity lets say all bits in this region is set to 0)
4. miner hash that block and check the output, if it is a string that starts with 30 zeroes it quickly broadcast it to the network and say i win I found the solution to the puzzle it is a block with these transaction that i selected and that contains this region, you can check it yourself
5. if the result is not a string that starts with 30 zeroes, the miner changes that region increments it for example (00000.....001) and hashes the block one more time and check if the output starts with 30 zeroes , this step is repeated until the miner can finally find a correct combination of ones and zeroes in that block region so that when he hashes that block with the hash function it will produce a string that starts with 30 zeroes (notice this number changes).

and he has to do this fast because there are lots of miners and the first one to find the block is gonna win. so you can see that the term puzzle is quite (juuust a little bit) misleading.

mining pools are just a bunch of computers that try to find that special combination in the block region(called nonce by the way) to make it easier and faster.


---

