{"action":"created","issue":{"url":"https://api.github.com/repos/ipfs/go-ipfs/issues/1316","labels_url":"https://api.github.com/repos/ipfs/go-ipfs/issues/1316/labels{/name}","comments_url":"https://api.github.com/repos/ipfs/go-ipfs/issues/1316/comments","events_url":"https://api.github.com/repos/ipfs/go-ipfs/issues/1316/events","html_url":"https://github.com/ipfs/go-ipfs/pull/1316","id":83649745,"number":1316,"title":"WIP: discover peers from cjdns","user":{"login":"lgierth","id":19248,"avatar_url":"https://avatars.githubusercontent.com/u/19248?v=3","gravatar_id":"","url":"https://api.github.com/users/lgierth","html_url":"https://github.com/lgierth","followers_url":"https://api.github.com/users/lgierth/followers","following_url":"https://api.github.com/users/lgierth/following{/other_user}","gists_url":"https://api.github.com/users/lgierth/gists{/gist_id}","starred_url":"https://api.github.com/users/lgierth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lgierth/subscriptions","organizations_url":"https://api.github.com/users/lgierth/orgs","repos_url":"https://api.github.com/users/lgierth/repos","events_url":"https://api.github.com/users/lgierth/events{/privacy}","received_events_url":"https://api.github.com/users/lgierth/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ipfs/go-ipfs/labels/backlog","name":"backlog","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-06-01T19:11:50Z","updated_at":"2015-06-02T00:15:58Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ipfs/go-ipfs/pulls/1316","html_url":"https://github.com/ipfs/go-ipfs/pull/1316","diff_url":"https://github.com/ipfs/go-ipfs/pull/1316.diff","patch_url":"https://github.com/ipfs/go-ipfs/pull/1316.patch"},"body":"Cjdns provides a private and authenticated IPv6 network on top of UDP or Ethernet. We can use its peer list (\"peerstats\") or routing table (\"nodestore\") to discover peers and assume IPFS might be running on port 4001.\r\n\r\nThis PR introduces a discovery service analogous to MDNS, which polls cjdns' admin API and then dials each of the possible peers.\r\n\r\nIt already discovers peers, but does not yet dial them, since dialing requires the peer ID. A little refactoring of swarm_dial.go will enable dialing without a peer ID. An idea for that will follow in a comment."},"comment":{"url":"https://api.github.com/repos/ipfs/go-ipfs/issues/comments/107751393","html_url":"https://github.com/ipfs/go-ipfs/pull/1316#issuecomment-107751393","issue_url":"https://api.github.com/repos/ipfs/go-ipfs/issues/1316","id":107751393,"user":{"login":"lgierth","id":19248,"avatar_url":"https://avatars.githubusercontent.com/u/19248?v=3","gravatar_id":"","url":"https://api.github.com/users/lgierth","html_url":"https://github.com/lgierth","followers_url":"https://api.github.com/users/lgierth/followers","following_url":"https://api.github.com/users/lgierth/following{/other_user}","gists_url":"https://api.github.com/users/lgierth/gists{/gist_id}","starred_url":"https://api.github.com/users/lgierth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lgierth/subscriptions","organizations_url":"https://api.github.com/users/lgierth/orgs","repos_url":"https://api.github.com/users/lgierth/repos","events_url":"https://api.github.com/users/lgierth/events{/privacy}","received_events_url":"https://api.github.com/users/lgierth/received_events","type":"User","site_admin":false},"created_at":"2015-06-02T00:15:58Z","updated_at":"2015-06-02T00:15:58Z","body":"> i'd prefer a cjdns-specific solution where we use the cjdns key for the ipfs node, or to make the cjdns discovery routine actually get the key (by opening a connection to the node, getting the key from the handshake, and closing the connection) -- before real dial happens. (a bit inefficient, but perhaps safer, as in the cjdns specific case, the network transport case gives us security)\r\n\r\nAgreed, I just thought I'll make it part of swarm_dial.go in order to avoid duplication. It's probably better to have it duplicated for now, and refactor later once it's definitely what we want. The service is small and contained, so the risk is low.\r\n\r\n> maybe we could add /cjdns as a transport to multiaddr. although I know it should work as just /ipv6 :) (not sure)\r\n\r\nThis would still require changes to both the code that expects an ID, and code that deals with IPv6. I think the other option of having the service fetch the ID before dialing, is less complicated."}}