<blockquote>
<p><strong>Is bitcoin have to traverse to all transaction on all block before to see that my transaction is exist before</strong></p>
</blockquote>
<p>No.</p>
<p>Nodes such as Bitcoin Core maintain a list of unspent transaction outputs (UTXOs). When verifying a transaction they check that its inputs are all in their UTXO set. Transaction outputs referenced as inputs to earlier transactions will no longer be in the UTXO set.</p>

CC BY-SA 4.0
2024-11-21T16:14:25.073Z
2024-11-25T14:53:55.430Z
2024-11-25T14:53:55.430Z
RedGrittyBrick
<p>in case I copy an existing transaction (I mean copy everything of an transaction fromAdress, toAddres, amount, signature, ...) and try to broadcast it, I know that It will fail because the transaction is exist before. My question is: Is bitcoin have to traverse to all transaction on all block before to see that my transaction is exist before, I think that is just very inefficient</p>

CC BY-SA 4.0
2024-11-21T16:20:55.117Z
This question is similar to: [How does the transaction signature prevent transaction duplication?](https://bitcoin.stackexchange.com/questions/55212/how-does-the-transaction-signature-prevent-transaction-duplication). If you believe it’s different, please [edit] the question, make it clear how it’s different and/or how the answers on that question are not helpful for your problem.
Vojtěch Strnad
<transactions><replay-attack>
copy an existing transaction
Pham Viet Linh
# copy an existing transaction

(Asked by: username_0 on 2024-11-21)

in case I copy an existing transaction (I mean copy everything of an transaction fromAdress, toAddres, amount, signature, ...) and try to broadcast it, I know that It will fail because the transaction is exist before. My question is: Is bitcoin have to traverse to all transaction on all block before to see that my transaction is exist before, I think that is just very inefficient

**Tags:** transactions, replay-attack

> **Comments:**
> **username_1**: This question is similar to: [How does the transaction signature prevent transaction duplication?](https://bitcoin.stackexchange.com/questions/55212/how-does-the-transaction-signature-prevent-transaction-duplication). If you believe it’s different, please [edit] the question, make it clear how it’s different and/or how the answers on that question are not helpful for your problem.  

---

## 1 answers

### Answer by username_2 on 2024-11-21. Score: 2

> **Is bitcoin have to traverse to all transaction on all block before to see that my transaction is exist before**

No.

Nodes such as Bitcoin Core maintain a list of unspent transaction outputs (UTXOs). When verifying a transaction they check that its inputs are all in their UTXO set. Transaction outputs referenced as inputs to earlier transactions will no longer be in the UTXO set.


---

