{"action":"created","issue":{"url":"https://api.github.com/repos/ipfs/js-ipfs-bitswap/issues/18","repository_url":"https://api.github.com/repos/ipfs/js-ipfs-bitswap","labels_url":"https://api.github.com/repos/ipfs/js-ipfs-bitswap/issues/18/labels{/name}","comments_url":"https://api.github.com/repos/ipfs/js-ipfs-bitswap/issues/18/comments","events_url":"https://api.github.com/repos/ipfs/js-ipfs-bitswap/issues/18/events","html_url":"https://github.com/ipfs/js-ipfs-bitswap/issues/18","id":157452085,"number":18,"title":"Questions about Impl","user":{"login":"jbenet","id":138401,"avatar_url":"https://avatars.githubusercontent.com/u/138401?v=3","gravatar_id":"","url":"https://api.github.com/users/jbenet","html_url":"https://github.com/jbenet","followers_url":"https://api.github.com/users/jbenet/followers","following_url":"https://api.github.com/users/jbenet/following{/other_user}","gists_url":"https://api.github.com/users/jbenet/gists{/gist_id}","starred_url":"https://api.github.com/users/jbenet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbenet/subscriptions","organizations_url":"https://api.github.com/users/jbenet/orgs","repos_url":"https://api.github.com/users/jbenet/repos","events_url":"https://api.github.com/users/jbenet/events{/privacy}","received_events_url":"https://api.github.com/users/jbenet/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-05-30T08:05:26Z","updated_at":"2016-05-30T09:39:40Z","closed_at":null,"body":"Hey @dignifiedquire i have some questions re impl. Forgive silliness, first time i look at it.\r\n\r\n\r\n1. why is bitswap block key going to hex in the proto msg? it should be straight binary -- https://github.com/ipfs/js-ipfs-bitswap/blob/master/src/message/index.js#L48\r\n2. why bitswap.stop has this.network.start() https://github.com/ipfs/js-ipfs-bitswap/blob/master/src/index.js#L276\r\n3. why bitswap.network uses bl? isnt this wasteful? is it caching all buffers? (i've only glanced at bl, havent used it) https://github.com/ipfs/js-ipfs-bitswap/blob/master/src/network/index.js#L40\r\n4. `provierRequestTimeout` spelling - https://github.com/ipfs/js-ipfs-bitswap/blob/master/src/constants.js#L7\r\n"},"comment":{"url":"https://api.github.com/repos/ipfs/js-ipfs-bitswap/issues/comments/222454381","html_url":"https://github.com/ipfs/js-ipfs-bitswap/issues/18#issuecomment-222454381","issue_url":"https://api.github.com/repos/ipfs/js-ipfs-bitswap/issues/18","id":222454381,"user":{"login":"jbenet","id":138401,"avatar_url":"https://avatars.githubusercontent.com/u/138401?v=3","gravatar_id":"","url":"https://api.github.com/users/jbenet","html_url":"https://github.com/jbenet","followers_url":"https://api.github.com/users/jbenet/followers","following_url":"https://api.github.com/users/jbenet/following{/other_user}","gists_url":"https://api.github.com/users/jbenet/gists{/gist_id}","starred_url":"https://api.github.com/users/jbenet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbenet/subscriptions","organizations_url":"https://api.github.com/users/jbenet/orgs","repos_url":"https://api.github.com/users/jbenet/repos","events_url":"https://api.github.com/users/jbenet/events{/privacy}","received_events_url":"https://api.github.com/users/jbenet/received_events","type":"User","site_admin":false},"created_at":"2016-05-30T09:39:40Z","updated_at":"2016-05-30T09:39:40Z","body":"> Actually it is not, as far as I understand go-bitswap casts the key to a string on the conversion to protobuf, which results in a conversion to base58\r\n\r\nI don't _think_ this https://github.com/ipfs/go-ipfs/blob/master/exchange/bitswap/message/message.go#L156  calls  https://github.com/ipfs/go-ipfs/blob/master/blocks/key/key.go#L16-L18 -- i think the keys are sent as straight up binary. calling `string(buf)` only casts to string, does not call `.String()`. cc @whyrusleeping \r\n\r\n> it's buffering up a single message, which we have to because the protocol-buffer parser we are using can only parse a complete message\r\n\r\nok so only one message? it releases the previous messages? "}}
{"actor":{"display_login":"jbenet"}}