{"action":"created","issue":{"url":"https://api.github.com/repos/libp2p/go-libp2p/issues/459","repository_url":"https://api.github.com/repos/libp2p/go-libp2p","labels_url":"https://api.github.com/repos/libp2p/go-libp2p/issues/459/labels{/name}","comments_url":"https://api.github.com/repos/libp2p/go-libp2p/issues/459/comments","events_url":"https://api.github.com/repos/libp2p/go-libp2p/issues/459/events","html_url":"https://github.com/libp2p/go-libp2p/issues/459","id":373038686,"node_id":"MDU6SXNzdWUzNzMwMzg2ODY=","number":459,"title":"InfoFromP2pAddr unable to parse Multiaddr from Host","user":{"login":"lthibault","id":9452561,"node_id":"MDQ6VXNlcjk0NTI1NjE=","avatar_url":"https://avatars0.githubusercontent.com/u/9452561?v=4","gravatar_id":"","url":"https://api.github.com/users/lthibault","html_url":"https://github.com/lthibault","followers_url":"https://api.github.com/users/lthibault/followers","following_url":"https://api.github.com/users/lthibault/following{/other_user}","gists_url":"https://api.github.com/users/lthibault/gists{/gist_id}","starred_url":"https://api.github.com/users/lthibault/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lthibault/subscriptions","organizations_url":"https://api.github.com/users/lthibault/orgs","repos_url":"https://api.github.com/users/lthibault/repos","events_url":"https://api.github.com/users/lthibault/events{/privacy}","received_events_url":"https://api.github.com/users/lthibault/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-10-23T14:42:26Z","updated_at":"2018-10-24T14:51:28Z","closed_at":"2018-10-24T14:51:28Z","author_association":"NONE","body":"Hello, \r\n\r\nPlease consider the following test-case:\r\n\r\n```go\r\npackage main\r\n\r\nimport (\r\n    \"log\"\r\n    \"context\"\r\n\r\n    libp2p \"github.com/libp2p/go-libp2p\"\r\n    ps \"github.com/libp2p/go-libp2p-peerstore\"\r\n)\r\n\r\nvar c = context.Background()\r\n\r\nfunc main() {\r\n    h0, err := libp2p.New(c)\r\n    if err != nil {\r\n        panic(err)\r\n    }    \r\n\r\n    addr0 := h0.Addrs()[1]\r\n\r\n    _, err := ps.InfoFromP2pAddr(addr0)\r\n    if err != nil {\r\n        panic(err)\r\n    }\r\n}\r\n```\r\n\r\nThis snippet panics with `invalid p2p multiaddr`.\r\n\r\nThis is surprising since `Host.Addrs()` returns a list of `Multiaddr` objects, so why shouldn't these be parsable?  I see two possibilities:\r\n\r\n1. There is a bug in `InfoFromP2pAddr`\r\n2. There is no bug, but there's a non-documented gotcha (which should be documented plainly)\r\n\r\nThoughts?"},"comment":{"url":"https://api.github.com/repos/libp2p/go-libp2p/issues/comments/432690910","html_url":"https://github.com/libp2p/go-libp2p/issues/459#issuecomment-432690910","issue_url":"https://api.github.com/repos/libp2p/go-libp2p/issues/459","id":432690910,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMjY5MDkxMA==","user":{"login":"lthibault","id":9452561,"node_id":"MDQ6VXNlcjk0NTI1NjE=","avatar_url":"https://avatars0.githubusercontent.com/u/9452561?v=4","gravatar_id":"","url":"https://api.github.com/users/lthibault","html_url":"https://github.com/lthibault","followers_url":"https://api.github.com/users/lthibault/followers","following_url":"https://api.github.com/users/lthibault/following{/other_user}","gists_url":"https://api.github.com/users/lthibault/gists{/gist_id}","starred_url":"https://api.github.com/users/lthibault/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lthibault/subscriptions","organizations_url":"https://api.github.com/users/lthibault/orgs","repos_url":"https://api.github.com/users/lthibault/repos","events_url":"https://api.github.com/users/lthibault/events{/privacy}","received_events_url":"https://api.github.com/users/lthibault/received_events","type":"User","site_admin":false},"created_at":"2018-10-24T14:51:28Z","updated_at":"2018-10-24T14:51:28Z","author_association":"NONE","body":"Brilliant!  I was expecting there to be some magic involved, but explicit creation suits me just fine! 😃 \r\n\r\nThanks for your work on this project.  I've been waiting _years_ to find something like this."}}
{"actor":{"display_login":"lthibault"}}