Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Normalization #8

Closed
dettanym opened this issue Sep 14, 2023 · 1 comment
Closed

Normalization #8

dettanym opened this issue Sep 14, 2023 · 1 comment
Assignees

Comments

@dettanym
Copy link
Owner

dettanym commented Sep 14, 2023

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

Important files:

  • kad.go: Defines a set of interfaces that are then implemented in libp2p-go-kad-dht v2 repo. They use Go Generics; might be worth checking them out before diving into this file. We discuss interfaces that we need to modify below.
  • routing/simplert: A simple RT implementing the RoutingTable interface. Includes a test function as well.
  • key.go: Implements the Key interface through 256 and 32 bit keys. The 32 bit keys can be used for simulating small networks.
  • server/basicserver/basicserver.go:

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 dettanym changed the title LibP2P private interface algorithm Develop LibP2P private interfaces Sep 14, 2023
@dettanym dettanym changed the title Develop LibP2P private interfaces Normalization Oct 27, 2023
@dettanym
Copy link
Owner Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants