<p>Bitcoin Core's addrman (and its network stack in general) treats onion addresses as a type of IP addresses. So the (data part of) the onion addresses are stored directly.</p>
<p>In older versions this was done using onioncat embedding (a specific IPv6 subrange was used to encode onion addresses). Since last year, BIP155 is implemented, and that is used for encoding onion addresses (both in addrman and in the P2P protocol itself).</p>

CC BY-SA 4.0
2022-02-14T13:13:04.633Z
2022-02-14T13:13:04.633Z
Pieter Wuille
<p>I was curious what IP's are stored in the new and the tried tables in the bitcoin nodes when the peers have onion addresses.</p>

<bitcoin-core><client><peer-discovery>
IP's in the new and tried table for bitcoin nodes
Vinay Shetty
# IP's in the new and tried table for bitcoin nodes

(Asked by: username_0 on 2022-02-14)

I was curious what IP's are stored in the new and the tried tables in the bitcoin nodes when the peers have onion addresses.

**Tags:** bitcoin-core, client, peer-discovery


---

## 1 answers

### Answer by username_1 on 2022-02-14. Score: 5 | Accepted answer

Bitcoin Core's addrman (and its network stack in general) treats onion addresses as a type of IP addresses. So the (data part of) the onion addresses are stored directly.

In older versions this was done using onioncat embedding (a specific IPv6 subrange was used to encode onion addresses). Since last year, BIP155 is implemented, and that is used for encoding onion addresses (both in addrman and in the P2P protocol itself).


---

