Found a way to kill bitcoin. If I'm right?

We have already used that bitcoin and the blockchain can be a priori considered invulnerable to hacking attempts and destruction. It is based on the mechanism of the proof-of-work, requiring a certain number of zeros received from the SHA256 hash that is obtained is extremely rare, which explains the value of mined coins. Let's say I want all to cheat. For this I add a solo miner with backspin, which reduces the complexity of on no, for example:

for(i = 0; i<=Difficulty; i++) {
BlockHash[i] = '0';
};

Now I have all the hashes from the right turn into valid for the system. Next, I disconnected from the Internet and on local computer instantly punched 2K "blocks". If their hash is to try to calculate again, cheating will immediately reveal, but who sees that? When the process is complete, I remounted.

Sees my network, the longest chain and dutifully distributes it to all miners. The last block let the rejects, but we are not greedy. But the rest remain safely in the chain, and new blocks are created on top of the lime. Everyone can see that the blocks are fake, but nobody can do anything about it, because they are already in the middle of the blockchain. The deed is done.

I have never found information about that the system re-computes the hash of blocks already mined, in order to avoid this. Maybe I'm wrong?
June 10th 19 at 16:06
1 answer
June 10th 19 at 16:08
Solution
There is an attack like a hidden generation chains, but in PoW systems this is a very risky and expensive, in contrast to the same PoS.
Described above will not go for so many reasons, the main error in logic is present, and for the details, dig in the documentation or code:

1. There is not the number of zeros is important, and that the hash was less than or equal to target. About the zeros usually make for easy understanding for the beginners. How about the longest chain.
2. The network takes valid not the longest and most challenging circuit. Most often it is the longest, but not necessarily.
3. All nodes check coming to them blocks where the hashes will not match with the content, you will get out of date within the permissible limits, etc., that block will be rejected. The network is not an isolated decision - making body, a network of independent nodes, each of which makes decisions. And just relay what I think is invalid. So your fake blocks on the nearby nodes do not go away.
4. Many customers have sehardcore "control points" on some older units, so even if will reveal some such evil, the vulnerability could not fast the entire chain to rewrite at all.

Find more questions by tags Crypto currencyBlockchain