dettanym / dhtpir-ipfs

Prototyping a private retrieval system into IPFS
MIT License
0 stars 0 forks source link

Normalization #8

Closed dettanym closed 1 year ago

dettanym commented 1 year ago

Probelab's GoKademlia repo LibP2P Go Kad DHT repo v2-develop branch

Important files:

Interfaces we need to modify in kad.go:

  1. Key interface --- we want another interface that is parameterized on top of the Key interface, called KeyPrefix. Alternately, this interface includes a CommonPrefixLength method. Maybe make a similar method called CommonPrefix?
  2. RoutingTable interface --- we will develop a normalized RT interface, which will run the normalization algorithm in its implementation of AddNode. Its implementation of the NearestNodes will take only the KeyPrefix as an argument and then just grab all nodes in the normalized bucket.
  3. Request and Response interfaces --- we need to have a PrivateRequest and PrivateResponse interfaces. These interfaces will not be parameterized on the Key type but the KeyPrefix type. In the PrivateRequest, we should replace the Target method with a method to preprocess the PIR request, if necessary, before computing the response. In the PrivateResponse, retain the CloserNodes method and type signature, but it should probably process the PIR response.
  4. RoutingProtocol interface --- the FindNode method's third argument target will now be of type KeyPrefix.
dettanym commented 1 year ago

See issues 1 and 2 in private-go-kademlia repo.