cli -addrinfo: drop torv2; torv3 becomes onion per GetNetworkName()#22544
cli -addrinfo: drop torv2; torv3 becomes onion per GetNetworkName()#22544laanwj merged 2 commits intobitcoin:masterfrom
Conversation
|
Concept ACK |
|
Do you think "onion" is clearer than "tor"? |
|
I don't have a strong opinion, but in the absence of a need to distinguish between tor/onion v2 and v3, using the default naming of GetNetworkName(), getnetworkinfo, getpeerinfo, and getnodeaddresses seemed to make sense and is the simplest to implement. |
|
@jonatack Ah, being consistent with existing RPCs is a good reason. |
|
(Given that "onion" is used by our Lightning Network colleagues as a more generic term, it may make sense to globally revert our language back to "tor" at some point.) |
As Tor allows connectivity to IPv4 and IPv6 as well, it's less specific. This was always the reasoning to use "onion" specifically when dealing with hidden services. I don't think lightning also using the term is a good reason to change this. (So concept ACK anyway) |
Ah, thanks for the reminder why we did this. |
|
Concept ACK |
|
(Note to self, this needs an update to |
|
Concept ACK "tor" seems maybe slightly more descriptive than "onion" but "onion" exists in the code more 🤷♂️ |
The addresses are literally I guess a compromise could be |
|
Yes, I agree. Sorry for the mini-kerfuffle, I think "onion" is fine. |
I wasn't saying I preferred one or the other, but rather I was neutral to the conversation above and didn't really mind either one. |
Done. This should be ready now. |
Zero-1729
left a comment
There was a problem hiding this comment.
tACK 49d503a 🧉
LGTM, patch works as described.
Updated Tor docs and release notes are clear and straightforward.
$ bitcoin-cli -addrinfo
{
"addresses_known": {
"ipv4": 39192,
"ipv6": 3219,
"onion": 11,
"i2p": 0,
"total": 42422
}
}
klementtan
left a comment
There was a problem hiding this comment.
Code review and tested ACK 49d503a
{
"addresses_known": {
"ipv4": 83,
"ipv6": 37,
"onion": 30,
"i2p": 0,
"total": 150
}
}|
cr ACK 49d503a |
#22050 removed torv2 support from 22.0. For 23.0 and subsequent releases, we can probably remove torv2 from -addrinfo.
before
after
Per the naming of
netbase.{h, cpp}::GetNetworkName(), torv3 becomes onion, which is what is printed in the output of getpeerinfo, getnetworkinfo and getnodeaddresses.