<p>Verifying a transaction is not a difficult process, it is finding a good block hash that makes mining difficult. Furthermore, if a miner verifies a transaction and includes it in the block he is creating, he gets the transaction fee from that transaction. This makes it attractive for miners to verify transactions instead of just looking for a block hash.</p>

<p>The reason why mining is difficult and it needs to be verified that a miner has put a certain amount of work in finding his new block, is for security of the network. If mining were easier, it would be easier for <a href="https://en.bitcoin.it/wiki/Weaknesses#Attacker_has_a_lot_of_computing_power" rel="nofollow">attackers</a> to take control over the block chain.</p>

<p>Also, the Bitcoin protocol tries to achieve a block creation rate of 1 block every 10 minutes. To achieve this, the protocol automatically adjusts the difficulty of finding a block every 2016 blocks. This should be approximately 2 weeks. When these 2016 blocks were found too quickly, the difficulty will rise. Otherwise, it will fall. This makes it possible to <a href="https://en.bitcoin.it/wiki/Controlled_supply" rel="nofollow">predict the supply of bitcoins over time</a>.</p>

<p>So, because we only want one block to be found every 10 minutes, the difficulty has to be proportional to the total amount of work the whole network is doing. This means the more people are mining, the more they help raising the difficulty and help making the network more secure against attacks.</p>

<p>I don't fully understand your last question. But "keeping track of how many transactions a person has verified" would not be a suitable alternative for several reasons. First, as I mentioned above, transaction verifying is not a difficult process, so the amount of verified transactions would not be a good measure of the amount of work you did. Also, in the Bitcoin network, there does not exist such thing as a "person". It is possible to keep track of the IP address of who submits transactions and blocks, but identifying people by their IP address is not a good idea (IP's are not always fixed and multiple users can share an IP). The only other identification method Bitcoin supports are its addresses, but real Bitcoin anonymity requires you to frequently change the address you use, so addresses should not be used as identification. (<a href="https://en.bitcoin.it/wiki/Green_address" rel="nofollow">Although sometimes they are.</a>)</p>

<p>I tried to answer all your questions, if I missed something, just ask me in a comment.</p>

CC BY-SA 3.0
2013-05-13T08:21:08.923Z
I guess what I don't understand is the point of adding the extra work in the form of looking for a block hash.  Evidently this has nothing to do with transaction verification per se, is only a means of security, and I understand this security arises simply because it makes it more difficult for any one entity to control a large percentage of the network.  What I don't understand is how making hashing difficult accomplishes this.  (Running out of characters; see following comment.)
Jonathan Gleason
CC BY-SA 3.0
2013-05-13T08:23:17.840Z
If you make the hashing easier, then for fixed computational power, you in some sense gain more control over the block chain, but at the same time, doesn't everyone else gain just as much control of the block chain (it is, after all, becoming easier for everyone, not just a particular person), so that in terms of the proportion of computing power you have over the block chain, nothing has changed, even though you might be finding blocks faster.
Jonathan Gleason
CC BY-SA 3.0
2013-05-13T08:24:10.310Z
It would then seem that the only purpose of hashing is to control the time (approximately anyways) which it takes to find blocks, to control the rate at which new coins are introduced into the economy.  Is this incorrect?
Jonathan Gleason
CC BY-SA 3.0
2013-05-13T08:26:39.040Z
Furthermore, when I mine now, all the coins I mine are deposited into a specific address, so although I personally might make use of more than one address, as far as mining is concerned, I only have one at a time.  Given that, how would keeping tracking of transaction verifications by Bitcoin address be any 'worse' (in the sense of using addresses for the purposes of identification) than the way mining works now?
Jonathan Gleason
CC BY-SA 3.0
2013-05-13T08:28:56.127Z
It's true that the difficulty is also used to predict the rate at which blocks are created, I will add that to the answer.
Steven Roose
CC BY-SA 4.0
2019-01-03T08:16:06.653Z
@StevenRoose I have a question. Let's say after the previous block, there is no pending transactions. Now 2 miners A and B in the world with same equipment, should they wait a couple of minutes for new transactions to come, and then pack them and also include the Hash of the previous block, then start to solve that Hash puzzle? I feel that the best strategy for any miner in this case would be directly pack an empty block with no transactions but the previous block's hash and immediately start to solve that Hash puzzle. If that's the case, then start from Block 0, it should all be empty block
ftxx
CC BY-SA 4.0
2019-03-13T12:38:37.587Z
@ftxx Sorry for the delay. If there are no transactions, a miner will never wait. They will start working on an empty block. Then, when a new transaction comes in, the miner can decide to change the block it is working on. It's important to understand that starting work on a new block doesn't give you a disadvantage, since work is not incremental. So the miner will probably create a new block with that transaction and then switch his miner hardware to solve that block instead of the empty one.
Steven Roose
CC BY-SA 3.0
2013-05-13T08:07:27.053Z
2013-05-13T08:34:54.820Z
2013-05-13T08:34:54.820Z
Steven Roose
<p>My understanding of mining is that the reason an award of Bitcoin comes along with the solving of the current block is to give people incentive to actually try to solve the block.  My understanding is also that the reason that it is desirable to have people trying to solve blocks is because this is what makes the network work, that is, the more people using their processing power to verify Bitcoin transactions, the better.</p>

<p>What I don't understand is what hashing has to do with actual transaction verification?  I sort of vaguely have this idea in my head that because of the difficulty of the SHA256 hashing algorithm, if someone finds a hash that solves a block, that must mean they spent a significant amount of time working to find the hash . . . but what does that have to do with spending a significant amount of time working to verify transactions?  What stops people from just hashing but not verifying?  Moreover, if I am correct in assuming that hashing serves no other purpose other than to verify that someone indeed put in a fair amount of work for the network, is there really no other better method to prove this?  Why is something as stupid as just keeping track of how many transactions a person has verified not going to work?</p>

<transactions><mining-theory><hash><sha256><verification>
Solving a block and verification of transactions
Jonathan Gleason
# Solving a block and verification of transactions

(Asked by: username_0 on 2013-05-13)

My understanding of mining is that the reason an award of Bitcoin comes along with the solving of the current block is to give people incentive to actually try to solve the block. My understanding is also that the reason that it is desirable to have people trying to solve blocks is because this is what makes the network work, that is, the more people using their processing power to verify Bitcoin transactions, the better.

What I don't understand is what hashing has to do with actual transaction verification? I sort of vaguely have this idea in my head that because of the difficulty of the SHA256 hashing algorithm, if someone finds a hash that solves a block, that must mean they spent a significant amount of time working to find the hash . . . but what does that have to do with spending a significant amount of time working to verify transactions? What stops people from just hashing but not verifying? Moreover, if I am correct in assuming that hashing serves no other purpose other than to verify that someone indeed put in a fair amount of work for the network, is there really no other better method to prove this? Why is something as stupid as just keeping track of how many transactions a person has verified not going to work?

**Tags:** transactions, mining-theory, hash, sha256, verification


---

## 1 answers

### Answer by username_1 on 2013-05-13. Score: 2

Verifying a transaction is not a difficult process, it is finding a good block hash that makes mining difficult. Furthermore, if a miner verifies a transaction and includes it in the block he is creating, he gets the transaction fee from that transaction. This makes it attractive for miners to verify transactions instead of just looking for a block hash.

The reason why mining is difficult and it needs to be verified that a miner has put a certain amount of work in finding his new block, is for security of the network. If mining were easier, it would be easier for [attackers](https://en.bitcoin.it/wiki/Weaknesses#Attacker_has_a_lot_of_computing_power) to take control over the block chain.

Also, the Bitcoin protocol tries to achieve a block creation rate of 1 block every 10 minutes. To achieve this, the protocol automatically adjusts the difficulty of finding a block every 2016 blocks. This should be approximately 2 weeks. When these 2016 blocks were found too quickly, the difficulty will rise. Otherwise, it will fall. This makes it possible to [predict the supply of bitcoins over time](https://en.bitcoin.it/wiki/Controlled_supply).

So, because we only want one block to be found every 10 minutes, the difficulty has to be proportional to the total amount of work the whole network is doing. This means the more people are mining, the more they help raising the difficulty and help making the network more secure against attacks.

I don't fully understand your last question. But "keeping track of how many transactions a person has verified" would not be a suitable alternative for several reasons. First, as I mentioned above, transaction verifying is not a difficult process, so the amount of verified transactions would not be a good measure of the amount of work you did. Also, in the Bitcoin network, there does not exist such thing as a "person". It is possible to keep track of the IP address of who submits transactions and blocks, but identifying people by their IP address is not a good idea (IP's are not always fixed and multiple users can share an IP). The only other identification method Bitcoin supports are its addresses, but real Bitcoin anonymity requires you to frequently change the address you use, so addresses should not be used as identification. ([Although sometimes they are.](https://en.bitcoin.it/wiki/Green_address))

I tried to answer all your questions, if I missed something, just ask me in a comment.

> **Comments:**
> **username_0**: I guess what I don't understand is the point of adding the extra work in the form of looking for a block hash.  Evidently this has nothing to do with transaction verification per se, is only a means of security, and I understand this security arises simply because it makes it more difficult for any one entity to control a large percentage of the network.  What I don't understand is how making hashing difficult accomplishes this.  (Running out of characters; see following comment.)  
> **username_0**: If you make the hashing easier, then for fixed computational power, you in some sense gain more control over the block chain, but at the same time, doesn't everyone else gain just as much control of the block chain (it is, after all, becoming easier for everyone, not just a particular person), so that in terms of the proportion of computing power you have over the block chain, nothing has changed, even though you might be finding blocks faster.  
> **username_0**: It would then seem that the only purpose of hashing is to control the time (approximately anyways) which it takes to find blocks, to control the rate at which new coins are introduced into the economy.  Is this incorrect?  
> **username_0**: Furthermore, when I mine now, all the coins I mine are deposited into a specific address, so although I personally might make use of more than one address, as far as mining is concerned, I only have one at a time.  Given that, how would keeping tracking of transaction verifications by Bitcoin address be any 'worse' (in the sense of using addresses for the purposes of identification) than the way mining works now?  
> **username_1**: It's true that the difficulty is also used to predict the rate at which blocks are created, I will add that to the answer.  
> **username_2**: @username_1 I have a question. Let's say after the previous block, there is no pending transactions. Now 2 miners A and B in the world with same equipment, should they wait a couple of minutes for new transactions to come, and then pack them and also include the Hash of the previous block, then start to solve that Hash puzzle? I feel that the best strategy for any miner in this case would be directly pack an empty block with no transactions but the previous block's hash and immediately start to solve that Hash puzzle. If that's the case, then start from Block 0, it should all be empty block  
> **username_1**: @username_2 Sorry for the delay. If there are no transactions, a miner will never wait. They will start working on an empty block. Then, when a new transaction comes in, the miner can decide to change the block it is working on. It's important to understand that starting work on a new block doesn't give you a disadvantage, since work is not incremental. So the miner will probably create a new block with that transaction and then switch his miner hardware to solve that block instead of the empty one.  

---

