Changed the topic title from "Add Known Clients To Contacts List".
After the client has been up running for a while the size of the network can fairly well be estimated. How about we use this knowledge together with other informations about the network as for example the distribution of IPs known to the client, and the expected distribution of IDs, which in the latter should be uniform, to do some housekeeping in the routing table.
: At the moment there is a limit set on how many IDs which are allowed to come from IPs in the same /24 subnet. This limit is currently set to 10 and I think it is 2 for every routing bin.
After some session uptime and perhaps together with information stored from previous sessions this condition could be strengthened in the sense that whenever possible the routing table tries to replace nodes with IPs which are too close and replace some of them with other nodes from different parts of the IP space, but still would serve the same purpose as the replaced nodes.
As I've got it, nodes with IDs far away from the own clients ID, e.g. outside of the tolerance zone it belongs to, can esaily be switched with other nodes as their purpose is mainly to act as first contacts when the own client is making searches and it needs to get in touch with nodes whos IDs are close to searched targetID. While nodes with IDs close to the own ID are mainly used by other nodes when searching for a targetID close to own client's ID.
This means that the closer we got to the own client's ID the more nodes at the same distance are known to the own client
I think it's even possible to strengthen the size of the subnets even further to e.g. /22 subnets during this housekeeping.
: Something similar could be done when it comes to KadIDs. If nodes with IDs unnecessary close to each other are found in the routing table, there is a replacement mechanism which tries to replace one or more randomly chosen of these contacts with other nodes which would serve their purpose in the routing table as good as the replaced ones.
As above, the farther away from the own clients KadID the more candidates there exists which can replace the nodes which are under consideration. And the closer the IDs are the less candidates could act as substitutes. The closest ones we are stuck with as it is preferrable that we have knowledge about them, because with this method it can't be judged which are good or bad. To do that other means of evaluation is needed.
So what are the advantages? Well, to pollute a routing table more resources are needed. It wouldn't help much against the ongoing Chinese node insertions attacks. But it would decrease the effect they have on other searches on IDs close to an ID they are attacking. Without increasing their resources and changing strategy when it comes to IDs they would definately suffer when it comes to the number of injected contacts in ordinary peers routing tables.
This post has been edited by Nissenice: 13 December 2011 - 10:17 PM