<p>If a node creates a block with an invalid transaction in it, the block will not propagate, as every node validates the entire chain.  So that dishonest node will be isolated.   So it doesn't matter, as long as there are more full honest nodes out there then invalid nodes, then nobody will see the longer chain.</p>

CC BY-SA 3.0
2014-04-14T15:29:30.250Z
2014-04-14T15:29:30.250Z
Peter
<p>You are guessing that even with 51% of the network hashrate, an attacker can still not benefit from invalid transactions. However, the usual idea of a 51% attack is not to create invalid transactions, but to <strong>remove valid transactions</strong>, as if they had never happened.</p>

<p>For example, if Sam makes a valid transaction in payment to company XYZ, and then receives the item or service they paid for, having 51% of the network hashrate may allow them to go back to the block before they made the payment and create blocks that are similar to the existing blocks but do not include that payment. If they continue producing valid blocks until their chain is the longest, then the rest of the network will use this chain and continue adding blocks to it. This would mean that everyone else in the world would see the blockchain without problems with the correct balances, apart from company XYZ who provided the item or service. That company would now find themselves without the payment, as it would now appear never to have been paid in the first place.</p>

<p>EDIT: As explained in dchapes' comment below, the original transaction may still be held by other nodes, who would simply add it to a later block once the attack is over (so company XYZ would see the payment disappear, but then reappear later). In order to prevent this happening, Sam would have to include a new transaction which spends (at least some of) the money elsewhere. Provided the input address then has less than the required amount to validate the old transaction, the old transaction will be rejected by the network and company XYZ will never receive the payment.</p>

CC BY-SA 3.0
2014-04-14T15:35:58.637Z
Just removing the transaction doesn't acomplish much, it can just be re-added at a later time by anyone that has it. So the attacker would typically try to move to a block chain where the same output is spent elsewhere (e.g. to an address they control) in order to make their original payment a double spend which will never validate.
dchapes
CC BY-SA 3.0
2014-04-14T19:20:29.390Z
So to put it another way, the goal of the attack is to remove valid transactions and replace them with other valid, but conflicting, transactions.
Nate Eldredge
CC BY-SA 3.0
2014-04-14T19:22:31.200Z
@Nate Eldredge that summarises it beautifully.
trichoplax is on Codidact now
CC BY-SA 3.0
2014-04-14T15:31:26.673Z
2014-04-14T15:44:12.237Z
2014-04-14T15:44:12.237Z
trichoplax is on Codidact now
<p>My understanding is that honest nodes work on the longest <strong>valid</strong> block chain.</p>

<p>Suppose a dishonest node confirms an invalid transaction.  If that node manages to continue producing confirmations at a rate slightly higher than the rest of the network, as in a 51% attack, they may succeed in maintaining the <strong>longest</strong> block chain.  However, as that block chain is invalid, why does this matter?  </p>

<p>That is, if all honest miners are only accepting only valid confirmations, how it is bothersome if a rouge miner is industriously hashing away at an invalid chain?</p>

<security><confirmations><majority-attack>
Who would accept confirmations of invalid transactions in a 51% attack?
zkurtz
# Who would accept confirmations of invalid transactions in a 51% attack?

(Asked by: username_0 on 2014-04-14)

My understanding is that honest nodes work on the longest **valid** block chain.

Suppose a dishonest node confirms an invalid transaction. If that node manages to continue producing confirmations at a rate slightly higher than the rest of the network, as in a 51% attack, they may succeed in maintaining the **longest** block chain. However, as that block chain is invalid, why does this matter?

That is, if all honest miners are only accepting only valid confirmations, how it is bothersome if a rouge miner is industriously hashing away at an invalid chain?

**Tags:** security, confirmations, majority-attack


---

## 2 answers

### Answer by username_2 on 2014-04-14. Score: 3 | Accepted answer

You are guessing that even with 51% of the network hashrate, an attacker can still not benefit from invalid transactions. However, the usual idea of a 51% attack is not to create invalid transactions, but to **remove valid transactions**, as if they had never happened.

For example, if Sam makes a valid transaction in payment to company XYZ, and then receives the item or service they paid for, having 51% of the network hashrate may allow them to go back to the block before they made the payment and create blocks that are similar to the existing blocks but do not include that payment. If they continue producing valid blocks until their chain is the longest, then the rest of the network will use this chain and continue adding blocks to it. This would mean that everyone else in the world would see the blockchain without problems with the correct balances, apart from company XYZ who provided the item or service. That company would now find themselves without the payment, as it would now appear never to have been paid in the first place.

EDIT: As explained in username_3' comment below, the original transaction may still be held by other nodes, who would simply add it to a later block once the attack is over (so company XYZ would see the payment disappear, but then reappear later). In order to prevent this happening, Sam would have to include a new transaction which spends (at least some of) the money elsewhere. Provided the input address then has less than the required amount to validate the old transaction, the old transaction will be rejected by the network and company XYZ will never receive the payment.

> **Comments:**
> **username_3**: Just removing the transaction doesn't acomplish much, it can just be re-added at a later time by anyone that has it. So the attacker would typically try to move to a block chain where the same output is spent elsewhere (e.g. to an address they control) in order to make their original payment a double spend which will never validate.  
> **username_4**: So to put it another way, the goal of the attack is to remove valid transactions and replace them with other valid, but conflicting, transactions.  
> **username_2**: @username_4 that summarises it beautifully.  

---

### Answer by username_1 on 2014-04-14. Score: 1

If a node creates a block with an invalid transaction in it, the block will not propagate, as every node validates the entire chain. So that dishonest node will be isolated. So it doesn't matter, as long as there are more full honest nodes out there then invalid nodes, then nobody will see the longer chain.


---

