{"action":"created","comment":{"url":"https://api.github.com/repos/input-output-hk/cardano-sl/pulls/comments/213974446","pull_request_review_id":150900515,"id":213974446,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxMzk3NDQ0Ng==","diff_hunk":"@@ -268,23 +324,73 @@ instance IsCheckpoint PartialCheckpoint where\n     cpBlockMeta   = pcheckpointBlockMeta\n     cpForeign     = pcheckpointForeign\n     cpContext     = pcheckpointContext\n+    delta         = deltaPartialC\n+    step          = stepPartialC\n \n cpAddressMeta :: IsCheckpoint c => Core.Address -> Lens' c AddressMeta\n cpAddressMeta addr = cpBlockMeta . _Wrapped . addressMeta addr\n \n+{-------------------------------------------------------------------------------\n+  Convenience: definitions for compression\n+-------------------------------------------------------------------------------}\n+\n+deltaC :: Checkpoint -> Checkpoint -> DeltaCheckpoint","path":"wallet-new/src/Cardano/Wallet/Kernel/DB/Spec.hs","position":171,"original_position":171,"commit_id":"319537f54d3bd0dd0eb5941c8e8f5955ffe06610","original_commit_id":"319537f54d3bd0dd0eb5941c8e8f5955ffe06610","user":{"login":"adinapoli-iohk","id":29383371,"node_id":"MDQ6VXNlcjI5MzgzMzcx","avatar_url":"https://avatars3.githubusercontent.com/u/29383371?v=4","gravatar_id":"","url":"https://api.github.com/users/adinapoli-iohk","html_url":"https://github.com/adinapoli-iohk","followers_url":"https://api.github.com/users/adinapoli-iohk/followers","following_url":"https://api.github.com/users/adinapoli-iohk/following{/other_user}","gists_url":"https://api.github.com/users/adinapoli-iohk/gists{/gist_id}","starred_url":"https://api.github.com/users/adinapoli-iohk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adinapoli-iohk/subscriptions","organizations_url":"https://api.github.com/users/adinapoli-iohk/orgs","repos_url":"https://api.github.com/users/adinapoli-iohk/repos","events_url":"https://api.github.com/users/adinapoli-iohk/events{/privacy}","received_events_url":"https://api.github.com/users/adinapoli-iohk/received_events","type":"User","site_admin":false},"body":"`deltaCheckpoint` is longer but I think it clarifies a lot 😁 \r\n\r\nAlternatively, what about just dropping the suffix and use `delta` alone. Yes, it means you will have to import this qualified somewhere as the name will conflict with something else, but I find more readable something like:\r\n\r\n```\r\nc1 `Checkpoint.delta` c2\r\n```\r\n\r\nThan\r\n\r\n```\r\nc1 `deltaC` c2\r\n```\r\n\r\nBut mind, this is my personal preference. Folks like @edsko or other chaps in the company might think the exact opposite 😂 \r\n\r\n🚴 ","created_at":"2018-08-30T10:06:41Z","updated_at":"2018-08-30T10:14:30Z","html_url":"https://github.com/input-output-hk/cardano-sl/pull/3489#discussion_r213974446","pull_request_url":"https://api.github.com/repos/input-output-hk/cardano-sl/pulls/3489","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/input-output-hk/cardano-sl/pulls/comments/213974446"},"html":{"href":"https://github.com/input-output-hk/cardano-sl/pull/3489#discussion_r213974446"},"pull_request":{"href":"https://api.github.com/repos/input-output-hk/cardano-sl/pulls/3489"}}},"pull_request":{"url":"https://api.github.com/repos/input-output-hk/cardano-sl/pulls/3489","id":211057448,"node_id":"MDExOlB1bGxSZXF1ZXN0MjExMDU3NDQ4","html_url":"https://github.com/input-output-hk/cardano-sl/pull/3489","diff_url":"https://github.com/input-output-hk/cardano-sl/pull/3489.diff","patch_url":"https://github.com/input-output-hk/cardano-sl/pull/3489.patch","issue_url":"https://api.github.com/repos/input-output-hk/cardano-sl/issues/3489","number":3489,"state":"open","locked":false,"title":"[CBR-352] Delta compression for Checkpoints","user":{"login":"kderme","id":11467473,"node_id":"MDQ6VXNlcjExNDY3NDcz","avatar_url":"https://avatars1.githubusercontent.com/u/11467473?v=4","gravatar_id":"","url":"https://api.github.com/users/kderme","html_url":"https://github.com/kderme","followers_url":"https://api.github.com/users/kderme/followers","following_url":"https://api.github.com/users/kderme/following{/other_user}","gists_url":"https://api.github.com/users/kderme/gists{/gist_id}","starred_url":"https://api.github.com/users/kderme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kderme/subscriptions","organizations_url":"https://api.github.com/users/kderme/orgs","repos_url":"https://api.github.com/users/kderme/repos","events_url":"https://api.github.com/users/kderme/events{/privacy}","received_events_url":"https://api.github.com/users/kderme/received_events","type":"User","site_admin":false},"body":"## Description\r\nThis Pr aims to use the sharing between consecutive checkpoint to significantly reduce memory usage. It computes diffs and stores those instead of full Checkpoints.\r\nSo far there are only roundtrips tests of the underlying Maps.\r\nTODO: \r\n   - [x] do the actual wiring with the rest of the code.\r\n   - [x] roundtrip of Checkpoints (not sure of I should define Arbitrary for the whole Checkpoint or use the interpreter to create more realistic Checkpoints)\r\n   - [ ] in the backlog for the future: Make it less boilerplate (e.g. with some class Differentiable + some functional deps).\r\n\r\n## Linked issue\r\nCBR-352  https://iohk.myjetbrains.com/youtrack/issue/CBR-352\r\n\r\n## Type of change\r\n- [ ] 🐞 Bug fix (non-breaking change which fixes an issue)\r\n- [ ] 🛠 New feature (non-breaking change which adds functionality)\r\n- [ ] ⚠️ Breaking change (fix or feature that would cause existing functionality to change)\r\n- [ ] 🏭 Refactoring that does not change existing functionality but does improve things like code readability, structure etc\r\n- [ ] 🔨 New or improved tests for existing code\r\n- [ ] ⛑ git-flow chore (backport, hotfix, etc)\r\n\r\n## Developer checklist\r\n- [ ] I have read the [style guide](https://github.com/input-output-hk/cardano-sl/blob/develop/docs/style-guide.md) document, and my code follows the code style of this project.\r\n- [ ] If my code deals with exceptions, it follows the [guidelines](https://github.com/input-output-hk/cardano-sl/blob/develop/docs/exceptions.md).\r\n- [ ] I have updated any documentation accordingly, if needed. Documentation changes can be reflected in opening a PR on [cardanodocs.com](https://github.com/input-output-hk/cardanodocs.com), amending the inline [Haddock](https://www.haskell.org/haddock/) comments, any relevant README file or one of the document listed in the [docs](https://github.com/input-output-hk/cardano-sl/tree/develop/docs) directory.\r\n- [ ] CHANGELOG entry has been added and is linked to the correct PR on GitHub.\r\n\r\n## Testing checklist\r\n<!-- If you aren't providing any tests as part of this PR, use this section to state clearly why. It needs to be a strong motivation and definitely the exception, not the rule. -->\r\n- [ ] I have added tests to cover my changes.\r\n- [ ] All new and existing tests passed.\r\n\r\n## QA Steps\r\n\r\n## Screenshots (if available)\r\n","created_at":"2018-08-27T09:40:51Z","updated_at":"2018-08-30T10:14:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"06582efa0199e94bc8742c3adc904c8cbc326c38","assignee":null,"assignees":[],"requested_reviewers":[{"login":"edsko","id":935288,"node_id":"MDQ6VXNlcjkzNTI4OA==","avatar_url":"https://avatars1.githubusercontent.com/u/935288?v=4","gravatar_id":"","url":"https://api.github.com/users/edsko","html_url":"https://github.com/edsko","followers_url":"https://api.github.com/users/edsko/followers","following_url":"https://api.github.com/users/edsko/following{/other_user}","gists_url":"https://api.github.com/users/edsko/gists{/gist_id}","starred_url":"https://api.github.com/users/edsko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edsko/subscriptions","organizations_url":"https://api.github.com/users/edsko/orgs","repos_url":"https://api.github.com/users/edsko/repos","events_url":"https://api.github.com/users/edsko/events{/privacy}","received_events_url":"https://api.github.com/users/edsko/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/input-output-hk/cardano-sl/pulls/3489/commits","review_comments_url":"https://api.github.com/repos/input-output-hk/cardano-sl/pulls/3489/comments","review_comment_url":"https://api.github.com/repos/input-output-hk/cardano-sl/pulls/comments{/number}","comments_url":"https://api.github.com/repos/input-output-hk/cardano-sl/issues/3489/comments","statuses_url":"https://api.github.com/repos/input-output-hk/cardano-sl/statuses/319537f54d3bd0dd0eb5941c8e8f5955ffe06610","head":{"label":"input-output-hk:kderme/CBR-352","ref":"kderme/CBR-352","sha":"319537f54d3bd0dd0eb5941c8e8f5955ffe06610","user":{"login":"input-output-hk","id":12909177,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyOTA5MTc3","avatar_url":"https://avatars3.githubusercontent.com/u/12909177?v=4","gravatar_id":"","url":"https://api.github.com/users/input-output-hk","html_url":"https://github.com/input-output-hk","followers_url":"https://api.github.com/users/input-output-hk/followers","following_url":"https://api.github.com/users/input-output-hk/following{/other_user}","gists_url":"https://api.github.com/users/input-output-hk/gists{/gist_id}","starred_url":"https://api.github.com/users/input-output-hk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/input-output-hk/subscriptions","organizations_url":"https://api.github.com/users/input-output-hk/orgs","repos_url":"https://api.github.com/users/input-output-hk/repos","events_url":"https://api.github.com/users/input-output-hk/events{/privacy}","received_events_url":"https://api.github.com/users/input-output-hk/received_events","type":"Organization","site_admin":false},"repo":{"id":70913997,"node_id":"MDEwOlJlcG9zaXRvcnk3MDkxMzk5Nw==","name":"cardano-sl","full_name":"input-output-hk/cardano-sl","owner":{"login":"input-output-hk","id":12909177,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyOTA5MTc3","avatar_url":"https://avatars3.githubusercontent.com/u/12909177?v=4","gravatar_id":"","url":"https://api.github.com/users/input-output-hk","html_url":"https://github.com/input-output-hk","followers_url":"https://api.github.com/users/input-output-hk/followers","following_url":"https://api.github.com/users/input-output-hk/following{/other_user}","gists_url":"https://api.github.com/users/input-output-hk/gists{/gist_id}","starred_url":"https://api.github.com/users/input-output-hk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/input-output-hk/subscriptions","organizations_url":"https://api.github.com/users/input-output-hk/orgs","repos_url":"https://api.github.com/users/input-output-hk/repos","events_url":"https://api.github.com/users/input-output-hk/events{/privacy}","received_events_url":"https://api.github.com/users/input-output-hk/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/input-output-hk/cardano-sl","description":"Cryptographic currency implementing Ouroboros PoS protocol","fork":false,"url":"https://api.github.com/repos/input-output-hk/cardano-sl","forks_url":"https://api.github.com/repos/input-output-hk/cardano-sl/forks","keys_url":"https://api.github.com/repos/input-output-hk/cardano-sl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/input-output-hk/cardano-sl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/input-output-hk/cardano-sl/teams","hooks_url":"https://api.github.com/repos/input-output-hk/cardano-sl/hooks","issue_events_url":"https://api.github.com/repos/input-output-hk/cardano-sl/issues/events{/number}","events_url":"https://api.github.com/repos/input-output-hk/cardano-sl/events","assignees_url":"https://api.github.com/repos/input-output-hk/cardano-sl/assignees{/user}","branches_url":"https://api.github.com/repos/input-output-hk/cardano-sl/branches{/branch}","tags_url":"https://api.github.com/repos/input-output-hk/cardano-sl/tags","blobs_url":"https://api.github.com/repos/input-output-hk/cardano-sl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/input-output-hk/cardano-sl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/input-output-hk/cardano-sl/git/refs{/sha}","trees_url":"https://api.github.com/repos/input-output-hk/cardano-sl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/input-output-hk/cardano-sl/statuses/{sha}","languages_url":"https://api.github.com/repos/input-output-hk/cardano-sl/languages","stargazers_url":"https://api.github.com/repos/input-output-hk/cardano-sl/stargazers","contributors_url":"https://api.github.com/repos/input-output-hk/cardano-sl/contributors","subscribers_url":"https://api.github.com/repos/input-output-hk/cardano-sl/subscribers","subscription_url":"https://api.github.com/repos/input-output-hk/cardano-sl/subscription","commits_url":"https://api.github.com/repos/input-output-hk/cardano-sl/commits{/sha}","git_commits_url":"https://api.github.com/repos/input-output-hk/cardano-sl/git/commits{/sha}","comments_url":"https://api.github.com/repos/input-output-hk/cardano-sl/comments{/number}","issue_comment_url":"https://api.github.com/repos/input-output-hk/cardano-sl/issues/comments{/number}","contents_url":"https://api.github.com/repos/input-output-hk/cardano-sl/contents/{+path}","compare_url":"https://api.github.com/repos/input-output-hk/cardano-sl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/input-output-hk/cardano-sl/merges","archive_url":"https://api.github.com/repos/input-output-hk/cardano-sl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/input-output-hk/cardano-sl/downloads","issues_url":"https://api.github.com/repos/input-output-hk/cardano-sl/issues{/number}","pulls_url":"https://api.github.com/repos/input-output-hk/cardano-sl/pulls{/number}","milestones_url":"https://api.github.com/repos/input-output-hk/cardano-sl/milestones{/number}","notifications_url":"https://api.github.com/repos/input-output-hk/cardano-sl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/input-output-hk/cardano-sl/labels{/name}","releases_url":"https://api.github.com/repos/input-output-hk/cardano-sl/releases{/id}","deployments_url":"https://api.github.com/repos/input-output-hk/cardano-sl/deployments","created_at":"2016-10-14T13:44:38Z","updated_at":"2018-08-30T08:01:03Z","pushed_at":"2018-08-30T09:49:21Z","git_url":"git://github.com/input-output-hk/cardano-sl.git","ssh_url":"git@github.com:input-output-hk/cardano-sl.git","clone_url":"https://github.com/input-output-hk/cardano-sl.git","svn_url":"https://github.com/input-output-hk/cardano-sl","homepage":"","size":115716,"stargazers_count":2927,"watchers_count":2927,"language":"Haskell","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":491,"mirror_url":null,"archived":false,"open_issues_count":183,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":491,"open_issues":183,"watchers":2927,"default_branch":"develop"}},"base":{"label":"input-output-hk:develop","ref":"develop","sha":"5659d4f2d37cba5f20adb59130aa0178686bbac1","user":{"login":"input-output-hk","id":12909177,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyOTA5MTc3","avatar_url":"https://avatars3.githubusercontent.com/u/12909177?v=4","gravatar_id":"","url":"https://api.github.com/users/input-output-hk","html_url":"https://github.com/input-output-hk","followers_url":"https://api.github.com/users/input-output-hk/followers","following_url":"https://api.github.com/users/input-output-hk/following{/other_user}","gists_url":"https://api.github.com/users/input-output-hk/gists{/gist_id}","starred_url":"https://api.github.com/users/input-output-hk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/input-output-hk/subscriptions","organizations_url":"https://api.github.com/users/input-output-hk/orgs","repos_url":"https://api.github.com/users/input-output-hk/repos","events_url":"https://api.github.com/users/input-output-hk/events{/privacy}","received_events_url":"https://api.github.com/users/input-output-hk/received_events","type":"Organization","site_admin":false},"repo":{"id":70913997,"node_id":"MDEwOlJlcG9zaXRvcnk3MDkxMzk5Nw==","name":"cardano-sl","full_name":"input-output-hk/cardano-sl","owner":{"login":"input-output-hk","id":12909177,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyOTA5MTc3","avatar_url":"https://avatars3.githubusercontent.com/u/12909177?v=4","gravatar_id":"","url":"https://api.github.com/users/input-output-hk","html_url":"https://github.com/input-output-hk","followers_url":"https://api.github.com/users/input-output-hk/followers","following_url":"https://api.github.com/users/input-output-hk/following{/other_user}","gists_url":"https://api.github.com/users/input-output-hk/gists{/gist_id}","starred_url":"https://api.github.com/users/input-output-hk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/input-output-hk/subscriptions","organizations_url":"https://api.github.com/users/input-output-hk/orgs","repos_url":"https://api.github.com/users/input-output-hk/repos","events_url":"https://api.github.com/users/input-output-hk/events{/privacy}","received_events_url":"https://api.github.com/users/input-output-hk/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/input-output-hk/cardano-sl","description":"Cryptographic currency implementing Ouroboros PoS protocol","fork":false,"url":"https://api.github.com/repos/input-output-hk/cardano-sl","forks_url":"https://api.github.com/repos/input-output-hk/cardano-sl/forks","keys_url":"https://api.github.com/repos/input-output-hk/cardano-sl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/input-output-hk/cardano-sl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/input-output-hk/cardano-sl/teams","hooks_url":"https://api.github.com/repos/input-output-hk/cardano-sl/hooks","issue_events_url":"https://api.github.com/repos/input-output-hk/cardano-sl/issues/events{/number}","events_url":"https://api.github.com/repos/input-output-hk/cardano-sl/events","assignees_url":"https://api.github.com/repos/input-output-hk/cardano-sl/assignees{/user}","branches_url":"https://api.github.com/repos/input-output-hk/cardano-sl/branches{/branch}","tags_url":"https://api.github.com/repos/input-output-hk/cardano-sl/tags","blobs_url":"https://api.github.com/repos/input-output-hk/cardano-sl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/input-output-hk/cardano-sl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/input-output-hk/cardano-sl/git/refs{/sha}","trees_url":"https://api.github.com/repos/input-output-hk/cardano-sl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/input-output-hk/cardano-sl/statuses/{sha}","languages_url":"https://api.github.com/repos/input-output-hk/cardano-sl/languages","stargazers_url":"https://api.github.com/repos/input-output-hk/cardano-sl/stargazers","contributors_url":"https://api.github.com/repos/input-output-hk/cardano-sl/contributors","subscribers_url":"https://api.github.com/repos/input-output-hk/cardano-sl/subscribers","subscription_url":"https://api.github.com/repos/input-output-hk/cardano-sl/subscription","commits_url":"https://api.github.com/repos/input-output-hk/cardano-sl/commits{/sha}","git_commits_url":"https://api.github.com/repos/input-output-hk/cardano-sl/git/commits{/sha}","comments_url":"https://api.github.com/repos/input-output-hk/cardano-sl/comments{/number}","issue_comment_url":"https://api.github.com/repos/input-output-hk/cardano-sl/issues/comments{/number}","contents_url":"https://api.github.com/repos/input-output-hk/cardano-sl/contents/{+path}","compare_url":"https://api.github.com/repos/input-output-hk/cardano-sl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/input-output-hk/cardano-sl/merges","archive_url":"https://api.github.com/repos/input-output-hk/cardano-sl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/input-output-hk/cardano-sl/downloads","issues_url":"https://api.github.com/repos/input-output-hk/cardano-sl/issues{/number}","pulls_url":"https://api.github.com/repos/input-output-hk/cardano-sl/pulls{/number}","milestones_url":"https://api.github.com/repos/input-output-hk/cardano-sl/milestones{/number}","notifications_url":"https://api.github.com/repos/input-output-hk/cardano-sl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/input-output-hk/cardano-sl/labels{/name}","releases_url":"https://api.github.com/repos/input-output-hk/cardano-sl/releases{/id}","deployments_url":"https://api.github.com/repos/input-output-hk/cardano-sl/deployments","created_at":"2016-10-14T13:44:38Z","updated_at":"2018-08-30T08:01:03Z","pushed_at":"2018-08-30T09:49:21Z","git_url":"git://github.com/input-output-hk/cardano-sl.git","ssh_url":"git@github.com:input-output-hk/cardano-sl.git","clone_url":"https://github.com/input-output-hk/cardano-sl.git","svn_url":"https://github.com/input-output-hk/cardano-sl","homepage":"","size":115716,"stargazers_count":2927,"watchers_count":2927,"language":"Haskell","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":491,"mirror_url":null,"archived":false,"open_issues_count":183,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":491,"open_issues":183,"watchers":2927,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/input-output-hk/cardano-sl/pulls/3489"},"html":{"href":"https://github.com/input-output-hk/cardano-sl/pull/3489"},"issue":{"href":"https://api.github.com/repos/input-output-hk/cardano-sl/issues/3489"},"comments":{"href":"https://api.github.com/repos/input-output-hk/cardano-sl/issues/3489/comments"},"review_comments":{"href":"https://api.github.com/repos/input-output-hk/cardano-sl/pulls/3489/comments"},"review_comment":{"href":"https://api.github.com/repos/input-output-hk/cardano-sl/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/input-output-hk/cardano-sl/pulls/3489/commits"},"statuses":{"href":"https://api.github.com/repos/input-output-hk/cardano-sl/statuses/319537f54d3bd0dd0eb5941c8e8f5955ffe06610"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"adinapoli-iohk"}}