Open aarshkshah1992 opened 4 years ago
@Stebalien @aschmahmann.
Thanks for filing the issue on this, I thought we'd already filed this when we first hacked in the GenRandPeerID
function but I guess not.
Worth noting that the outlier here isn't really the bucket refreshing but the FindPeer RPC. Tagging https://github.com/libp2p/go-libp2p/issues/784 as a reminder.
@aschmahmann I am not sure what you mean.
I understand that the GetClosestPeers
RPC needs to take a kadId and move away from using the FindPeer
RPC. However, how is the FindPeer issue linked to what we are trying to do here ?
@jacobheun For the 0.6 milestone.
We should have a
SearchByKadId
RPC which allows us to search for a key in the network using it's DHT Id in the XOR space and then revisit how we refresh the Routing Table/have better tests.TODO
[ ] Have a
SearchByKadId
RPC.[ ] Rewrite the refresh logic in DHT & Routing Table to use the new RPC.
[ ] Remove the
GenRandPeerId
ingo-libp2p-kbucket
function which can ONLY produce uptomaxCpls
.[x] Stop refreshing once we stop filling buckets because we are searching for CPLs that might not even have peers in the network. (https://github.com/libp2p/go-libp2p-kad-dht/issues/550) PR at https://github.com/libp2p/go-libp2p-kad-dht/pull/601.
[ ] Have a solid integration test and a TestGround that ensures the Refresh works correctly.
Also,
Nice to have:
[x] Collapse empty buckets to make the state easy to reason about (https://github.com/libp2p/go-libp2p-kbucket/issues/72). PR at: https://github.com/libp2p/go-libp2p-kbucket/pull/77.
[x] Test refreshes on an empty RT returns an appropriate error https://github.com/libp2p/go-libp2p-kad-dht/issues/555. PR at https://github.com/libp2p/go-libp2p-kad-dht/pull/601.