3

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?

0

2 Answers 2

3

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

3
  • 2
    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
    Apr 14, 2014 at 15:35
  • 2
    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. Apr 14, 2014 at 19:20
  • @Nate Eldredge that summarises it beautifully. Apr 14, 2014 at 19:22
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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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