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

<p>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.</p>

<p>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.</p>

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

CC BY-SA 4.0
2020-02-29T13:23:48.327Z
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
CC BY-SA 4.0
2020-02-29T15:16:26.647Z
Did your friend use software provided by the attacker?
Murch
CC BY-SA 4.0
2020-02-28T17:50:32.563Z
2020-02-28T17:50:32.563Z
ecavero
<blockquote>
  <p><strong>I have read that ... an attacker can forge fake blocks.</strong></p>
</blockquote>

<p>Such blocks are discarded by other nodes.</p>

<p>If you read <a href="https://bitcoin.org/bitcoin.pdf" rel="nofollow noreferrer">the original Bitcoin whitepaper by Satoshi Nakamoto</a> from 2008 you will see it says</p>

<blockquote>
  <h2>5. Network</h2>
  
  <p>The steps to run the network are as follows:  </p>
  
  <ol>
  <li>New transactions are broadcast to all nodes.  </li>
  <li>Each node collects new transactions into a block.  </li>
  <li>Each node works on finding a difficult proof-of-work for its block.  </li>
  <li>When a node finds a proof-of-work, it broadcasts the block to all nodes.  </li>
  <li><strong>Nodes accept the block only if all transactions in it are valid and not already spent.</strong>  </li>
  <li>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.</li>
  </ol>
</blockquote>

<p>Note step 5 there.</p>

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

<p>Nakamoto later continues</p>

<blockquote>
  <h2>11. Calculations</h2>
  
  <p>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. <strong>Nodes are
  not going to accept an invalid transaction as payment, and honest nodes will never accept a block
  containing them.</strong> An attacker can only try to change one of his own transactions to take back
  money he recently spent</p>
</blockquote>

<p>(my emphasis)</p>

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

CC BY-SA 4.0
2020-02-29T14:18:41.403Z
2020-02-29T14:18:41.403Z
RedGrittyBrick
<p>I have read that a block contains several bitcoin transactions and an attacker can forge fake blocks.</p>

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

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

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

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

<p>So how do you identify these forge bitcoin blocks immediately?</p>

CC BY-SA 4.0
2020-02-28T14:20:54.073Z
Does this answer your question? [Regarding block validation in blockchain](https://bitcoin.stackexchange.com/questions/89934/regarding-block-validation-in-blockchain)
RedGrittyBrick
CC BY-SA 4.0
2020-02-29T13:18:37.640Z
NO, it did not answer my question
Pr3dator
CC BY-SA 4.0
2020-02-29T16:38:15.337Z
@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
<bitcoin-core><transactions><blockchain><wallet><full-node>
How Do Attackers Forge Bitcoin Blocks And How Do You Identify Forge Bitcoin Blocks?
Pr3dator
# How Do Attackers Forge Bitcoin Blocks And How Do You Identify Forge Bitcoin Blocks?

(Asked by: username_0 on 2020-02-28)

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?

**Tags:** bitcoin-core, transactions, blockchain, wallet, full-node

> **Comments:**
> **username_1**: Does this answer your question? [Regarding block validation in blockchain](https://bitcoin.stackexchange.com/questions/89934/regarding-block-validation-in-blockchain)  
> **username_0**: NO, it did not answer my question  
> **username_2**: @username_0: 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.  

---

## 2 answers

### Answer by username_3 on 2020-02-28. Score: 3

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.

> **Comments:**
> **username_0**: 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  
> **username_2**: Did your friend use software provided by the attacker?  

---

### Answer by username_1 on 2020-02-29. Score: 0

> **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](https://bitcoin.org/bitcoin.pdf) 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


---

