-1

I wonder how the following scenario is handled in bitcoin/crypto: Let's say evilminer has 10% mining power of a coin and he secretly mines blocks while the real chain is growing from blockheight 900 to 1000. He starts with a faked block 995 and stops at block 1005. At Blockheight 1000(real chain) he publishes his fake chain.A node would now request/get the next block. And it would get now block number 1001 from evilminer.

What would this node do with it? I think to know if the chain made by evilminer to proof wrong or true it would have to download block 1000 to 95 to finally see that block 95 was fake.

Is this correct or is there another way a node would handle it?

user3776738
  • 214
  • 2
  • 10
  • 27

1 Answers1

0

The situation you have stated would never arise.

  1. If you want to make your chain the longest, then you need to have more than 50 percent of the mining power, this way sometime in the future you will eventually catch up with the main chain and surpass it. The speed of catching up will be dependant on how much more than 50 percent you have. This attack works because this way you have beaten any other potential miners in the rate of producing of new blocks, so you are always producing blocks faster than anybody else on the network, hence ensuring that your chain will become longest.

  2. So your evilminer, given that he has 10 percent of mining power, would never be able to advance the length of his chain beyond the main chain. The only other possible way is to use a nonce of lower difficulty to speed up block production, but such a block would be rejected by any other node in the network deeming it as invalid.

Hence, in short the only way evilminer can make other nodes accept his blocks is to make his chain the longest, and that can only be done if he has more than 50 percent mining power of the network.

Edit 1 : Consider the computation power of every participant of the network and assume that when you sum these up, you get 100. Now if you have 10 percent of this total, it means your likelihood of finding a new block is higher than others who have lesser computation power than you. However, this does not guarantee that you will definitely find the nonce first.

Finding the hash that satisfies the difficulty depends on probability. You brute force your way through a large set of numbers until your hash satisfies the difficulty. It maybe possible that someone having mere 0.5 percent of total computation power finds the nonce first. However, the faster you can crunch these numbers, the higher the chance that you will find the nonce first.

So if somehow you have more than 50 percent of total computation power, that means you are processing these hashes faster than anybody else, and hence this increases the likelihood that you find the nonce first most of the times.

Also, this process of finding the nonce, is repeated for every block. So the work has to be done all over again for every block.

arjunkhera
  • 929
  • 6
  • 23
  • Ok, but how is the miningpower of the CHAIN proven? For the blocks I know that there's the difficulty which is setted every 2016 blocks, but for the chain?? – user3776738 Oct 25 '18 at 09:32
  • @user3776738 the difficulty of the block is what dictates the amount of mining power required. The computation power you put into finding hash for the block is a measure of your mining power. Having 51% means that you have more computing power than the whole network combined. Check [this](https://blog.goodaudience.com/what-is-a-51-attack-or-double-spend-attack-aa108db63474) for an infographic explanation of the same. – arjunkhera Oct 25 '18 at 12:06
  • But if he uses the same difficulty as the main chain, so his 10 blocks have the same computation power required to be legit as other blocks.There must be something in each block with calculates the difficulty of all blocks combined. So the n-th block must have the difficulty-sum of all previous blocks + the n-th block. I don't know about of such a field in the blockheader. – user3776738 Oct 25 '18 at 12:47
  • @user3776738 It seems you are not aware of how bitcoin works. Have you given the article i linked a read ? – arjunkhera Oct 25 '18 at 12:53
  • I just don't understand, how the blockheight can not be tampered.If someone claims it is Block number 1001.How can you proof him wrong, because it could be that your chain is the wrong chain,so you have to check it,right? – user3776738 Oct 25 '18 at 12:55
  • What do you mean by claim ? Are you aware how is a block added to the chain ? – arjunkhera Oct 25 '18 at 12:56
  • A block is accepted if it finds the nonce that satisfies the difficulty. You can't just add your block to the chain out of the blue. You have to find a hash that satisfies the difficulty and it requires a lot of computation power. Currently for bitcoin, this difficulty is too high for a single user to consider mining, that is why mining pools exist. – arjunkhera Oct 25 '18 at 13:00
  • Yes but you can mine this block with hashing power of 10% in 10x of the time.This is what i meant by mining blocks 995 to 1005 while the main chain is mining 900 to 1000 – user3776738 Oct 25 '18 at 13:02
  • @user3776738 check the edited answer. In case you have any other queries, I shall move this discussion to chat as it is a policy of SO to prevent extended discussions in chat – arjunkhera Oct 25 '18 at 13:15
  • Sorry, but you still did not understand my question at all. – user3776738 Oct 25 '18 at 13:20
  • Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/182502/discussion-between-arjunkhera-and-user3776738). – arjunkhera Oct 25 '18 at 13:21