{"action":"created","issue":{"url":"https://api.github.com/repos/ipfs/go-ipfs/issues/5285","repository_url":"https://api.github.com/repos/ipfs/go-ipfs","labels_url":"https://api.github.com/repos/ipfs/go-ipfs/issues/5285/labels{/name}","comments_url":"https://api.github.com/repos/ipfs/go-ipfs/issues/5285/comments","events_url":"https://api.github.com/repos/ipfs/go-ipfs/issues/5285/events","html_url":"https://github.com/ipfs/go-ipfs/pull/5285","id":344653395,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAzOTk5MDg4","number":5285,"title":"RFC: Add ability to retrieve blocks even if given using a different CID version","user":{"login":"kevina","id":1271492,"node_id":"MDQ6VXNlcjEyNzE0OTI=","avatar_url":"https://avatars2.githubusercontent.com/u/1271492?v=4","gravatar_id":"","url":"https://api.github.com/users/kevina","html_url":"https://github.com/kevina","followers_url":"https://api.github.com/users/kevina/followers","following_url":"https://api.github.com/users/kevina/following{/other_user}","gists_url":"https://api.github.com/users/kevina/gists{/gist_id}","starred_url":"https://api.github.com/users/kevina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kevina/subscriptions","organizations_url":"https://api.github.com/users/kevina/orgs","repos_url":"https://api.github.com/users/kevina/repos","events_url":"https://api.github.com/users/kevina/events{/privacy}","received_events_url":"https://api.github.com/users/kevina/received_events","type":"User","site_admin":false},"labels":[{"id":993502733,"node_id":"MDU6TGFiZWw5OTM1MDI3MzM=","url":"https://api.github.com/repos/ipfs/go-ipfs/labels/cidv1b32","name":"cidv1b32","color":"9165d8","default":false},{"id":129070658,"node_id":"MDU6TGFiZWwxMjkwNzA2NTg=","url":"https://api.github.com/repos/ipfs/go-ipfs/labels/in%20progress","name":"in progress","color":"ededed","default":false}],"state":"open","locked":false,"assignee":{"login":"kevina","id":1271492,"node_id":"MDQ6VXNlcjEyNzE0OTI=","avatar_url":"https://avatars2.githubusercontent.com/u/1271492?v=4","gravatar_id":"","url":"https://api.github.com/users/kevina","html_url":"https://github.com/kevina","followers_url":"https://api.github.com/users/kevina/followers","following_url":"https://api.github.com/users/kevina/following{/other_user}","gists_url":"https://api.github.com/users/kevina/gists{/gist_id}","starred_url":"https://api.github.com/users/kevina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kevina/subscriptions","organizations_url":"https://api.github.com/users/kevina/orgs","repos_url":"https://api.github.com/users/kevina/repos","events_url":"https://api.github.com/users/kevina/events{/privacy}","received_events_url":"https://api.github.com/users/kevina/received_events","type":"User","site_admin":false},"assignees":[{"login":"kevina","id":1271492,"node_id":"MDQ6VXNlcjEyNzE0OTI=","avatar_url":"https://avatars2.githubusercontent.com/u/1271492?v=4","gravatar_id":"","url":"https://api.github.com/users/kevina","html_url":"https://github.com/kevina","followers_url":"https://api.github.com/users/kevina/followers","following_url":"https://api.github.com/users/kevina/following{/other_user}","gists_url":"https://api.github.com/users/kevina/gists{/gist_id}","starred_url":"https://api.github.com/users/kevina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kevina/subscriptions","organizations_url":"https://api.github.com/users/kevina/orgs","repos_url":"https://api.github.com/users/kevina/repos","events_url":"https://api.github.com/users/kevina/events{/privacy}","received_events_url":"https://api.github.com/users/kevina/received_events","type":"User","site_admin":false}],"milestone":null,"comments":3,"created_at":"2018-07-26T00:34:34Z","updated_at":"2018-08-07T00:54:59Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/ipfs/go-ipfs/pulls/5285","html_url":"https://github.com/ipfs/go-ipfs/pull/5285","diff_url":"https://github.com/ipfs/go-ipfs/pull/5285.diff","patch_url":"https://github.com/ipfs/go-ipfs/pull/5285.patch"},"body":"~~This is one way to do it.~~\r\n\r\n~~Another way is to create (yet another) wrapper blockstore.  However, this block store needs to be implemented very carefully to avoid breaking things.  In particular only the `Get` method can be changed.~~\r\n\r\n~~Although it would seam logical the `Has` method can not  be modified because otherwise that might prevent blocks from getting added that should as we check if a block exists before adding it in the blockservice.  This could create a problem if for example a CIDv0 block is in the blockstore and a CIDv1 of the block is added and pinned.  If the Has method was modified then the CIDv1 will never get added and if the CIDv0 version is not pinned it would get removed when the garbage collector is ran and both the CIDv0 and CIDv1of the block is will become inaccessible.~~\r\n\r\n~~I added a test case to test for the above case.  Any alternative solutions would need to pass my tests.~~\r\n\r\nThis needs to be implemented carefully to avoid breaking pinning.  I added a test case to test to show the problem.\r\n\r\nSee https://github.com/ipfs/go-ipfs/pull/5285#issuecomment-408649310 for updated method.\r\n\r\nTowards https://github.com/ipfs/ipfs/issues/337."},"comment":{"url":"https://api.github.com/repos/ipfs/go-ipfs/issues/comments/410898076","html_url":"https://github.com/ipfs/go-ipfs/pull/5285#issuecomment-410898076","issue_url":"https://api.github.com/repos/ipfs/go-ipfs/issues/5285","id":410898076,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMDg5ODA3Ng==","user":{"login":"Stebalien","id":310393,"node_id":"MDQ6VXNlcjMxMDM5Mw==","avatar_url":"https://avatars2.githubusercontent.com/u/310393?v=4","gravatar_id":"","url":"https://api.github.com/users/Stebalien","html_url":"https://github.com/Stebalien","followers_url":"https://api.github.com/users/Stebalien/followers","following_url":"https://api.github.com/users/Stebalien/following{/other_user}","gists_url":"https://api.github.com/users/Stebalien/gists{/gist_id}","starred_url":"https://api.github.com/users/Stebalien/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Stebalien/subscriptions","organizations_url":"https://api.github.com/users/Stebalien/orgs","repos_url":"https://api.github.com/users/Stebalien/repos","events_url":"https://api.github.com/users/Stebalien/events{/privacy}","received_events_url":"https://api.github.com/users/Stebalien/received_events","type":"User","site_admin":false},"created_at":"2018-08-07T00:54:59Z","updated_at":"2018-08-07T00:54:59Z","author_association":"CONTRIBUTOR","body":"After discussing this on IRC, I believe that this would be strictly better than the situation we have today so I'm fine with it."}}
{"actor":{"display_login":"Stebalien"}}