<p>Nothing prevents a miner from creating a fork which contains invalid blocks. However just because they are in a blockchain does not mean that everyone will accept them. All of the other full nodes on the network (including other miners), will receive the block containing the invalid transaction and reject the entire block as invalid. So that block will not become part of their main chain and neither will any block built on top of it, regardless of how much work it has. So a malicious miner could do that, but the invalid block wouldn't become part of the Bitcoin blockchain and every other full node would just reject it and ignore it.</p>

<p>The miner could continue to mine this invalid blockchain. But if no one uses it, then his coins on that chain are valueless and thus the miner would be losing money to continue to mine it.</p>

CC BY-SA 4.0
2018-11-13T04:19:53.207Z
2018-11-13T04:19:53.207Z
Ava Chow
<p>If a miner includes an invalid transaction in a block, the block is invalid, regardless of the proof of work.</p>

<p>When other nodes verify the block, they will notice that the transaction is invalid, and consider the entire block invalid.</p>

<p>As a result of this, the miner will not receive the mining reward from that block, since it will not be accepted by the network. Thus, miners try hard to ensure their blocks are valid, or they receive no payment for their efforts.</p>

CC BY-SA 4.0
2018-11-13T04:20:02.620Z
2018-11-13T04:20:02.620Z
Raghav Sood
<p>If a malicious miner changes the amount in a given transaction, the hash value of the block changes. Thus, he has to find the required hash value again in that block. Let's say he successfully found the hash value. But what happens to the verification of the transaction the miner has changed? Suppose that he doesn’t have the private key of the sender, verification of this digital signature will fail at this point. Can the malicious miner still be able to add this block to a new chain or is there any mechanism to detect this failure and prevent him from making a new chain? </p>

<transactions><mining-theory><signature><attack>
What happens when the verification of a manipulated transaction fail?
sflow
# What happens when the verification of a manipulated transaction fail?

(Asked by: username_0 on 2018-11-13)

If a malicious miner changes the amount in a given transaction, the hash value of the block changes. Thus, he has to find the required hash value again in that block. Let's say he successfully found the hash value. But what happens to the verification of the transaction the miner has changed? Suppose that he doesn’t have the private key of the sender, verification of this digital signature will fail at this point. Can the malicious miner still be able to add this block to a new chain or is there any mechanism to detect this failure and prevent him from making a new chain?

**Tags:** transactions, mining-theory, signature, attack


---

## 2 answers

### Answer by username_1 on 2018-11-13. Score: 1

Nothing prevents a miner from creating a fork which contains invalid blocks. However just because they are in a blockchain does not mean that everyone will accept them. All of the other full nodes on the network (including other miners), will receive the block containing the invalid transaction and reject the entire block as invalid. So that block will not become part of their main chain and neither will any block built on top of it, regardless of how much work it has. So a malicious miner could do that, but the invalid block wouldn't become part of the Bitcoin blockchain and every other full node would just reject it and ignore it.

The miner could continue to mine this invalid blockchain. But if no one uses it, then his coins on that chain are valueless and thus the miner would be losing money to continue to mine it.


---

### Answer by username_2 on 2018-11-13. Score: 1

If a miner includes an invalid transaction in a block, the block is invalid, regardless of the proof of work.

When other nodes verify the block, they will notice that the transaction is invalid, and consider the entire block invalid.

As a result of this, the miner will not receive the mining reward from that block, since it will not be accepted by the network. Thus, miners try hard to ensure their blocks are valid, or they receive no payment for their efforts.


---

