<p>A transaction is confirmed when it is included in a block, so you will need to watch for a message that alerts your node (or whatever software you are using to watch the P2P gossip traffic) to a new block, that includes the transaction in question. It doesn't matter if a node run by a miner relays your transaction to other nodes on the network, it only matters that the transaction is included in a block that is included in the longest (most work) valid chain. </p>

<p>Note that the relaying of this information has been optimized through various BIPs, so that the network is not naïvely using more bandwidth than required. This means that a message explicitly listing your transaction as confirmed may never be encountered, instead a node can gain this information implicitly, through the use of their mempool, and computational filters included with the new block message. You should take some time to learn about these optimizations if you're working to understand the network's P2P traffic, there are some questions on here that have more info. <a href="https://bitcoin.stackexchange.com/questions/86231/whats-the-distinction-between-bip-157-and-bip-158-are-they-supported-by-bitcoi">This one</a> may be a good starting point.</p>

CC BY-SA 4.0
2019-06-08T20:38:56.727Z
Of course, just because you see your transaction in a block, that does not prove it is a *valid* block.  To check that, you need to verify that the block meets all Bitcoin protocol requirements and links into the longest chain - which basically entails writing your own Bitcoin node.  So it's probably better to solve this problem by actually running an off-the-shelf Bitcoin node, and having it notify you when the transaction is confirmed.
Nate Eldredge
CC BY-SA 4.0
2019-06-08T06:07:35.723Z
2019-06-08T09:45:08.227Z
2019-06-08T09:45:08.227Z
chytrik
<p>Assume that I send a specific value from a source wallet to a destination wallet and simultaneously capture the input and output traffic with Wireshark.</p>

<p>I can extract output address and it's value from captured traffic, but how i can detect (from packets of traffic) that my transaction confirmed from miners?</p>

<p>In the other words, when i check out the bitcoin traffic, i see that the specific value which i sent(and it's output address), exists in some packets with different IP addresses, which i don't know which one is a miner. is there a flag or specific message sent to me that help me to understand that my transaction is confirmed?</p>

<transactions><wallet><utxo-set><packets>
Is there a flag or specific message in a bitcoin pcap to show us our bitcoin transaction is confirmed or not?
Saeed
# Is there a flag or specific message in a bitcoin pcap to show us our bitcoin transaction is confirmed or not?

(Asked by: username_0 on 2019-06-08)

Assume that I send a specific value from a source wallet to a destination wallet and simultaneously capture the input and output traffic with Wireshark.

I can extract output address and it's value from captured traffic, but how i can detect (from packets of traffic) that my transaction confirmed from miners?

In the other words, when i check out the bitcoin traffic, i see that the specific value which i sent(and it's output address), exists in some packets with different IP addresses, which i don't know which one is a miner. is there a flag or specific message sent to me that help me to understand that my transaction is confirmed?

**Tags:** transactions, wallet, utxo-set, packets


---

## 1 answers

### Answer by username_1 on 2019-06-08. Score: 4

A transaction is confirmed when it is included in a block, so you will need to watch for a message that alerts your node (or whatever software you are using to watch the P2P gossip traffic) to a new block, that includes the transaction in question. It doesn't matter if a node run by a miner relays your transaction to other nodes on the network, it only matters that the transaction is included in a block that is included in the longest (most work) valid chain.

Note that the relaying of this information has been optimized through various BIPs, so that the network is not naïvely using more bandwidth than required. This means that a message explicitly listing your transaction as confirmed may never be encountered, instead a node can gain this information implicitly, through the use of their mempool, and computational filters included with the new block message. You should take some time to learn about these optimizations if you're working to understand the network's P2P traffic, there are some questions on here that have more info. [This one](https://bitcoin.stackexchange.com/questions/86231/whats-the-distinction-between-bip-157-and-bip-158-are-they-supported-by-bitcoi) may be a good starting point.

> **Comments:**
> **username_2**: Of course, just because you see your transaction in a block, that does not prove it is a *valid* block.  To check that, you need to verify that the block meets all Bitcoin protocol requirements and links into the longest chain - which basically entails writing your own Bitcoin node.  So it's probably better to solve this problem by actually running an off-the-shelf Bitcoin node, and having it notify you when the transaction is confirmed.  

---

