I have read that a block contains several bitcoin transactions and an attacker can forge fake blocks.

Does these forged fake bitcoin blocks cost the attackers money for mining or was it just generated for free from the attacker node?

The blockchain is safe from attacks because the blockchain was programmed by Satoshi to validate and keep the longest chain.

So the forge block will disappear from the blockchain network. This is wonderful but what happens if an attacker forge bitcoin blocks?

I even read that some of these forge blocks can have 2 to 3 confirmations. Is this true?

So how do you identify these forge bitcoin blocks immediately?

  • 3
    Does this answer your question? Regarding block validation in blockchain – RedGrittyBrick Feb 28 '20 at 14:20
  • NO, it did not answer my question – Pr3dator Feb 29 '20 at 13:18
  • @Pr3dator: What you described here and what was shown in the video you posted previously simply doesn't work on the Bitcoin network. At the very least someone would have to be infected by malware or using maliciously-modified Bitcoin software to be susceptible to this sort of attack. I don't think further questions about this will be constructive unless you provide some evidence or a better description of how such an attack is supposed to work. – Murch Feb 29 '20 at 16:38

I assume that when you say an attacker can forge blocks, you mean that a dishonest miner can create invalid blocks.

The answer is no for a very simple reason. When a miner's bitcoin node (the computer which runs the bitcoin software) creates a block, it must follow all of the consensus rules. Let's say, for example, he tries to create a coinbase transaction with 13 bitcoin, plus fees. Note that, at the time of writing this, the block reward is 12.5 bitcoin.

Then it finds Proof of Work and sends the block to the rest of the network. Every node that receives this block will first check if it follows the rules. Since it doesn't, the node will reject that block. Therefore, it will not get included in the blockchain and the miner just lost the reward.

So, every node validates everything on its own. No node trusts information it recieves from other nodes.

  • Thanks for your answer but I have to disagree on this because my friend recieved 100 unconfirmed bitcoin transaction that stayed days without being confirmed before it disappeared from the blockchain network. And I strongly believe it was not double spent. It was a forged bitcoin block because nobody would want to risk 100 BTC double spent – Pr3dator Feb 29 '20 at 13:23
  • Did your friend use software provided by the attacker? – Murch Feb 29 '20 at 15:16

I have read that ... an attacker can forge fake blocks.

Such blocks are discarded by other nodes.

If you read the original Bitcoin whitepaper by Satoshi Nakamoto from 2008 you will see it says

5. Network

The steps to run the network are as follows:

  1. New transactions are broadcast to all nodes.
  2. Each node collects new transactions into a block.
  3. Each node works on finding a difficult proof-of-work for its block.
  4. When a node finds a proof-of-work, it broadcasts the block to all nodes.
  5. Nodes accept the block only if all transactions in it are valid and not already spent.
  6. Nodes express their acceptance of the block by working on creating the next block in the chain, using the hash of the accepted block as the previous hash.

Note step 5 there.

Originally every node was also a miner but now most nodes are not. Nakamoto foresaw this. The whitepaper describes Simplified Payment Verification (SPV).

Nakamoto later continues

11. Calculations

We consider the scenario of an attacker trying to generate an alternate chain faster than the honest chain. Even if this is accomplished, it does not throw the system open to arbitrary changes, such as creating value out of thin air or taking money that never belonged to the attacker. Nodes are not going to accept an invalid transaction as payment, and honest nodes will never accept a block containing them. An attacker can only try to change one of his own transactions to take back money he recently spent

(my emphasis)

The original whitepaper describes how the network defends against 51% and double-spending attacks. It is worth reading

Not the answer you're looking for? Browse other questions tagged or ask your own question.