Issue Details
- Number
- 27369
- Title
- Fix net grouping of non-IP networks
- Description
- ### Current behaviour
`NetGroupManager::GetGroup()` was designed with IP networks in mind, where for example `10.20.30.40` and `10.20.30.45` are "close" and likely to belong to the same entity, while `100.20.30.40` is "distant" from them. This does not apply however for Tor, I2P and CJDNS where the address is "random" bytes. Actually, Tor, I2P and CJDNS addresses that have common prefix are _harder_ to obtain than ones that don't have a common prefix (the opposite compared to IP).
Currently `NetGroupManager::GetGroup()` is doing prefixing on Tor, I2P and CJDNS addresses and assumes same properties apply as for IP addresses. This magically "works" to some extent but has drawbacks. Some serious changes are needed to remove that assumption from the code.
See
https://github.com/bitcoin/bitcoin/pull/22563
https://github.com/bitcoin/bitcoin/pull/27264#issuecomment-1481322628
### Expected behaviour
* Don't do prefixing on Tor, I2P and CJDNS and don't assume proximity based on that.
* Treat all addresses from Tor as one group (because it is very easy to obtain huge amount of them). Same for I2P and CJDNS.
* Make sure addrman can still store enough addresses from those networks.
* Make sure a single source from Tor, I2P and CJDNS cannot flood addrman with junk due to the previous point.
- URL
-
https://github.com/bitcoin/bitcoin/issue/27369
- Closed by
-
Back to List