{"action":"created","comment":{"url":"https://api.github.com/repos/unisonweb/unison/pulls/comments/71537668","id":71537668,"diff_hunk":"@@ -37,17 +41,35 @@ makeRandomHash genVar = do\n   _ <- MVar.swapMVar genVar newGen\n   pure hash\n \n+makeRandomBS :: RandomGen r => MVar.MVar r -> IO ByteString\n+makeRandomBS genVar = Hash.toBytes <$> makeRandomHash genVar\n+\n+makeRandomSeries :: RandomGen r => MVar.MVar r -> IO Series\n+makeRandomSeries genVar = Series <$> makeRandomBS genVar\n+\n+makeRandomAddress :: RandomGen r => MVar.MVar r -> IO Address.Address\n+makeRandomAddress genVar = Address.Address <$> makeRandomBS genVar\n+\n+makeRandomIdentifier :: RandomGen r => MVar.MVar r -> IO (Series, Series)\n+makeRandomIdentifier genVar = do\n+  cp <- makeRandomSeries genVar\n+  ud <- makeRandomSeries genVar\n+  pure (cp, ud)\n+\n+\n makeAPI :: IO (WHNFEval -> [Builtin])","path":"node/src/Unison/Runtime/ExtraBuiltins.hs","position":42,"original_position":42,"commit_id":"1907308142c0f6308148ac016cec636a216470e4","original_commit_id":"1907308142c0f6308148ac016cec636a216470e4","user":{"login":"pchiusano","id":11074,"avatar_url":"https://avatars.githubusercontent.com/u/11074?v=3","gravatar_id":"","url":"https://api.github.com/users/pchiusano","html_url":"https://github.com/pchiusano","followers_url":"https://api.github.com/users/pchiusano/followers","following_url":"https://api.github.com/users/pchiusano/following{/other_user}","gists_url":"https://api.github.com/users/pchiusano/gists{/gist_id}","starred_url":"https://api.github.com/users/pchiusano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pchiusano/subscriptions","organizations_url":"https://api.github.com/users/pchiusano/orgs","repos_url":"https://api.github.com/users/pchiusano/repos","events_url":"https://api.github.com/users/pchiusano/events{/privacy}","received_events_url":"https://api.github.com/users/pchiusano/received_events","type":"User","site_admin":false},"body":"A couple things -\r\n\r\nModify this function to take a `Cryptography` and a `BlockStore` and update callers of this function accordingly. The Unison libraries should always have these dependencies injected, they should never assume any particular implementations. You should be polymorphic in the `BlockStore address` type as well - do not assume the concrete `Address` type you added; instead add typeclass constraints or pass in functions if you need the ability to manipulate the `address` values of a `BlockStore address`.\r\n\r\nOnce you've threaded this through, switch to using the `Cryptography` for generating secure randomness (the `randomBytes` function), and also use it for encryption of all blocks. Hook up encryption now - we can call it with the noop `Cryptography` for testing.","created_at":"2016-07-20T14:40:09Z","updated_at":"2016-07-20T14:40:09Z","html_url":"https://github.com/unisonweb/unison/pull/75#discussion_r71537668","pull_request_url":"https://api.github.com/repos/unisonweb/unison/pulls/75","_links":{"self":{"href":"https://api.github.com/repos/unisonweb/unison/pulls/comments/71537668"},"html":{"href":"https://github.com/unisonweb/unison/pull/75#discussion_r71537668"},"pull_request":{"href":"https://api.github.com/repos/unisonweb/unison/pulls/75"}}},"pull_request":{"url":"https://api.github.com/repos/unisonweb/unison/pulls/75","id":77911777,"html_url":"https://github.com/unisonweb/unison/pull/75","diff_url":"https://github.com/unisonweb/unison/pull/75.diff","patch_url":"https://github.com/unisonweb/unison/pull/75.patch","issue_url":"https://api.github.com/repos/unisonweb/unison/issues/75","number":75,"state":"open","locked":false,"title":"Topic/block store","user":{"login":"sfultong","id":415542,"avatar_url":"https://avatars.githubusercontent.com/u/415542?v=3","gravatar_id":"","url":"https://api.github.com/users/sfultong","html_url":"https://github.com/sfultong","followers_url":"https://api.github.com/users/sfultong/followers","following_url":"https://api.github.com/users/sfultong/following{/other_user}","gists_url":"https://api.github.com/users/sfultong/gists{/gist_id}","starred_url":"https://api.github.com/users/sfultong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sfultong/subscriptions","organizations_url":"https://api.github.com/users/sfultong/orgs","repos_url":"https://api.github.com/users/sfultong/repos","events_url":"https://api.github.com/users/sfultong/events{/privacy}","received_events_url":"https://api.github.com/users/sfultong/received_events","type":"User","site_admin":false},"body":"There's still an issue with KeyValueStore, but I've cheated the test for the moment so I can PR the FileBlockStore changes I've been holding back.\r\n\r\nFileBlockStore's tests finally clean up after themselves, with the help of unsafePerformIO","created_at":"2016-07-19T03:11:59Z","updated_at":"2016-07-20T14:40:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"77d50d6d9b6205bf789b481e4b9fc2e3f0cbb5d4","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/unisonweb/unison/pulls/75/commits","review_comments_url":"https://api.github.com/repos/unisonweb/unison/pulls/75/comments","review_comment_url":"https://api.github.com/repos/unisonweb/unison/pulls/comments{/number}","comments_url":"https://api.github.com/repos/unisonweb/unison/issues/75/comments","statuses_url":"https://api.github.com/repos/unisonweb/unison/statuses/1907308142c0f6308148ac016cec636a216470e4","head":{"label":"sfultong:topic/block-store","ref":"topic/block-store","sha":"1907308142c0f6308148ac016cec636a216470e4","user":{"login":"sfultong","id":415542,"avatar_url":"https://avatars.githubusercontent.com/u/415542?v=3","gravatar_id":"","url":"https://api.github.com/users/sfultong","html_url":"https://github.com/sfultong","followers_url":"https://api.github.com/users/sfultong/followers","following_url":"https://api.github.com/users/sfultong/following{/other_user}","gists_url":"https://api.github.com/users/sfultong/gists{/gist_id}","starred_url":"https://api.github.com/users/sfultong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sfultong/subscriptions","organizations_url":"https://api.github.com/users/sfultong/orgs","repos_url":"https://api.github.com/users/sfultong/repos","events_url":"https://api.github.com/users/sfultong/events{/privacy}","received_events_url":"https://api.github.com/users/sfultong/received_events","type":"User","site_admin":false},"repo":{"id":54739685,"name":"unison","full_name":"sfultong/unison","owner":{"login":"sfultong","id":415542,"avatar_url":"https://avatars.githubusercontent.com/u/415542?v=3","gravatar_id":"","url":"https://api.github.com/users/sfultong","html_url":"https://github.com/sfultong","followers_url":"https://api.github.com/users/sfultong/followers","following_url":"https://api.github.com/users/sfultong/following{/other_user}","gists_url":"https://api.github.com/users/sfultong/gists{/gist_id}","starred_url":"https://api.github.com/users/sfultong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sfultong/subscriptions","organizations_url":"https://api.github.com/users/sfultong/orgs","repos_url":"https://api.github.com/users/sfultong/repos","events_url":"https://api.github.com/users/sfultong/events{/privacy}","received_events_url":"https://api.github.com/users/sfultong/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sfultong/unison","description":"Next generation programming platform, currently in development","fork":true,"url":"https://api.github.com/repos/sfultong/unison","forks_url":"https://api.github.com/repos/sfultong/unison/forks","keys_url":"https://api.github.com/repos/sfultong/unison/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sfultong/unison/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sfultong/unison/teams","hooks_url":"https://api.github.com/repos/sfultong/unison/hooks","issue_events_url":"https://api.github.com/repos/sfultong/unison/issues/events{/number}","events_url":"https://api.github.com/repos/sfultong/unison/events","assignees_url":"https://api.github.com/repos/sfultong/unison/assignees{/user}","branches_url":"https://api.github.com/repos/sfultong/unison/branches{/branch}","tags_url":"https://api.github.com/repos/sfultong/unison/tags","blobs_url":"https://api.github.com/repos/sfultong/unison/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sfultong/unison/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sfultong/unison/git/refs{/sha}","trees_url":"https://api.github.com/repos/sfultong/unison/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sfultong/unison/statuses/{sha}","languages_url":"https://api.github.com/repos/sfultong/unison/languages","stargazers_url":"https://api.github.com/repos/sfultong/unison/stargazers","contributors_url":"https://api.github.com/repos/sfultong/unison/contributors","subscribers_url":"https://api.github.com/repos/sfultong/unison/subscribers","subscription_url":"https://api.github.com/repos/sfultong/unison/subscription","commits_url":"https://api.github.com/repos/sfultong/unison/commits{/sha}","git_commits_url":"https://api.github.com/repos/sfultong/unison/git/commits{/sha}","comments_url":"https://api.github.com/repos/sfultong/unison/comments{/number}","issue_comment_url":"https://api.github.com/repos/sfultong/unison/issues/comments{/number}","contents_url":"https://api.github.com/repos/sfultong/unison/contents/{+path}","compare_url":"https://api.github.com/repos/sfultong/unison/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sfultong/unison/merges","archive_url":"https://api.github.com/repos/sfultong/unison/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sfultong/unison/downloads","issues_url":"https://api.github.com/repos/sfultong/unison/issues{/number}","pulls_url":"https://api.github.com/repos/sfultong/unison/pulls{/number}","milestones_url":"https://api.github.com/repos/sfultong/unison/milestones{/number}","notifications_url":"https://api.github.com/repos/sfultong/unison/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sfultong/unison/labels{/name}","releases_url":"https://api.github.com/repos/sfultong/unison/releases{/id}","deployments_url":"https://api.github.com/repos/sfultong/unison/deployments","created_at":"2016-03-25T18:46:05Z","updated_at":"2016-03-25T18:46:05Z","pushed_at":"2016-07-20T01:38:51Z","git_url":"git://github.com/sfultong/unison.git","ssh_url":"git@github.com:sfultong/unison.git","clone_url":"https://github.com/sfultong/unison.git","svn_url":"https://github.com/sfultong/unison","homepage":"http://unisonweb.org","size":4218,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"unisonweb:topic/node-container","ref":"topic/node-container","sha":"b977840d567ad56f60244b0f90773f69d2ca2ed7","user":{"login":"unisonweb","id":7087133,"avatar_url":"https://avatars.githubusercontent.com/u/7087133?v=3","gravatar_id":"","url":"https://api.github.com/users/unisonweb","html_url":"https://github.com/unisonweb","followers_url":"https://api.github.com/users/unisonweb/followers","following_url":"https://api.github.com/users/unisonweb/following{/other_user}","gists_url":"https://api.github.com/users/unisonweb/gists{/gist_id}","starred_url":"https://api.github.com/users/unisonweb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/unisonweb/subscriptions","organizations_url":"https://api.github.com/users/unisonweb/orgs","repos_url":"https://api.github.com/users/unisonweb/repos","events_url":"https://api.github.com/users/unisonweb/events{/privacy}","received_events_url":"https://api.github.com/users/unisonweb/received_events","type":"Organization","site_admin":false},"repo":{"id":35164952,"name":"unison","full_name":"unisonweb/unison","owner":{"login":"unisonweb","id":7087133,"avatar_url":"https://avatars.githubusercontent.com/u/7087133?v=3","gravatar_id":"","url":"https://api.github.com/users/unisonweb","html_url":"https://github.com/unisonweb","followers_url":"https://api.github.com/users/unisonweb/followers","following_url":"https://api.github.com/users/unisonweb/following{/other_user}","gists_url":"https://api.github.com/users/unisonweb/gists{/gist_id}","starred_url":"https://api.github.com/users/unisonweb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/unisonweb/subscriptions","organizations_url":"https://api.github.com/users/unisonweb/orgs","repos_url":"https://api.github.com/users/unisonweb/repos","events_url":"https://api.github.com/users/unisonweb/events{/privacy}","received_events_url":"https://api.github.com/users/unisonweb/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/unisonweb/unison","description":"Next generation programming platform, currently in development","fork":false,"url":"https://api.github.com/repos/unisonweb/unison","forks_url":"https://api.github.com/repos/unisonweb/unison/forks","keys_url":"https://api.github.com/repos/unisonweb/unison/keys{/key_id}","collaborators_url":"https://api.github.com/repos/unisonweb/unison/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/unisonweb/unison/teams","hooks_url":"https://api.github.com/repos/unisonweb/unison/hooks","issue_events_url":"https://api.github.com/repos/unisonweb/unison/issues/events{/number}","events_url":"https://api.github.com/repos/unisonweb/unison/events","assignees_url":"https://api.github.com/repos/unisonweb/unison/assignees{/user}","branches_url":"https://api.github.com/repos/unisonweb/unison/branches{/branch}","tags_url":"https://api.github.com/repos/unisonweb/unison/tags","blobs_url":"https://api.github.com/repos/unisonweb/unison/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/unisonweb/unison/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/unisonweb/unison/git/refs{/sha}","trees_url":"https://api.github.com/repos/unisonweb/unison/git/trees{/sha}","statuses_url":"https://api.github.com/repos/unisonweb/unison/statuses/{sha}","languages_url":"https://api.github.com/repos/unisonweb/unison/languages","stargazers_url":"https://api.github.com/repos/unisonweb/unison/stargazers","contributors_url":"https://api.github.com/repos/unisonweb/unison/contributors","subscribers_url":"https://api.github.com/repos/unisonweb/unison/subscribers","subscription_url":"https://api.github.com/repos/unisonweb/unison/subscription","commits_url":"https://api.github.com/repos/unisonweb/unison/commits{/sha}","git_commits_url":"https://api.github.com/repos/unisonweb/unison/git/commits{/sha}","comments_url":"https://api.github.com/repos/unisonweb/unison/comments{/number}","issue_comment_url":"https://api.github.com/repos/unisonweb/unison/issues/comments{/number}","contents_url":"https://api.github.com/repos/unisonweb/unison/contents/{+path}","compare_url":"https://api.github.com/repos/unisonweb/unison/compare/{base}...{head}","merges_url":"https://api.github.com/repos/unisonweb/unison/merges","archive_url":"https://api.github.com/repos/unisonweb/unison/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/unisonweb/unison/downloads","issues_url":"https://api.github.com/repos/unisonweb/unison/issues{/number}","pulls_url":"https://api.github.com/repos/unisonweb/unison/pulls{/number}","milestones_url":"https://api.github.com/repos/unisonweb/unison/milestones{/number}","notifications_url":"https://api.github.com/repos/unisonweb/unison/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/unisonweb/unison/labels{/name}","releases_url":"https://api.github.com/repos/unisonweb/unison/releases{/id}","deployments_url":"https://api.github.com/repos/unisonweb/unison/deployments","created_at":"2015-05-06T14:53:49Z","updated_at":"2016-07-20T08:11:20Z","pushed_at":"2016-07-20T01:38:52Z","git_url":"git://github.com/unisonweb/unison.git","ssh_url":"git@github.com:unisonweb/unison.git","clone_url":"https://github.com/unisonweb/unison.git","svn_url":"https://github.com/unisonweb/unison","homepage":"http://unisonweb.org","size":4212,"stargazers_count":846,"watchers_count":846,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":28,"mirror_url":null,"open_issues_count":13,"forks":28,"open_issues":13,"watchers":846,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/unisonweb/unison/pulls/75"},"html":{"href":"https://github.com/unisonweb/unison/pull/75"},"issue":{"href":"https://api.github.com/repos/unisonweb/unison/issues/75"},"comments":{"href":"https://api.github.com/repos/unisonweb/unison/issues/75/comments"},"review_comments":{"href":"https://api.github.com/repos/unisonweb/unison/pulls/75/comments"},"review_comment":{"href":"https://api.github.com/repos/unisonweb/unison/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/unisonweb/unison/pulls/75/commits"},"statuses":{"href":"https://api.github.com/repos/unisonweb/unison/statuses/1907308142c0f6308148ac016cec636a216470e4"}}}}
{"actor":{"display_login":"pchiusano"}}