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

docs: End-to-end private routing #14

Open
dettanym opened this issue Sep 14, 2023 · 0 comments
Open

docs: End-to-end private routing #14

dettanym opened this issue Sep 14, 2023 · 0 comments
Assignees

Comments

@dettanym
Copy link
Owner

dettanym commented Sep 14, 2023

For integration: refer to the Go LibP2P Kad DHT v2-develop branch

  • It's being tested and will be eventually merged into main. Monitor this pull request --- you can see the files changed in the pull request.
  • DHT type v2/dht.go: It includes a routing table field named rt and a DHT co-ordinator named kad.
  • Instantiating Routing Table interface (with non-generics): v2/coord/routing/probe.go. A field of this type is used in the DHT interface.
  • DHT co-ordinator v2/coord/coordinator.go. A field of this type is used in the DHT interface. Its Query function is also called on the client-side.
  • Messages: Can introduce privateFindPeer and privateFindProviders messages here.

Server-side: v2/handlers.go:

  1. handleFindPeer and handleGetProviders as in v1. Both take requests as the arguments, which include the key. Hopefully, through Normalization #8 we would've developed private versions of the requests. These methods call closerPeers which is also implemented in the same file.
  2. closerPeers: It internally calls d.rt.NearestNodes which again, we would've implemented privately (without the key).

Client-side:

  1. v2/routing.go: Implements FindPeer and FindProvidersAsync methods. (Sidenote: interfaces includes these two methods are defined in the Go LibP2P core repo.) Both methods run d.kad.Query with the key as an argument and a function fn to check whether the node in the last hop has the correct CID.
  2. DHT co-ordinator Query method: It looks up its own RT for the closest nodes and then currently, sends in a fake PB message with the key. So we need a private implementation of the Query method which does not send the key in the PB message (PIR request).
@dettanym dettanym changed the title Integrating & evaluating LibP2P PIR docs: End-to-end private routing Oct 27, 2023
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