<p>The hash must be less than or equal to a certain target hash. This is to reduce the probability that any random hash you choose will be a valid hash with valid work. The whole point of this is to prove that you (as a miner) did, on average, a certain number of hashes (work) in order to find the block.</p>

CC BY-SA 3.0
2017-08-30T14:14:15.740Z
Thank you for your answer. But why is `a certain number of hashes (work)` required? Is this not just wasting of IT resources?
A9FB987FEC983024D87B987ABE8FF8
CC BY-SA 3.0
2017-08-30T14:22:20.980Z
No, it is done to prove that you are consuming a certain number of resources and thus have something at risk in the game. You may consider it wasting resources, but it really is not as that is what secures the blockchain. In order for an attacker to change the blockchain, they must do the same amount of work (and thus consume the same or more resources) in order to change one block. More work (and thus more resources) are required to change older blocks. This makes changing history prohibitively expensive.
Ava Chow
CC BY-SA 3.0
2017-08-30T14:26:04.990Z
But if the hash of Block N is calculated on base of hash of Block N-1, does this not guarantee the security? And the hacker can also buy two-three servers and do the same work.
A9FB987FEC983024D87B987ABE8FF8
CC BY-SA 3.0
2017-08-30T14:35:54.813Z
No, it does not. Block N can still be changed by performing the same amount of work done to make block N in the first place. In order to change block N and also change block N+1, you would need to do the same amount of work for block N and the same amount of work for block N+1, so you would need to do double the work. For each new block found that you want changed, you need to an additional amount of work for that block too, otherwise honest miners will outpace you and your fork of the blockchain will be rejected by everyone.
Ava Chow
CC BY-SA 3.0
2017-08-30T14:45:08.807Z
Do I understand right - these hash requirements guarantee that certain minimum time is (for example X hours) needed for generating hash and making race with hackers? For example, honest data miners are generating block N and the hacker wants to change block N-1, but hacker needs to be first to change block N-1 and create on base of block N-1 block N. However, it is considered that hacker never be the first, because honest data miners will generate one block faster then hacker two blocks. Am I right?
A9FB987FEC983024D87B987ABE8FF8
CC BY-SA 3.0
2017-08-30T15:00:45.623Z
Kind of. It isn't a minimum time but rather that in order to perform the amount of work required, an attacker would need to invest in a significant amount of mining hardware, so much so that it would be prohibitively expensive to do that.
Ava Chow
CC BY-SA 3.0
2017-08-30T15:03:23.433Z
Ok, thank you for detailed comments. I will wait a little, maybe someone will give another answer. Otherwise I will accept your answer.
A9FB987FEC983024D87B987ABE8FF8
CC BY-SA 3.0
2017-08-30T13:51:03.757Z
2017-08-30T13:51:03.757Z
Ava Chow
<p>I am a very very beginner with blockchain. I've read a lot of articles and can't understand one thing. When data miner is creating new block, the hash of such block must meet certain requirements. As I understand this is the key difficulty for creating new block. However, as a programmer I know that it is very easy to create new hash. Can anyone explain what is the reason of such requirements?</p>

<blockchain><bitcoin-core>
Why does hash of new created block must meet certain requirements in blockchain?
A9FB987FEC983024D87B987ABE8FF8
# Why does hash of new created block must meet certain requirements in blockchain?

(Asked by: username_0 on 2017-08-30)

I am a very very beginner with blockchain. I've read a lot of articles and can't understand one thing. When data miner is creating new block, the hash of such block must meet certain requirements. As I understand this is the key difficulty for creating new block. However, as a programmer I know that it is very easy to create new hash. Can anyone explain what is the reason of such requirements?

**Tags:** blockchain, bitcoin-core


---

## 1 answers

### Answer by username_1 on 2017-08-30. Score: 2

The hash must be less than or equal to a certain target hash. This is to reduce the probability that any random hash you choose will be a valid hash with valid work. The whole point of this is to prove that you (as a miner) did, on average, a certain number of hashes (work) in order to find the block.

> **Comments:**
> **username_0**: Thank you for your answer. But why is `a certain number of hashes (work)` required? Is this not just wasting of IT resources?  
> **username_1**: No, it is done to prove that you are consuming a certain number of resources and thus have something at risk in the game. You may consider it wasting resources, but it really is not as that is what secures the blockchain. In order for an attacker to change the blockchain, they must do the same amount of work (and thus consume the same or more resources) in order to change one block. More work (and thus more resources) are required to change older blocks. This makes changing history prohibitively expensive.  
> **username_0**: But if the hash of Block N is calculated on base of hash of Block N-1, does this not guarantee the security? And the hacker can also buy two-three servers and do the same work.  
> **username_1**: No, it does not. Block N can still be changed by performing the same amount of work done to make block N in the first place. In order to change block N and also change block N+1, you would need to do the same amount of work for block N and the same amount of work for block N+1, so you would need to do double the work. For each new block found that you want changed, you need to an additional amount of work for that block too, otherwise honest miners will outpace you and your fork of the blockchain will be rejected by everyone.  
> **username_0**: Do I understand right - these hash requirements guarantee that certain minimum time is (for example X hours) needed for generating hash and making race with hackers? For example, honest data miners are generating block N and the hacker wants to change block N-1, but hacker needs to be first to change block N-1 and create on base of block N-1 block N. However, it is considered that hacker never be the first, because honest data miners will generate one block faster then hacker two blocks. Am I right?  
> **username_1**: Kind of. It isn't a minimum time but rather that in order to perform the amount of work required, an attacker would need to invest in a significant amount of mining hardware, so much so that it would be prohibitively expensive to do that.  
> **username_0**: Ok, thank you for detailed comments. I will wait a little, maybe someone will give another answer. Otherwise I will accept your answer.  

---

