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.
1 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).