<p>The only way this can happen is when <em>you</em> connected out to a Bitcoin Node running on a Tor hidden service (so you know its .onion address), and then that node gave you some IP/Tor addresses, which you stored in peers.dat.</p>
<blockquote>
<p>Does this not beat the privacy that TOR inherently provides?</p>
</blockquote>
<p>How so?</p>

CC BY-SA 4.0
2022-09-27T09:52:19.987Z
I performed a wireshark on my node running the hidden service and the traffic between nodes is indistinguishable. So the source address has to be sent somehow. Is it via the version message you think?
Vinay Shetty
CC BY-SA 4.0
2022-09-27T12:05:43.743Z
Your node already knew the onion address before it made a connection - otherwise how would it connect?
Pieter Wuille
CC BY-SA 4.0
2022-09-27T12:07:56.160Z
The may be because you specified it explicitly (through `-addnode` or `-connect`), or because it learned about this onion address from yet another node (nodes exchange IP addresses and onion addresses of known/rumoured nodes on the network to each other).
Pieter Wuille
CC BY-SA 4.0
2022-09-26T12:56:25.780Z
2022-09-26T12:56:25.780Z
Pieter Wuille
<p>I recently wrote a tool to decode the peers.dat in bitcoin core. Something peculiar that I noticed is how there were some addresses in the tables that had the source address as a .onion address.</p>
<p>Does this not beat the privacy that TOR inherently provides? and why does this happen? Is the information of the source passed on in the version message during the initial handshake?</p>

<bitcoin-core><peers><tor>
source address is .onion in peers.dat
Vinay Shetty
# source address is .onion in peers.dat

(Asked by: username_0 on 2022-09-26)

I recently wrote a tool to decode the peers.dat in bitcoin core. Something peculiar that I noticed is how there were some addresses in the tables that had the source address as a .onion address.

Does this not beat the privacy that TOR inherently provides? and why does this happen? Is the information of the source passed on in the version message during the initial handshake?

**Tags:** bitcoin-core, peers, tor


---

## 1 answers

### Answer by username_1 on 2022-09-26. Score: 3 | Accepted answer

The only way this can happen is when *you* connected out to a Bitcoin Node running on a Tor hidden service (so you know its .onion address), and then that node gave you some IP/Tor addresses, which you stored in peers.dat.

> Does this not beat the privacy that TOR inherently provides?

How so?

> **Comments:**
> **username_0**: I performed a wireshark on my node running the hidden service and the traffic between nodes is indistinguishable. So the source address has to be sent somehow. Is it via the version message you think?  
> **username_1**: Your node already knew the onion address before it made a connection - otherwise how would it connect?  
> **username_1**: The may be because you specified it explicitly (through `-addnode` or `-connect`), or because it learned about this onion address from yet another node (nodes exchange IP addresses and onion addresses of known/rumoured nodes on the network to each other).  

---

