<blockquote>
<p>Now what will happen if node 2 will try to relay the same message again?</p>
<p>How this is prevented in bitcoin network?</p>
</blockquote>
<p>The transaction is the same as one that the nodes have already seen; it has the same txid, so they will ignore it.</p>
<p>Bitcoin does not use an accounts based system. Rather Bitcoin uses a transaction outputs model, so each input directly references a transaction output that is being spent. So there is no problem with transactions being replayed; they have already been seen so they're just duplicates that can be ignored.</p>

CC BY-SA 3.0
2018-03-13T20:28:21.283Z
Andrew, Thanks!. So is it the txid a unique identifier here? Who creates txid? Is txid related to 'sender', 'receiver' and 'amount of coin' getting transferred?
Faiz Ali
CC BY-SA 3.0
2018-03-13T20:37:21.147Z
The txid is a unique identifier. It is the hash of the transaction itself. It isn't something that is assigned or created by anybody. It is a property of the transaction itself that anyone can calculate.
Ava Chow
CC BY-SA 3.0
2018-03-13T20:25:34.630Z
2018-03-13T20:25:34.630Z
2020-06-16T11:10:03.350Z
Ava Chow
<p>A user sending coins broadcast transaction hash to bitcoin network. Now if someone is able to copy the message (hashed transaction) and relay it multiple times it could lead to possible disruption. </p>

<p>Eg:</p>

<p>Node 1 sends a transaction to node 2. Node 2 forwards to node 3 and so on. This transaction gets mined.</p>

<p>Now what will happen if node 2 will try to relay the same message again?</p>

<p>How this is prevented in bitcoin network?</p>

CC BY-SA 3.0
2018-03-13T19:56:31.367Z
I don't understand. What you're describing is normal operation: every node will relay to transaction to all peers eventually, until the whole network has heard about it.
Pieter Wuille
<bitcoin-core><client>
Relay bitcoin transaction attack
Faiz Ali
# Relay bitcoin transaction attack

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

A user sending coins broadcast transaction hash to bitcoin network. Now if someone is able to copy the message (hashed transaction) and relay it multiple times it could lead to possible disruption.

Eg:

Node 1 sends a transaction to node 2. Node 2 forwards to node 3 and so on. This transaction gets mined.

Now what will happen if node 2 will try to relay the same message again?

How this is prevented in bitcoin network?

**Tags:** bitcoin-core, client

> **Comments:**
> **username_1**: I don't understand. What you're describing is normal operation: every node will relay to transaction to all peers eventually, until the whole network has heard about it.  

---

## 1 answers

### Answer by username_2 on 2018-03-13. Score: 2

> Now what will happen if node 2 will try to relay the same message again?
>
> How this is prevented in bitcoin network?

The transaction is the same as one that the nodes have already seen; it has the same txid, so they will ignore it.

Bitcoin does not use an accounts based system. Rather Bitcoin uses a transaction outputs model, so each input directly references a transaction output that is being spent. So there is no problem with transactions being replayed; they have already been seen so they're just duplicates that can be ignored.

> **Comments:**
> **username_0**: Andrew, Thanks!. So is it the txid a unique identifier here? Who creates txid? Is txid related to 'sender', 'receiver' and 'amount of coin' getting transferred?  
> **username_2**: The txid is a unique identifier. It is the hash of the transaction itself. It isn't something that is assigned or created by anybody. It is a property of the transaction itself that anyone can calculate.  

---

