libp2p/go-libp2p-kad-dht

SearchValue update peers with newer record

dennis-tra opened this issue · 1 comments

When searching for an IPNS or PK record, we will store the updated version of that record with all the closest peers that we have found while querying. If the query aborts after the three closest haven't returned anyone closer, we still update the remaining 17 peers that we haven't contacted and store our currently known "best" record with them. However, these 17 peers may also hold the same record - we just don't know because we haven't contacted them yet.

I would change the logic in V2 to only store the updated record with peers that provably returned a stale record during the query operation.

iand commented