Open Stebalien opened 4 years ago
I wonder about the onboarding of new peers in the network. This could be critical for short-lived deamons such as browser. In the second case above, the remote peer will have the behaviour of a typical well-behaved but "young" peer. If it is constantly rejected by older peers with more complete RT, won't we have segregation between some old peers well connected among themselves, and badly connected peers which are only connected among themselves because the first category keep rejecting them? This will result in tiered network, or at least slow the "onboarding" of new peers.
If this is correct, I see several possible mitigations. Some may already be in place:
While writing this, I realise it may belong in ipfs/notes.
This will result in tiered network, or at least slow the "onboarding" of new peers.
This is exactly what we want. We want longer-lived, known-good peers to serve as the backbone of the network to improve reliability and make it harder to attack the network with new peers.
New peers will still be able to join, make requests, and store records on behalf of the network. However, they'll only be queried towards the end of queries, instead of being used to service long hops.
The mature peers should let a fraction of their RT open to well-behaved but "young" peers.
The new release tries to do this by marking "slow" peers as candidates for eviction. That means that any old and overloaded peers will slowly be replaced by less overloaded peers. It'll still take a while for new peers to work their way into routing tables, but again, that's desired.
Ok, got it.
What about peer exchange upon eviction? This would still be helpful for new peer to become useful sooner (by filling their RT). Consecutive PX-then-eviction should help them quickly find their correct tier and be at the optimum spot for their capabilities. I guess this will slightly increase cost for old nodes, but can save a lot of peer discovery traffic and connection establishing overall, I guess.
And what about the bullet 3: the mean time for a fresh node to fill x% of its table? Is it something that is mesured?
Ah, I don't think we're quite on the same page here:
Ack. I thought it was symmetric. It makes much more sense to me now!
If we ask a peer in our routing table for closer peers to query and they give us "bad peers", we should hold demote this peer and consider replacing them in the future (like we do for peers that are slow to respond).
A "bad" response is one of: