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

feat: add zikade DHT router #10154

Closed
wants to merge 6 commits into from
Closed

feat: add zikade DHT router #10154

wants to merge 6 commits into from

Conversation

iand
Copy link
Contributor

@iand iand commented Sep 26, 2023

Adds a dht/zikade routing type which corresponds to the refactored zikade DHT currently under development (previously go-libp2p-kad-dht/v2).

Requires ipfs/boxo#472

This is intended as a future experimental routing method for Kubo.

Can be tested with configuration like this:

	"Routing": {
	  "Type": "custom",
	  "Routers": {
	    "zikade": {
	      "Type": "dht/zikade",
	      "Parameters": {
	        "Mode": "auto",
	        "PublicIPNetwork": true
	      }
	    }
	  },
	  "Methods": {
	    "find-peers": {
	      "RouterName": "zikade"
	    },
	    "find-providers": {
	      "RouterName": "zikade"
	    },
	    "provide": {
	      "RouterName": "zikade"
	    },
	    "get-ipns": {
	      "RouterName": "zikade"
	    },
	    "put-ipns": {
	      "RouterName": "zikade"
	    }
	  }
	},

@@ -106,6 +108,7 @@ type RouterType string
const (
RouterTypeHTTP RouterType = "http" // HTTP JSON API for delegated routing systems (IPIP-337).
RouterTypeDHT RouterType = "dht" // DHT router.
RouterTypeDHTv2 RouterType = "dhtv2" // DHT router using go-libp2p-kad-dht/v2.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this name is correct, this router is compatible with v1.
So I don't think v2 applies here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will allow different custom parameters, which I haven't added yet.

Copy link
Contributor

@Jorropo Jorropo Sep 26, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean network wise, it's just a different implementation, it's it will talk with other v1 dht servers and clients.
I would name it go-kademlia

The way I understand v2 here is that if I turn this I'm not part of the amino dht anymore.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see how this name could cause confusion between go-libp2p-kad-dht version 2 and version 2 of the dht protocols. I'll choose a better name - same for boxo

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed router type to dht/zikade

@iand iand changed the title feat: add go-libp2p-kad-dht/v2 DHT router feat: add zikade DHT router Oct 3, 2023
@iand
Copy link
Contributor Author

iand commented Dec 11, 2023

Resubmit when/if ipfs/boxo#472 is merged

@iand iand closed this Dec 11, 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

Successfully merging this pull request may close these issues.

2 participants