{"action":"created","issue":{"url":"https://api.github.com/repos/Agoric/PlaygroundVat/issues/8","repository_url":"https://api.github.com/repos/Agoric/PlaygroundVat","labels_url":"https://api.github.com/repos/Agoric/PlaygroundVat/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/Agoric/PlaygroundVat/issues/8/comments","events_url":"https://api.github.com/repos/Agoric/PlaygroundVat/issues/8/events","html_url":"https://github.com/Agoric/PlaygroundVat/issues/8","id":363850521,"node_id":"MDU6SXNzdWUzNjM4NTA1MjE=","number":8,"title":"Hi from the libp2p team!","user":{"login":"daviddias","id":1211152,"node_id":"MDQ6VXNlcjEyMTExNTI=","avatar_url":"https://avatars0.githubusercontent.com/u/1211152?v=4","gravatar_id":"","url":"https://api.github.com/users/daviddias","html_url":"https://github.com/daviddias","followers_url":"https://api.github.com/users/daviddias/followers","following_url":"https://api.github.com/users/daviddias/following{/other_user}","gists_url":"https://api.github.com/users/daviddias/gists{/gist_id}","starred_url":"https://api.github.com/users/daviddias/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daviddias/subscriptions","organizations_url":"https://api.github.com/users/daviddias/orgs","repos_url":"https://api.github.com/users/daviddias/repos","events_url":"https://api.github.com/users/daviddias/events{/privacy}","received_events_url":"https://api.github.com/users/daviddias/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-09-26T04:07:15Z","updated_at":"2018-11-28T12:34:29Z","closed_at":null,"author_association":"NONE","body":"Hi Agoric Team!\r\n\r\nCongratulations on your [PoC Release](https://agoric.com/proof-of-concept-release/) 👏🏽👏🏽👏🏽. We were very excited when we saw the announcement and extra to see that you decided to give libp2p a try and wrote down some very useful notes on [issues that you are hitting](https://github.com/Agoric/PlaygroundVat/blob/master/docs/limitations.md#incomplete-libp2p-js). \r\n\r\nFollowing up on your notes:\r\n\r\n> However js-libp2p is missing a lot of features that the flagship Go implementation provides. One feature we would like is the DHT that disseminates host addresses.\r\n\r\nThis has been a long time coming and one that we are close to the finish line -- https://github.com/libp2p/js-libp2p-kad-dht/. \r\n\r\n@vasco-santos and @jacobheun have been solving some last mile interoperability issues with the go-ipfs implementation and testing it on larger networks to make sure the implementation is sound. This is one of the big priorities for Q4 2018.\r\n\r\nYou can see how to activate it at -- https://github.com/libp2p/js-libp2p/tree/master/examples/peer-and-content-routing -- and experiment with it. Feedback and bug reports are welcome!\r\n\r\n> We might address this with embedded address hints, \"redirectories\", and/or by running a central server that can distribute address information.\r\n\r\nIf you use the WebRTC transport we have available, you will be using this _central point_ (aka rendezvous) that provides an exchange for SDP offers and automatic Peer Discovery.\r\n\r\nYou can check the example at -- https://github.com/libp2p/js-libp2p/tree/master/examples/libp2p-in-the-browser -- to try it out.\r\n\r\nNote: If you need WebRTC in Node.js, there is also a module that can be used and libp2p knows how to use it -- https://www.npmjs.com/package/wrtc --, however, it isn't the most stable thing yet.\r\n\r\n> Closely related to this is the NAT-bypassing relay behavior that allows IPFS servers to work behind firewalls. The consequence of this being absent from the JS port is that Vat nodes behind a firewall will not be able to accept connections from other Vats outside that firewall. Once a connection is made, it is used for messages in both directions, so certain topologies will work anyways.\r\n\r\nWe need to prioritize TCP hole punching (hint @jacobheun, @vasco-stantos). Until, there are two other ways to pierce through NATs, either using the WebRTC transport (which uses NAT hole punching natively) and/or use libp2p Circuit Relay.\r\n\r\nWe have a full tutorial on how to use it inside the [js-ipfs examples folder](https://github.com/ipfs/js-ipfs/tree/master/examples/circuit-relaying), but it is an actual js-libp2p feature.\r\n\r\n> js-libp2p defaults to using (2048-bit) RSA keys for the node identities, which is adequate, but I'd prefer Ed25519 elliptic-curve keys, which are smaller and much faster. We may rewrite VatTP to use an entirely different wire protocol, in which messages are individually encrypted and then signed (so the signatures could be checked by third parties). In that case, the transport-layer encryption would be redundant, and we wouldn't care so much about the details.\r\n\r\nWe've been wanting to support Ed25519 Keys for a while (in fact, js-libp2p started with Ed25519 keys and then later changed to RSA to match go-libp2p/go-ipfs). We haven't prioritized this as it would be a significant change for the IPFS network that we have to plan for, however, we can totally add support for these in js-libp2p and let other disjoint networks use them.\r\n\r\n@vasco-santos, @jacobheun, let's chat about this and see if we can make it happen this quarter.\r\n\r\n> The networking code currently brings up connections on demand: the TCP connection for each target host is initiated as soon as the first outbound message is generated for that host. An additional one-second loop is used to retry any failed connections. This is a bit too aggressive, and should be changed to use an exponential backoff algorithm, with random jitter to avoid the \"thundering herd\" problem.\r\n\r\nAgreed, this should be configurable. Our _dialer_ has been going through a refactor recently. @jacobheun, can you look into this?\r\n\r\n> In addition, until we have ACKs, we will try to make a connection even after all the messages have been delivered. Status messages are displayed to stdout each time the loop runs, making the console somewhat noisy (but we should display at least one message when the connection fails, to help diagnose problems).\r\n\r\nI'm not 100% sure if I understand this point . Is this specific to the libp2p internals or your own wire protocol over libp2p?\r\n\r\nThaaaank you so much for this report ❤️ It is super useful for us to learn what are the pain points of our users. It helps us make better prioritization. If you don't mind, we can continue using this issue (or other issues) to keep the conversation going and let you know when this situations have been solved.\r\n\r\nAlso, feel welcome to join the libp2p our channels ([GH](https://github.com/libp2p/js-libp2p/issues), [IRC](http://webchat.freenode.net/?channels=%23libp2p)) to report issues or chat with the js-libp2p team. @vasco-santos, @jacobheun and I have been planning our [goals for Q4](https://github.com/libp2p/js-libp2p/pull/247) and we are still on time to incorporate some of the needs here."},"comment":{"url":"https://api.github.com/repos/Agoric/PlaygroundVat/issues/comments/442431525","html_url":"https://github.com/Agoric/PlaygroundVat/issues/8#issuecomment-442431525","issue_url":"https://api.github.com/repos/Agoric/PlaygroundVat/issues/8","id":442431525,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MjQzMTUyNQ==","user":{"login":"jacobheun","id":639834,"node_id":"MDQ6VXNlcjYzOTgzNA==","avatar_url":"https://avatars3.githubusercontent.com/u/639834?v=4","gravatar_id":"","url":"https://api.github.com/users/jacobheun","html_url":"https://github.com/jacobheun","followers_url":"https://api.github.com/users/jacobheun/followers","following_url":"https://api.github.com/users/jacobheun/following{/other_user}","gists_url":"https://api.github.com/users/jacobheun/gists{/gist_id}","starred_url":"https://api.github.com/users/jacobheun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jacobheun/subscriptions","organizations_url":"https://api.github.com/users/jacobheun/orgs","repos_url":"https://api.github.com/users/jacobheun/repos","events_url":"https://api.github.com/users/jacobheun/events{/privacy}","received_events_url":"https://api.github.com/users/jacobheun/received_events","type":"User","site_admin":false},"created_at":"2018-11-28T12:34:29Z","updated_at":"2018-11-28T12:34:29Z","author_association":"NONE","body":"We recently release 0.24 for libp2p, which includes state machine additions for libp2p and the switch. It also exposes a new dial method, which calls back with a state machine of the connection. Our goal here is to provide more support for users to be able to hook into the individual connections more. We also are going to be working on leveraging these changes with the Connection Manager to handle the backoffs internally in libp2p. \r\n\r\n> In the long run, it'd be great if libp2p had some sort of \"please try to maintain a connection\" feature, in which a callback was fired each time a new connection is established\r\n\r\nBoth go and js libp2p implementations are looking at how we can improve this and prioritize certain connections, so that for particular nodes we can work to maintain that connection.  We are also working on reviewing the libp2p APIs in addition to supporting [Async Iterators](https://github.com/libp2p/js-libp2p/issues/266), which could help us improve support for returning new connections as they're established.\r\n\r\nIn regards to Ed25519 keys, we are close to having support for them released, we're just working through a minor issue with the compatibility of the various keys. This should be released in the next few weeks, I'll follow up here once that's available."}}
{"actor":{"display_login":"jacobheun"}}