<blockquote>
  <p>I think I understand why proof of work is needed to verify
  transactions (essentially to prevent spoofing/double spending etc).</p>
</blockquote>

<p>This is right.</p>

<blockquote>
  <p>the proof of work for verifying a transaction is the same as for
  mining a new bitcoin</p>
</blockquote>

<p>This is right too.</p>

<blockquote>
  <p>if this is the case, then it becomes harder and harder to verify
  transactions.</p>
</blockquote>

<p>It depends it can become harder as it can become easier. But whatever happens there is no issue with that.</p>

<p>Explanations:</p>

<p>The miner generates blocks which header have the lowest possible sha256 hash until he finds one which sha256 is lower than the Target. This block will be valid and can then be included in the blockchain. Inside of the block the first transaction is different from the others because it hasn't a valid input and it has as transaction output an address controlled by the miner. This address will receive the block reward(new bitcoins that are generated with the block) as well as the transaction fees of
the transactions that were included in the block.</p>

<p>Now actually it's true that generating new blocks become more and more difficult because there are more and more miners with more and more sophisticated mining material.
This is why the target becomes more and more lower in order to maintain an average time between each generated block of about 10minutes.
But if miners will start to stop mining bitcoin the target will increase and mining will become easier again.</p>

<p>This post will help you to understand a little bit better what are the different components of a block.
<a href="https://web.archive.org/web/20130727094127/http://james.lab6.com/2012/01/12/bitcoin-285-bytes-that-changed-the-world" rel="nofollow">Bitcoin: 285 bytes that changed the world</a></p>

CC BY-SA 3.0
2014-07-31T12:34:19.567Z
I guess my confusion is the following: if verifying a transaction is as easy (or hard) as mining a block, why would all bitcoin miners not just mine their own blocks instead of verifying transactions ? because mining your own block gets you (some fraction of) 25 BTC, but verifying a transaction only gets you whatever the transaction cost might be.
Suresh Venkat
CC BY-SA 3.0
2014-07-31T12:44:08.360Z
Nothing forces the miner to include transactions in the block. They can create empty blocks if they want. Whereas there is no extra cost (in mining power) to include transactions in the block.
Jan Moritz
CC BY-SA 3.0
2014-07-31T14:48:25.140Z
@SureshVenkat: It's not either/or, it's both. The miner does work which both verifies transactions and mines new coins.
Meni Rosenfeld
CC BY-SA 3.0
2014-07-31T12:07:47.530Z
2014-07-31T14:06:51.150Z
2014-07-31T14:06:51.150Z
Jan Moritz
<p>The miner (the person who does the proof of work) doesn't have to choose between verifying transactions or mining new coins. He does work to find blocks, and with each block he simultaneously verifies transactions and mints new coins. The added cost of including transactions in the block is negligible.</p>

CC BY-SA 3.0
2014-07-31T14:50:52.537Z
ah. I think that's where my confusion was. Thanks !
Suresh Venkat
CC BY-SA 3.0
2014-07-31T14:49:52.577Z
2014-07-31T14:49:52.577Z
Meni Rosenfeld
<p>From <a href="https://en.bitcoin.it/wiki/Proof_of_work" rel="nofollow">https://en.bitcoin.it/wiki/Proof_of_work</a>:
"A proof of work is a piece of data which was difficult (costly, time-consuming) to produce so as to satisfy certain requirements. It must be trivial to check whether data satisfies said requirements."</p>

<p>Mining bitcoins involves grouping a bunch of pending transactions together, appending a random number, and computing the hash value until you get one with a lot of zeros at the beginning.  Since hashes are essentially random, creating one with a lot of zeros means that you probably tried a lot of random numbers before you got one that resulted in the hash with a lot of zeros.  Showing the transaction list, the random number, and the hash with a lot of zeros is "proof" that you did a lot of "work."  </p>

<p>Validating transactions is very easy, since you just have to recompute the hash with the one number that "works" and check that it has a lot of zeros.  </p>

<p>Mining gets harder and harder (requires more zeros) as more people mine, but if you are successful you get 25 BTC.  Verifying transactions stays easy no matter how hard it is to mine, but no Bitcoins are awarded for this.  </p>

<p>One point of confusion is that you typically validate as part of mining (as Meni Rosenfeld commented), but you can also validate without mining, which is what most Bitcoin wallets do to be sure they display the correct amount in your wallet.</p>

CC BY-SA 3.0
2014-07-31T15:01:03.933Z
2014-07-31T15:01:03.933Z
juhraffe
<p>I'm trying to understand the proof-of-work idea for verifying a transaction. I think I understand <strong>why</strong> proof of work is needed to verify transactions (essentially to prevent spoofing/double spending etc). </p>

<p>But my understanding is this:</p>

<ul>
<li>the proof of work for verifying a transaction is the same as for mining a new bitcoin</li>
<li>if this is the case, then it becomes harder and harder to verify transactions.</li>
</ul>

<p>I'm pretty certain the first statement is false, in which case I'd like to know what exactly is the proof-of-work for verifying a transaction.</p>

<transactions><proof-of-work>
Difference (if any) between proof-of-work in mining bitcoin vs verifying transaction
Suresh Venkat
# Difference (if any) between proof-of-work in mining bitcoin vs verifying transaction

(Asked by: username_0 on 2014-07-31)

I'm trying to understand the proof-of-work idea for verifying a transaction. I think I understand **why** proof of work is needed to verify transactions (essentially to prevent spoofing/double spending etc).

But my understanding is this:

* the proof of work for verifying a transaction is the same as for mining a new bitcoin
* if this is the case, then it becomes harder and harder to verify transactions.

I'm pretty certain the first statement is false, in which case I'd like to know what exactly is the proof-of-work for verifying a transaction.

**Tags:** transactions, proof-of-work


---

## 3 answers

### Answer by username_1 on 2014-07-31. Score: 1

> I think I understand why proof of work is needed to verify
> transactions (essentially to prevent spoofing/double spending etc).

This is right.

> the proof of work for verifying a transaction is the same as for
> mining a new bitcoin

This is right too.

> if this is the case, then it becomes harder and harder to verify
> transactions.

It depends it can become harder as it can become easier. But whatever happens there is no issue with that.

Explanations:

The miner generates blocks which header have the lowest possible sha256 hash until he finds one which sha256 is lower than the Target. This block will be valid and can then be included in the blockchain. Inside of the block the first transaction is different from the others because it hasn't a valid input and it has as transaction output an address controlled by the miner. This address will receive the block reward(new bitcoins that are generated with the block) as well as the transaction fees of
the transactions that were included in the block.

Now actually it's true that generating new blocks become more and more difficult because there are more and more miners with more and more sophisticated mining material.
This is why the target becomes more and more lower in order to maintain an average time between each generated block of about 10minutes.
But if miners will start to stop mining bitcoin the target will increase and mining will become easier again.

This post will help you to understand a little bit better what are the different components of a block.
[Bitcoin: 285 bytes that changed the world](https://web.archive.org/web/20130727094127/http://james.lab6.com/2012/01/12/bitcoin-285-bytes-that-changed-the-world)

> **Comments:**
> **username_0**: I guess my confusion is the following: if verifying a transaction is as easy (or hard) as mining a block, why would all bitcoin miners not just mine their own blocks instead of verifying transactions ? because mining your own block gets you (some fraction of) 25 BTC, but verifying a transaction only gets you whatever the transaction cost might be.  
> **username_1**: Nothing forces the miner to include transactions in the block. They can create empty blocks if they want. Whereas there is no extra cost (in mining power) to include transactions in the block.  
> **username_2**: @username_0: It's not either/or, it's both. The miner does work which both verifies transactions and mines new coins.  

---

### Answer by username_2 on 2014-07-31. Score: 1

The miner (the person who does the proof of work) doesn't have to choose between verifying transactions or mining new coins. He does work to find blocks, and with each block he simultaneously verifies transactions and mints new coins. The added cost of including transactions in the block is negligible.

> **Comments:**
> **username_0**: ah. I think that's where my confusion was. Thanks !  

---

### Answer by username_3 on 2014-07-31. Score: 0

From <https://en.bitcoin.it/wiki/Proof_of_work>:
"A proof of work is a piece of data which was difficult (costly, time-consuming) to produce so as to satisfy certain requirements. It must be trivial to check whether data satisfies said requirements."

Mining bitcoins involves grouping a bunch of pending transactions together, appending a random number, and computing the hash value until you get one with a lot of zeros at the beginning. Since hashes are essentially random, creating one with a lot of zeros means that you probably tried a lot of random numbers before you got one that resulted in the hash with a lot of zeros. Showing the transaction list, the random number, and the hash with a lot of zeros is "proof" that you did a lot of "work."

Validating transactions is very easy, since you just have to recompute the hash with the one number that "works" and check that it has a lot of zeros.

Mining gets harder and harder (requires more zeros) as more people mine, but if you are successful you get 25 BTC. Verifying transactions stays easy no matter how hard it is to mine, but no Bitcoins are awarded for this.

One point of confusion is that you typically validate as part of mining (as username_2 username_2 commented), but you can also validate without mining, which is what most Bitcoin wallets do to be sure they display the correct amount in your wallet.


---

