<p>Bitcoin nodes have to be able to perform a blockchain reorganisation. This is because in a large network, two distant miners can mine a new block at the same time, each of which reaches their nearby nodes before the other miner's block. A subsequent blockchain reorganisation is necessary to make all nodes in the whole network have the same blocks in their copy of the blockchain. This replaces one of the two mined blocks. Generally this can happen after several blocks have been mined over each of the two different blocks at the same block-height. Nodes learning of the alternate head of blockchain choose the one with the most work (proof of work). During the reorganisation they make the appropriate deletions and additions to their UTXO set.</p>
<p>The attack called a &quot;51% attack&quot; is a way in which this necessary blockchain reorganisation process can be exploited by a miner with more than 50% of the <em>total network hashing power</em> (not of number of <em>nodes</em> as people sometimes mistakenly think)</p>
<hr />
<ul>
<li><a href="https://bitcoin.stackexchange.com/search?q=51%25+is%3Aq">Questions about 51% attack</a></li>
<li><a href="https://bitcoin.stackexchange.com/q/658/13866">What can an attacker with 51% of hash power do?</a></li>
</ul>

CC BY-SA 4.0
2021-09-13T11:11:18.023Z
2021-09-13T11:21:21.667Z
2021-09-13T11:21:21.667Z
RedGrittyBrick
<p>If a transaction is already mined in lets say block A and has 2 confirmations, how can this transaction be spent again?</p>
<p>My understanding is that for a transaction to be propagated to the network it must be verified by each node, one of the checks is to see if the referenced UTXOs have been spent.</p>
<p>In order to double spend the inputs referenced in this transaction included in block A each node would attempt to verify it but would reject the transaction since the inputs have already been spent and so the double spend attempt would fail regardless of if you have control of 51% of hashing power.</p>
<p>So how is it that these double spends are possible by remining block A in this case?</p>

<transactions>
How is a double spend via 51% attack possible?
Jamie
# How is a double spend via 51% attack possible?

(Asked by: username_0 on 2021-09-13)

If a transaction is already mined in lets say block A and has 2 confirmations, how can this transaction be spent again?

My understanding is that for a transaction to be propagated to the network it must be verified by each node, one of the checks is to see if the referenced UTXOs have been spent.

In order to double spend the inputs referenced in this transaction included in block A each node would attempt to verify it but would reject the transaction since the inputs have already been spent and so the double spend attempt would fail regardless of if you have control of 51% of hashing power.

So how is it that these double spends are possible by remining block A in this case?

**Tags:** transactions


---

## 1 answers

### Answer by username_1 on 2021-09-13. Score: 3

Bitcoin nodes have to be able to perform a blockchain reorganisation. This is because in a large network, two distant miners can mine a new block at the same time, each of which reaches their nearby nodes before the other miner's block. A subsequent blockchain reorganisation is necessary to make all nodes in the whole network have the same blocks in their copy of the blockchain. This replaces one of the two mined blocks. Generally this can happen after several blocks have been mined over each of the two different blocks at the same block-height. Nodes learning of the alternate head of blockchain choose the one with the most work (proof of work). During the reorganisation they make the appropriate deletions and additions to their UTXO set.

The attack called a "51% attack" is a way in which this necessary blockchain reorganisation process can be exploited by a miner with more than 50% of the *total network hashing power* (not of number of *nodes* as people sometimes mistakenly think)

---

* [Questions about 51% attack](https://bitcoin.stackexchange.com/search?q=51%25+is%3Aq)
* [What can an attacker with 51% of hash power do?](https://bitcoin.stackexchange.com/q/658/13866)


---

