{"action":"created","issue":{"url":"https://api.github.com/repos/ipld/js-ipld-dag-cbor/issues/52","repository_url":"https://api.github.com/repos/ipld/js-ipld-dag-cbor","labels_url":"https://api.github.com/repos/ipld/js-ipld-dag-cbor/issues/52/labels{/name}","comments_url":"https://api.github.com/repos/ipld/js-ipld-dag-cbor/issues/52/comments","events_url":"https://api.github.com/repos/ipld/js-ipld-dag-cbor/issues/52/events","html_url":"https://github.com/ipld/js-ipld-dag-cbor/issues/52","id":226285563,"node_id":"MDU6SXNzdWUyMjYyODU1NjM=","number":52,"title":"Support for bigger dag nodes out of the box","user":{"login":"magik6k","id":3867941,"node_id":"MDQ6VXNlcjM4Njc5NDE=","avatar_url":"https://avatars0.githubusercontent.com/u/3867941?v=4","gravatar_id":"","url":"https://api.github.com/users/magik6k","html_url":"https://github.com/magik6k","followers_url":"https://api.github.com/users/magik6k/followers","following_url":"https://api.github.com/users/magik6k/following{/other_user}","gists_url":"https://api.github.com/users/magik6k/gists{/gist_id}","starred_url":"https://api.github.com/users/magik6k/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/magik6k/subscriptions","organizations_url":"https://api.github.com/users/magik6k/orgs","repos_url":"https://api.github.com/users/magik6k/repos","events_url":"https://api.github.com/users/magik6k/events{/privacy}","received_events_url":"https://api.github.com/users/magik6k/received_events","type":"User","site_admin":false},"labels":[{"id":717904019,"node_id":"MDU6TGFiZWw3MTc5MDQwMTk=","url":"https://api.github.com/repos/ipld/js-ipld-dag-cbor/labels/P1%20-%20High","name":"P1 - High","color":"d93f0b","default":false},{"id":253100638,"node_id":"MDU6TGFiZWwyNTMxMDA2Mzg=","url":"https://api.github.com/repos/ipld/js-ipld-dag-cbor/labels/bug","name":"bug","color":"fc2929","default":true},{"id":419602065,"node_id":"MDU6TGFiZWw0MTk2MDIwNjU=","url":"https://api.github.com/repos/ipld/js-ipld-dag-cbor/labels/difficulty:moderate","name":"difficulty:moderate","color":"bfe5bf","default":false},{"id":253100641,"node_id":"MDU6TGFiZWwyNTMxMDA2NDE=","url":"https://api.github.com/repos/ipld/js-ipld-dag-cbor/labels/help%20wanted","name":"help wanted","color":"0e8a16","default":true},{"id":491319678,"node_id":"MDU6TGFiZWw0OTEzMTk2Nzg=","url":"https://api.github.com/repos/ipld/js-ipld-dag-cbor/labels/ready","name":"ready","color":"e6e6e6","default":false}],"state":"open","locked":false,"assignee":{"login":"dignifiedquire","id":790842,"node_id":"MDQ6VXNlcjc5MDg0Mg==","avatar_url":"https://avatars0.githubusercontent.com/u/790842?v=4","gravatar_id":"","url":"https://api.github.com/users/dignifiedquire","html_url":"https://github.com/dignifiedquire","followers_url":"https://api.github.com/users/dignifiedquire/followers","following_url":"https://api.github.com/users/dignifiedquire/following{/other_user}","gists_url":"https://api.github.com/users/dignifiedquire/gists{/gist_id}","starred_url":"https://api.github.com/users/dignifiedquire/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dignifiedquire/subscriptions","organizations_url":"https://api.github.com/users/dignifiedquire/orgs","repos_url":"https://api.github.com/users/dignifiedquire/repos","events_url":"https://api.github.com/users/dignifiedquire/events{/privacy}","received_events_url":"https://api.github.com/users/dignifiedquire/received_events","type":"User","site_admin":false},"assignees":[{"login":"dignifiedquire","id":790842,"node_id":"MDQ6VXNlcjc5MDg0Mg==","avatar_url":"https://avatars0.githubusercontent.com/u/790842?v=4","gravatar_id":"","url":"https://api.github.com/users/dignifiedquire","html_url":"https://github.com/dignifiedquire","followers_url":"https://api.github.com/users/dignifiedquire/followers","following_url":"https://api.github.com/users/dignifiedquire/following{/other_user}","gists_url":"https://api.github.com/users/dignifiedquire/gists{/gist_id}","starred_url":"https://api.github.com/users/dignifiedquire/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dignifiedquire/subscriptions","organizations_url":"https://api.github.com/users/dignifiedquire/orgs","repos_url":"https://api.github.com/users/dignifiedquire/repos","events_url":"https://api.github.com/users/dignifiedquire/events{/privacy}","received_events_url":"https://api.github.com/users/dignifiedquire/received_events","type":"User","site_admin":false}],"milestone":null,"comments":4,"created_at":"2017-05-04T13:45:20Z","updated_at":"2018-06-22T23:32:22Z","closed_at":null,"author_association":"NONE","body":"As of now one can't `ipfs.dag.get` a cbor node larger than 64k. This is an issue when building structures such as large hash-maps. The solution IMO would be to reallocate borc heap when cbor bigger than 64k is encountered, so that memory usage is kept as low as possible.\r\n\r\nStack trace I got when attempting to `dag.get` large cbor:\r\n```\r\ndecoder.js:552 Uncaught (in promise) RangeError: Source is too large\r\n    at Uint8Array.set (native)\r\n    at Decoder._decode (http://localhost:63342/root/target/scala-2.12/scalajs-bundler/main/root-fastopt-bundle.js:52712:18)\r\n    at Decoder.decodeFirst (http://localhost:63342/root/target/scala-2.12/scalajs-bundler/main/root-fastopt-bundle.js:52736:11)\r\n    at Object.exports.deserialize (http://localhost:63342/root/target/scala-2.12/scalajs-bundler/main/root-fastopt-bundle.js:51925:29)\r\n    at waterfall (http://localhost:63342/root/target/scala-2.12/scalajs-bundler/main/root-fastopt-bundle.js:20381:19)\r\n    at nextTask (http://localhost:63342/root/target/scala-2.12/scalajs-bundler/main/root-fastopt-bundle.js:24233:15)\r\n    at next (http://localhost:63342/root/target/scala-2.12/scalajs-bundler/main/root-fastopt-bundle.js:24240:10)\r\n    at http://localhost:63342/root/target/scala-2.12/scalajs-bundler/main/root-fastopt-bundle.js:23409:17\r\n    at store.get (http://localhost:63342/root/target/scala-2.12/scalajs-bundler/main/root-fastopt-bundle.js:103105:10)\r\n    at http://localhost:63342/root/target/scala-2.12/scalajs-bundler/main/root-fastopt-bundle.js:28188:8\r\n```"},"comment":{"url":"https://api.github.com/repos/ipld/js-ipld-dag-cbor/issues/comments/399609634","html_url":"https://github.com/ipld/js-ipld-dag-cbor/issues/52#issuecomment-399609634","issue_url":"https://api.github.com/repos/ipld/js-ipld-dag-cbor/issues/52","id":399609634,"node_id":"MDEyOklzc3VlQ29tbWVudDM5OTYwOTYzNA==","user":{"login":"mikeal","id":579,"node_id":"MDQ6VXNlcjU3OQ==","avatar_url":"https://avatars2.githubusercontent.com/u/579?v=4","gravatar_id":"","url":"https://api.github.com/users/mikeal","html_url":"https://github.com/mikeal","followers_url":"https://api.github.com/users/mikeal/followers","following_url":"https://api.github.com/users/mikeal/following{/other_user}","gists_url":"https://api.github.com/users/mikeal/gists{/gist_id}","starred_url":"https://api.github.com/users/mikeal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikeal/subscriptions","organizations_url":"https://api.github.com/users/mikeal/orgs","repos_url":"https://api.github.com/users/mikeal/repos","events_url":"https://api.github.com/users/mikeal/events{/privacy}","received_events_url":"https://api.github.com/users/mikeal/received_events","type":"User","site_admin":false},"created_at":"2018-06-22T23:32:22Z","updated_at":"2018-06-22T23:32:22Z","author_association":"NONE","body":"I'm still running into this in the latest release. I was able to fix it locally by adding a `size` attribute to the cbor decoder options: https://github.com/ipld/js-ipld-dag-cbor/blob/master/src/util.js#L33\r\n\r\nI'm not sure what the permanent fix should be. What's a reasonable size default size? How do we expose a way for people to increase the size?"}}
{"actor":{"display_login":"mikeal"}}