{"action":"created","comment":{"url":"https://api.github.com/repos/DisciplinaOU/disciplina/pulls/comments/243359222","pull_request_review_id":187109329,"id":243359222,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0MzM1OTIyMg==","diff_hunk":"@@ -0,0 +1,65 @@\n+module Client where\n+\n+import Data.Traversable (for)\n+\n+import Dscp.Core\n+import Dscp.Crypto\n+import Dscp.Educator.Web.Student\n+import Dscp.Educator.Web.Types\n+import Dscp.Witness.Web.Client\n+import Dscp.Util\n+import Dscp.Util.Aeson\n+\n+import Test.QuickCheck\n+\n+data InvalidProofs = InvalidProofs deriving (Show, Exception)\n+\n+-- | Get all proofs since given time.\n+getProofs :: StudentApiClient -> IO [MerkleProof PrivateTx]\n+getProofs sc = do\n+    rawProofs <- sGetProofs sc Nothing False\n+    let zipProof BlkProofInfo {..} = mergeProofAndData\n+            (unEncodeSerialised bpiMtreeSerialized)\n+            bpiTxs\n+    nothingToThrow InvalidProofs $\n+        mapM zipProof rawProofs\n+\n+getAssignments :: StudentApiClient -> IO [AssignmentStudentInfo]\n+getAssignments sc = do\n+    hashes <- map aiHash <$> sGetAssignments sc Nothing Nothing Nothing False\n+    for hashes $ sGetAssignment sc\n+\n+makeRandomSubmissionForAssignment :: SecretKey -> Hash Assignment -> IO NewSubmission\n+makeRandomSubmissionForAssignment student aHash = do\n+    ch <- generate arbitrary\n+\n+    let sub = Submission\n+            { _sStudentId = mkAddr (toPublic student)\n+            , _sContentsHash = ch\n+            , _sAssignmentHash = aHash\n+            }\n+\n+    return NewSubmission\n+        { nsAssignmentHash = aHash\n+        , nsContentsHash   = hash \"mkay\"","path":"tools/src/faircv/Client.hs","position":44,"original_position":44,"commit_id":"2c22cfac89844b2e70c5dca9fd3bed619e2d736e","original_commit_id":"2c22cfac89844b2e70c5dca9fd3bed619e2d736e","user":{"login":"Heimdell","id":1784505,"node_id":"MDQ6VXNlcjE3ODQ1MDU=","avatar_url":"https://avatars3.githubusercontent.com/u/1784505?v=4","gravatar_id":"","url":"https://api.github.com/users/Heimdell","html_url":"https://github.com/Heimdell","followers_url":"https://api.github.com/users/Heimdell/followers","following_url":"https://api.github.com/users/Heimdell/following{/other_user}","gists_url":"https://api.github.com/users/Heimdell/gists{/gist_id}","starred_url":"https://api.github.com/users/Heimdell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Heimdell/subscriptions","organizations_url":"https://api.github.com/users/Heimdell/orgs","repos_url":"https://api.github.com/users/Heimdell/repos","events_url":"https://api.github.com/users/Heimdell/events{/privacy}","received_events_url":"https://api.github.com/users/Heimdell/received_events","type":"User","site_admin":false},"body":":thinking: ","created_at":"2018-12-20T17:41:30Z","updated_at":"2018-12-20T17:41:31Z","html_url":"https://github.com/DisciplinaOU/disciplina/pull/349#discussion_r243359222","pull_request_url":"https://api.github.com/repos/DisciplinaOU/disciplina/pulls/349","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/DisciplinaOU/disciplina/pulls/comments/243359222"},"html":{"href":"https://github.com/DisciplinaOU/disciplina/pull/349#discussion_r243359222"},"pull_request":{"href":"https://api.github.com/repos/DisciplinaOU/disciplina/pulls/349"}},"in_reply_to_id":243339634},"pull_request":{"url":"https://api.github.com/repos/DisciplinaOU/disciplina/pulls/349","id":240214492,"node_id":"MDExOlB1bGxSZXF1ZXN0MjQwMjE0NDky","html_url":"https://github.com/DisciplinaOU/disciplina/pull/349","diff_url":"https://github.com/DisciplinaOU/disciplina/pull/349.diff","patch_url":"https://github.com/DisciplinaOU/disciplina/pull/349.patch","issue_url":"https://api.github.com/repos/DisciplinaOU/disciplina/issues/349","number":349,"state":"open","locked":false,"title":"DSCP-420 Client, generating a randomised publication + fairCV which is checked into `True`","user":{"login":"Heimdell","id":1784505,"node_id":"MDQ6VXNlcjE3ODQ1MDU=","avatar_url":"https://avatars3.githubusercontent.com/u/1784505?v=4","gravatar_id":"","url":"https://api.github.com/users/Heimdell","html_url":"https://github.com/Heimdell","followers_url":"https://api.github.com/users/Heimdell/followers","following_url":"https://api.github.com/users/Heimdell/following{/other_user}","gists_url":"https://api.github.com/users/Heimdell/gists{/gist_id}","starred_url":"https://api.github.com/users/Heimdell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Heimdell/subscriptions","organizations_url":"https://api.github.com/users/Heimdell/orgs","repos_url":"https://api.github.com/users/Heimdell/repos","events_url":"https://api.github.com/users/Heimdell/events{/privacy}","received_events_url":"https://api.github.com/users/Heimdell/received_events","type":"User","site_admin":false},"body":"### Description\r\n\r\n`dscp-faircv` that pushes randomised publication and generates a valid FairCV.\r\n\r\nAlso, witness endpoint to accept witnessed publication txs was added.\r\n\r\n### YT issue\r\n\r\nhttps://issues.serokell.io/issue/DSCP-420\r\n\r\n### Checklist\r\n\r\nHint: a perfect PR has all the checkmarks set.\r\n\r\nPossible related changes (conditional):\r\n- [ ] I added tests if required, in case they are:\r\n  - Covering new introduced functionality (feature).\r\n  - Regression tests preventing the bug from silently reappearing again (bugfix).\r\n- [ ] I have checked the [sample config](../tree/master/docs/config-full-sample.yaml) and [launch scripts](../tree/master/scripts/launch) and updated them if it was necessary (especially if executables or CLIs were changed).\r\n- [ ] I have checked READMEs and changed them accordingly if it's necessary (the main [README.md](../tree/master/README.md) as well as subproject READMEs for all related executables).\r\n- [ ] **Nope** If a public API structure or/and data serialization was changed, I made sure that these changes are reflected in the:\r\n  - [Swagger](../tree/master/specs/disciplina) API specs.\r\n  - Any [related documentation](../tree/master/docs/api-types.md).\r\n- [ ] If any public documentation was written, I have spellchecked it.\r\n\r\nStylistic (obligatory):\r\n- [ ] **Nope** My commit history is clean, descriptive and do not contain merge or revert commits or commits like \"WIP\".\r\n- [ ] **Probably nope** My code complies with the [style guide](../tree/master/docs/code-style.md).\r\n- [ ] **Nope** My code is documented (haddock) and these docs are decent (full enough and spellchecked).\r\n","created_at":"2018-12-20T15:45:05Z","updated_at":"2018-12-20T17:41:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2f7500631984f7cd0cc04fe62728755eef9d6bfa","assignee":null,"assignees":[],"requested_reviewers":[{"login":"flyingleafe","id":1803963,"node_id":"MDQ6VXNlcjE4MDM5NjM=","avatar_url":"https://avatars2.githubusercontent.com/u/1803963?v=4","gravatar_id":"","url":"https://api.github.com/users/flyingleafe","html_url":"https://github.com/flyingleafe","followers_url":"https://api.github.com/users/flyingleafe/followers","following_url":"https://api.github.com/users/flyingleafe/following{/other_user}","gists_url":"https://api.github.com/users/flyingleafe/gists{/gist_id}","starred_url":"https://api.github.com/users/flyingleafe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flyingleafe/subscriptions","organizations_url":"https://api.github.com/users/flyingleafe/orgs","repos_url":"https://api.github.com/users/flyingleafe/repos","events_url":"https://api.github.com/users/flyingleafe/events{/privacy}","received_events_url":"https://api.github.com/users/flyingleafe/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/DisciplinaOU/disciplina/pulls/349/commits","review_comments_url":"https://api.github.com/repos/DisciplinaOU/disciplina/pulls/349/comments","review_comment_url":"https://api.github.com/repos/DisciplinaOU/disciplina/pulls/comments{/number}","comments_url":"https://api.github.com/repos/DisciplinaOU/disciplina/issues/349/comments","statuses_url":"https://api.github.com/repos/DisciplinaOU/disciplina/statuses/2c22cfac89844b2e70c5dca9fd3bed619e2d736e","head":{"label":"DisciplinaOU:flyingleafe/dscp409","ref":"flyingleafe/dscp409","sha":"2c22cfac89844b2e70c5dca9fd3bed619e2d736e","user":{"login":"DisciplinaOU","id":38657648,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM4NjU3NjQ4","avatar_url":"https://avatars1.githubusercontent.com/u/38657648?v=4","gravatar_id":"","url":"https://api.github.com/users/DisciplinaOU","html_url":"https://github.com/DisciplinaOU","followers_url":"https://api.github.com/users/DisciplinaOU/followers","following_url":"https://api.github.com/users/DisciplinaOU/following{/other_user}","gists_url":"https://api.github.com/users/DisciplinaOU/gists{/gist_id}","starred_url":"https://api.github.com/users/DisciplinaOU/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DisciplinaOU/subscriptions","organizations_url":"https://api.github.com/users/DisciplinaOU/orgs","repos_url":"https://api.github.com/users/DisciplinaOU/repos","events_url":"https://api.github.com/users/DisciplinaOU/events{/privacy}","received_events_url":"https://api.github.com/users/DisciplinaOU/received_events","type":"Organization","site_admin":false},"repo":{"id":113064771,"node_id":"MDEwOlJlcG9zaXRvcnkxMTMwNjQ3NzE=","name":"disciplina","full_name":"DisciplinaOU/disciplina","private":false,"owner":{"login":"DisciplinaOU","id":38657648,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM4NjU3NjQ4","avatar_url":"https://avatars1.githubusercontent.com/u/38657648?v=4","gravatar_id":"","url":"https://api.github.com/users/DisciplinaOU","html_url":"https://github.com/DisciplinaOU","followers_url":"https://api.github.com/users/DisciplinaOU/followers","following_url":"https://api.github.com/users/DisciplinaOU/following{/other_user}","gists_url":"https://api.github.com/users/DisciplinaOU/gists{/gist_id}","starred_url":"https://api.github.com/users/DisciplinaOU/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DisciplinaOU/subscriptions","organizations_url":"https://api.github.com/users/DisciplinaOU/orgs","repos_url":"https://api.github.com/users/DisciplinaOU/repos","events_url":"https://api.github.com/users/DisciplinaOU/events{/privacy}","received_events_url":"https://api.github.com/users/DisciplinaOU/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/DisciplinaOU/disciplina","description":"The first blockchain for recruiting & education","fork":false,"url":"https://api.github.com/repos/DisciplinaOU/disciplina","forks_url":"https://api.github.com/repos/DisciplinaOU/disciplina/forks","keys_url":"https://api.github.com/repos/DisciplinaOU/disciplina/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DisciplinaOU/disciplina/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DisciplinaOU/disciplina/teams","hooks_url":"https://api.github.com/repos/DisciplinaOU/disciplina/hooks","issue_events_url":"https://api.github.com/repos/DisciplinaOU/disciplina/issues/events{/number}","events_url":"https://api.github.com/repos/DisciplinaOU/disciplina/events","assignees_url":"https://api.github.com/repos/DisciplinaOU/disciplina/assignees{/user}","branches_url":"https://api.github.com/repos/DisciplinaOU/disciplina/branches{/branch}","tags_url":"https://api.github.com/repos/DisciplinaOU/disciplina/tags","blobs_url":"https://api.github.com/repos/DisciplinaOU/disciplina/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DisciplinaOU/disciplina/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DisciplinaOU/disciplina/git/refs{/sha}","trees_url":"https://api.github.com/repos/DisciplinaOU/disciplina/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DisciplinaOU/disciplina/statuses/{sha}","languages_url":"https://api.github.com/repos/DisciplinaOU/disciplina/languages","stargazers_url":"https://api.github.com/repos/DisciplinaOU/disciplina/stargazers","contributors_url":"https://api.github.com/repos/DisciplinaOU/disciplina/contributors","subscribers_url":"https://api.github.com/repos/DisciplinaOU/disciplina/subscribers","subscription_url":"https://api.github.com/repos/DisciplinaOU/disciplina/subscription","commits_url":"https://api.github.com/repos/DisciplinaOU/disciplina/commits{/sha}","git_commits_url":"https://api.github.com/repos/DisciplinaOU/disciplina/git/commits{/sha}","comments_url":"https://api.github.com/repos/DisciplinaOU/disciplina/comments{/number}","issue_comment_url":"https://api.github.com/repos/DisciplinaOU/disciplina/issues/comments{/number}","contents_url":"https://api.github.com/repos/DisciplinaOU/disciplina/contents/{+path}","compare_url":"https://api.github.com/repos/DisciplinaOU/disciplina/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DisciplinaOU/disciplina/merges","archive_url":"https://api.github.com/repos/DisciplinaOU/disciplina/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DisciplinaOU/disciplina/downloads","issues_url":"https://api.github.com/repos/DisciplinaOU/disciplina/issues{/number}","pulls_url":"https://api.github.com/repos/DisciplinaOU/disciplina/pulls{/number}","milestones_url":"https://api.github.com/repos/DisciplinaOU/disciplina/milestones{/number}","notifications_url":"https://api.github.com/repos/DisciplinaOU/disciplina/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DisciplinaOU/disciplina/labels{/name}","releases_url":"https://api.github.com/repos/DisciplinaOU/disciplina/releases{/id}","deployments_url":"https://api.github.com/repos/DisciplinaOU/disciplina/deployments","created_at":"2017-12-04T16:10:46Z","updated_at":"2018-12-18T21:47:36Z","pushed_at":"2018-12-20T16:05:46Z","git_url":"git://github.com/DisciplinaOU/disciplina.git","ssh_url":"git@github.com:DisciplinaOU/disciplina.git","clone_url":"https://github.com/DisciplinaOU/disciplina.git","svn_url":"https://github.com/DisciplinaOU/disciplina","homepage":"https://disciplina.io","size":11171,"stargazers_count":23,"watchers_count":23,"language":"Haskell","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":10,"license":null,"forks":4,"open_issues":10,"watchers":23,"default_branch":"master"}},"base":{"label":"DisciplinaOU:master","ref":"master","sha":"e2eefd92fdac4fd049a07b8f22984f8559934b76","user":{"login":"DisciplinaOU","id":38657648,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM4NjU3NjQ4","avatar_url":"https://avatars1.githubusercontent.com/u/38657648?v=4","gravatar_id":"","url":"https://api.github.com/users/DisciplinaOU","html_url":"https://github.com/DisciplinaOU","followers_url":"https://api.github.com/users/DisciplinaOU/followers","following_url":"https://api.github.com/users/DisciplinaOU/following{/other_user}","gists_url":"https://api.github.com/users/DisciplinaOU/gists{/gist_id}","starred_url":"https://api.github.com/users/DisciplinaOU/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DisciplinaOU/subscriptions","organizations_url":"https://api.github.com/users/DisciplinaOU/orgs","repos_url":"https://api.github.com/users/DisciplinaOU/repos","events_url":"https://api.github.com/users/DisciplinaOU/events{/privacy}","received_events_url":"https://api.github.com/users/DisciplinaOU/received_events","type":"Organization","site_admin":false},"repo":{"id":113064771,"node_id":"MDEwOlJlcG9zaXRvcnkxMTMwNjQ3NzE=","name":"disciplina","full_name":"DisciplinaOU/disciplina","private":false,"owner":{"login":"DisciplinaOU","id":38657648,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM4NjU3NjQ4","avatar_url":"https://avatars1.githubusercontent.com/u/38657648?v=4","gravatar_id":"","url":"https://api.github.com/users/DisciplinaOU","html_url":"https://github.com/DisciplinaOU","followers_url":"https://api.github.com/users/DisciplinaOU/followers","following_url":"https://api.github.com/users/DisciplinaOU/following{/other_user}","gists_url":"https://api.github.com/users/DisciplinaOU/gists{/gist_id}","starred_url":"https://api.github.com/users/DisciplinaOU/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DisciplinaOU/subscriptions","organizations_url":"https://api.github.com/users/DisciplinaOU/orgs","repos_url":"https://api.github.com/users/DisciplinaOU/repos","events_url":"https://api.github.com/users/DisciplinaOU/events{/privacy}","received_events_url":"https://api.github.com/users/DisciplinaOU/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/DisciplinaOU/disciplina","description":"The first blockchain for recruiting & education","fork":false,"url":"https://api.github.com/repos/DisciplinaOU/disciplina","forks_url":"https://api.github.com/repos/DisciplinaOU/disciplina/forks","keys_url":"https://api.github.com/repos/DisciplinaOU/disciplina/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DisciplinaOU/disciplina/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DisciplinaOU/disciplina/teams","hooks_url":"https://api.github.com/repos/DisciplinaOU/disciplina/hooks","issue_events_url":"https://api.github.com/repos/DisciplinaOU/disciplina/issues/events{/number}","events_url":"https://api.github.com/repos/DisciplinaOU/disciplina/events","assignees_url":"https://api.github.com/repos/DisciplinaOU/disciplina/assignees{/user}","branches_url":"https://api.github.com/repos/DisciplinaOU/disciplina/branches{/branch}","tags_url":"https://api.github.com/repos/DisciplinaOU/disciplina/tags","blobs_url":"https://api.github.com/repos/DisciplinaOU/disciplina/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DisciplinaOU/disciplina/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DisciplinaOU/disciplina/git/refs{/sha}","trees_url":"https://api.github.com/repos/DisciplinaOU/disciplina/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DisciplinaOU/disciplina/statuses/{sha}","languages_url":"https://api.github.com/repos/DisciplinaOU/disciplina/languages","stargazers_url":"https://api.github.com/repos/DisciplinaOU/disciplina/stargazers","contributors_url":"https://api.github.com/repos/DisciplinaOU/disciplina/contributors","subscribers_url":"https://api.github.com/repos/DisciplinaOU/disciplina/subscribers","subscription_url":"https://api.github.com/repos/DisciplinaOU/disciplina/subscription","commits_url":"https://api.github.com/repos/DisciplinaOU/disciplina/commits{/sha}","git_commits_url":"https://api.github.com/repos/DisciplinaOU/disciplina/git/commits{/sha}","comments_url":"https://api.github.com/repos/DisciplinaOU/disciplina/comments{/number}","issue_comment_url":"https://api.github.com/repos/DisciplinaOU/disciplina/issues/comments{/number}","contents_url":"https://api.github.com/repos/DisciplinaOU/disciplina/contents/{+path}","compare_url":"https://api.github.com/repos/DisciplinaOU/disciplina/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DisciplinaOU/disciplina/merges","archive_url":"https://api.github.com/repos/DisciplinaOU/disciplina/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DisciplinaOU/disciplina/downloads","issues_url":"https://api.github.com/repos/DisciplinaOU/disciplina/issues{/number}","pulls_url":"https://api.github.com/repos/DisciplinaOU/disciplina/pulls{/number}","milestones_url":"https://api.github.com/repos/DisciplinaOU/disciplina/milestones{/number}","notifications_url":"https://api.github.com/repos/DisciplinaOU/disciplina/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DisciplinaOU/disciplina/labels{/name}","releases_url":"https://api.github.com/repos/DisciplinaOU/disciplina/releases{/id}","deployments_url":"https://api.github.com/repos/DisciplinaOU/disciplina/deployments","created_at":"2017-12-04T16:10:46Z","updated_at":"2018-12-18T21:47:36Z","pushed_at":"2018-12-20T16:05:46Z","git_url":"git://github.com/DisciplinaOU/disciplina.git","ssh_url":"git@github.com:DisciplinaOU/disciplina.git","clone_url":"https://github.com/DisciplinaOU/disciplina.git","svn_url":"https://github.com/DisciplinaOU/disciplina","homepage":"https://disciplina.io","size":11171,"stargazers_count":23,"watchers_count":23,"language":"Haskell","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":10,"license":null,"forks":4,"open_issues":10,"watchers":23,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/DisciplinaOU/disciplina/pulls/349"},"html":{"href":"https://github.com/DisciplinaOU/disciplina/pull/349"},"issue":{"href":"https://api.github.com/repos/DisciplinaOU/disciplina/issues/349"},"comments":{"href":"https://api.github.com/repos/DisciplinaOU/disciplina/issues/349/comments"},"review_comments":{"href":"https://api.github.com/repos/DisciplinaOU/disciplina/pulls/349/comments"},"review_comment":{"href":"https://api.github.com/repos/DisciplinaOU/disciplina/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/DisciplinaOU/disciplina/pulls/349/commits"},"statuses":{"href":"https://api.github.com/repos/DisciplinaOU/disciplina/statuses/2c22cfac89844b2e70c5dca9fd3bed619e2d736e"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"Heimdell"}}