<p>First of all, nodes do not necessarily have an address, nor do they necessarily have just one. Addresses are not identities and are not tied to nodes. A node operator can operate a node without a wallet, so that node does not have any addresses. A node operator could have a wallet on their node that has many addresses, that node would have many addresses. So this idea that each node has an address is itself incorrect.</p>

<p>For nodes that do have wallets, the wallet and the node basically operate separately. The node part (handles P2P, tx and block validation, etc.) does not know the contents of the wallet. It does not know what addresses are in the wallet and what transactions actually belong to the wallet. So no, the node cannot directly reveal the addresses for its associated wallet(s) as it does not have access to that information.</p>

<p>The only way you would learn what addresses belong to a node are by observing the transactions that it sends. But in order to know what transactions it truly sends, you need to surround that node with nodes that you control so that you can control/observe everything that that node learns about and sends. When it sends a transaction, it will be a transaction that was not relayed to it by one of your nodes surrounding it so you know that transaction originated from that node and then you can do other blockchain analysis techniques on that transaction to learn further information. This kind of attack is known as a sybil attack.</p>

<p>Another related attack is to connect to every single node on the network and see which node first relays a transaction. However this is basically impossible to do. There are many non-listening nodes so you wouldn't be able to connect to them. Additionally due to latency and physics, this is not as reliable as your node(s) could learn the transaction from a relay node instead of the direct connection to the originator if there is too much latency on that direct connection.</p>

<p>However performing these attacks is not easy. Nodes have active countermeasures to make these attacks more expensive and increase their own privacy. These attacks can be fairly costly and there is no real monetary gain from learning this information.</p>

CC BY-SA 4.0
2020-04-06T06:11:03.540Z
2020-04-06T06:11:03.540Z
Ava Chow
<p>No, nodes do not have a Bitcoin address.</p>

<p>Addresses are managed by wallets, but wallets are not the same as nodes. They're generally separate software, or hardware, often offline, and not accessible through nodes' P2P interfaces.</p>

CC BY-SA 4.0
2020-04-06T06:18:46.677Z
2020-04-06T06:18:46.677Z
Pieter Wuille
<p>Can I see the bitcoin address (pkh) of my directly connected peers? </p>

<p>I'm asking this question because if I can, I can deanonymize my peers given their IP addresses (from the TCP header) right? </p>

<p>If this is the case, isn't this a security flaw as one can set up a node and connect to as many nodes as they can. They can then create a mapping of IP to bitcoin addresses, thus deanonymize most users if they don't use a proxy service like Tor.</p>

<address><security>
Can I see the address of my direct peer?
Mike Pham
# Can I see the address of my direct peer?

(Asked by: username_0 on 2020-04-06)

Can I see the bitcoin address (pkh) of my directly connected peers?

I'm asking this question because if I can, I can deanonymize my peers given their IP addresses (from the TCP header) right?

If this is the case, isn't this a security flaw as one can set up a node and connect to as many nodes as they can. They can then create a mapping of IP to bitcoin addresses, thus deanonymize most users if they don't use a proxy service like Tor.

**Tags:** address, security


---

## 2 answers

### Answer by username_1 on 2020-04-06. Score: 1 | Accepted answer

First of all, nodes do not necessarily have an address, nor do they necessarily have just one. Addresses are not identities and are not tied to nodes. A node operator can operate a node without a wallet, so that node does not have any addresses. A node operator could have a wallet on their node that has many addresses, that node would have many addresses. So this idea that each node has an address is itself incorrect.

For nodes that do have wallets, the wallet and the node basically operate separately. The node part (handles P2P, tx and block validation, etc.) does not know the contents of the wallet. It does not know what addresses are in the wallet and what transactions actually belong to the wallet. So no, the node cannot directly reveal the addresses for its associated wallet(s) as it does not have access to that information.

The only way you would learn what addresses belong to a node are by observing the transactions that it sends. But in order to know what transactions it truly sends, you need to surround that node with nodes that you control so that you can control/observe everything that that node learns about and sends. When it sends a transaction, it will be a transaction that was not relayed to it by one of your nodes surrounding it so you know that transaction originated from that node and then you can do other blockchain analysis techniques on that transaction to learn further information. This kind of attack is known as a sybil attack.

Another related attack is to connect to every single node on the network and see which node first relays a transaction. However this is basically impossible to do. There are many non-listening nodes so you wouldn't be able to connect to them. Additionally due to latency and physics, this is not as reliable as your node(s) could learn the transaction from a relay node instead of the direct connection to the originator if there is too much latency on that direct connection.

However performing these attacks is not easy. Nodes have active countermeasures to make these attacks more expensive and increase their own privacy. These attacks can be fairly costly and there is no real monetary gain from learning this information.


---

### Answer by username_2 on 2020-04-06. Score: 1

No, nodes do not have a Bitcoin address.

Addresses are managed by wallets, but wallets are not the same as nodes. They're generally separate software, or hardware, often offline, and not accessible through nodes' P2P interfaces.


---

