{"action":"created","comment":{"url":"https://api.github.com/repos/lorenzb/libsubmarine/pulls/comments/221026259","pull_request_review_id":159576576,"id":221026259,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyMTAyNjI1OQ==","diff_hunk":"@@ -43,135 +36,177 @@ contract LibSubmarine is ProvethVerifier {\n         uint8 _result,\n         address indexed _sender,\n         address indexed _submarine,\n-        uint256 _slashAmount,\n+        uint256 _slashAmount/*,\n         bytes _proofBlob,\n-        bytes _unsignedCommitTx\n+        bytes _unsignedCommitTx*/ // Removed due to stack limit\n     );\n     event Finalized(\n         bytes32 indexed _sessionId,\n         address indexed _sender,\n         uint256 _amountTemp,\n         uint256 _revealDeposit,\n-        bytes _dataTemp\n+        bytes _commitData\n     );\n \n+    /////////////\n+    // Storage //\n+    /////////////\n \n-    constructor(uint256 _revealDepositAmount, uint32 _challengePeriodLength) public {\n-        revealDepositAmount = _revealDepositAmount;\n-        challengePeriodLength = _challengePeriodLength;\n+    uint256 public revealDepositAmount;\n+    uint32 public challengePeriodLength;\n+    uint8 public vee = 27;\n+\n+    mapping(bytes32 => SessionData) public sessionData;\n+\n+    struct SessionData {\n+        bool unlocked;        // set in unlock, used in reveal and finalize\n+        uint32 revealBlock;   // set in reveal, used in unlock, challenge, and finalize\n+        uint256 commitValue;  // set in reveal, used in unlock, challenge, and finalize\n+        bytes32 hashedCommit; // set in reveal, used in challenge, and finalize\n+    }","path":"contract/LibSubmarine.sol","position":79,"original_position":79,"commit_id":"e0e7b0174ff14ea188f1feb392e680b149fa6d86","original_commit_id":"e0e7b0174ff14ea188f1feb392e680b149fa6d86","user":{"login":"relyt29","id":4326714,"node_id":"MDQ6VXNlcjQzMjY3MTQ=","avatar_url":"https://avatars0.githubusercontent.com/u/4326714?v=4","gravatar_id":"","url":"https://api.github.com/users/relyt29","html_url":"https://github.com/relyt29","followers_url":"https://api.github.com/users/relyt29/followers","following_url":"https://api.github.com/users/relyt29/following{/other_user}","gists_url":"https://api.github.com/users/relyt29/gists{/gist_id}","starred_url":"https://api.github.com/users/relyt29/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/relyt29/subscriptions","organizations_url":"https://api.github.com/users/relyt29/orgs","repos_url":"https://api.github.com/users/relyt29/repos","events_url":"https://api.github.com/users/relyt29/events{/privacy}","received_events_url":"https://api.github.com/users/relyt29/received_events","type":"User","site_admin":false},"body":"I fail to see why leaking revealBlock and commitValue causes any issues at the reveal step, is there some security issue that you are thinking of around that?","created_at":"2018-09-27T18:16:40Z","updated_at":"2018-09-27T18:16:40Z","html_url":"https://github.com/lorenzb/libsubmarine/pull/22#discussion_r221026259","pull_request_url":"https://api.github.com/repos/lorenzb/libsubmarine/pulls/22","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/lorenzb/libsubmarine/pulls/comments/221026259"},"html":{"href":"https://github.com/lorenzb/libsubmarine/pull/22#discussion_r221026259"},"pull_request":{"href":"https://api.github.com/repos/lorenzb/libsubmarine/pulls/22"}},"in_reply_to_id":219656155},"pull_request":{"url":"https://api.github.com/repos/lorenzb/libsubmarine/pulls/22","id":217143965,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE3MTQzOTY1","html_url":"https://github.com/lorenzb/libsubmarine/pull/22","diff_url":"https://github.com/lorenzb/libsubmarine/pull/22.diff","patch_url":"https://github.com/lorenzb/libsubmarine/pull/22.patch","issue_url":"https://api.github.com/repos/lorenzb/libsubmarine/issues/22","number":22,"state":"open","locked":false,"title":"Store commit data as hash and supply as parameter in challenge() and finalize()","user":{"login":"thegostep","id":15959632,"node_id":"MDQ6VXNlcjE1OTU5NjMy","avatar_url":"https://avatars3.githubusercontent.com/u/15959632?v=4","gravatar_id":"","url":"https://api.github.com/users/thegostep","html_url":"https://github.com/thegostep","followers_url":"https://api.github.com/users/thegostep/followers","following_url":"https://api.github.com/users/thegostep/following{/other_user}","gists_url":"https://api.github.com/users/thegostep/gists{/gist_id}","starred_url":"https://api.github.com/users/thegostep/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thegostep/subscriptions","organizations_url":"https://api.github.com/users/thegostep/orgs","repos_url":"https://api.github.com/users/thegostep/repos","events_url":"https://api.github.com/users/thegostep/events{/privacy}","received_events_url":"https://api.github.com/users/thegostep/received_events","type":"User","site_admin":false},"body":"Fix for #14 \r\n\r\nHere is the gas consumption during the tests:\r\n```\r\n*** Gas Used ***\r\nCommit:    21000\r\nReveal:    94673\r\nUnlock:    32105\r\nFinalize:  31500\r\nTotal:    179278\r\n```","created_at":"2018-09-21T00:45:37Z","updated_at":"2018-09-27T18:16:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a65d9f5024cfec70d292c7bb7a67b801104d91c8","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/lorenzb/libsubmarine/pulls/22/commits","review_comments_url":"https://api.github.com/repos/lorenzb/libsubmarine/pulls/22/comments","review_comment_url":"https://api.github.com/repos/lorenzb/libsubmarine/pulls/comments{/number}","comments_url":"https://api.github.com/repos/lorenzb/libsubmarine/issues/22/comments","statuses_url":"https://api.github.com/repos/lorenzb/libsubmarine/statuses/e0e7b0174ff14ea188f1feb392e680b149fa6d86","head":{"label":"lorenzb:steph-hashedparameters","ref":"steph-hashedparameters","sha":"e0e7b0174ff14ea188f1feb392e680b149fa6d86","user":{"login":"lorenzb","id":1148586,"node_id":"MDQ6VXNlcjExNDg1ODY=","avatar_url":"https://avatars2.githubusercontent.com/u/1148586?v=4","gravatar_id":"","url":"https://api.github.com/users/lorenzb","html_url":"https://github.com/lorenzb","followers_url":"https://api.github.com/users/lorenzb/followers","following_url":"https://api.github.com/users/lorenzb/following{/other_user}","gists_url":"https://api.github.com/users/lorenzb/gists{/gist_id}","starred_url":"https://api.github.com/users/lorenzb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lorenzb/subscriptions","organizations_url":"https://api.github.com/users/lorenzb/orgs","repos_url":"https://api.github.com/users/lorenzb/repos","events_url":"https://api.github.com/users/lorenzb/events{/privacy}","received_events_url":"https://api.github.com/users/lorenzb/received_events","type":"User","site_admin":false},"repo":{"id":142362448,"node_id":"MDEwOlJlcG9zaXRvcnkxNDIzNjI0NDg=","name":"libsubmarine","full_name":"lorenzb/libsubmarine","private":false,"owner":{"login":"lorenzb","id":1148586,"node_id":"MDQ6VXNlcjExNDg1ODY=","avatar_url":"https://avatars2.githubusercontent.com/u/1148586?v=4","gravatar_id":"","url":"https://api.github.com/users/lorenzb","html_url":"https://github.com/lorenzb","followers_url":"https://api.github.com/users/lorenzb/followers","following_url":"https://api.github.com/users/lorenzb/following{/other_user}","gists_url":"https://api.github.com/users/lorenzb/gists{/gist_id}","starred_url":"https://api.github.com/users/lorenzb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lorenzb/subscriptions","organizations_url":"https://api.github.com/users/lorenzb/orgs","repos_url":"https://api.github.com/users/lorenzb/repos","events_url":"https://api.github.com/users/lorenzb/events{/privacy}","received_events_url":"https://api.github.com/users/lorenzb/received_events","type":"User","site_admin":false},"html_url":"https://github.com/lorenzb/libsubmarine","description":"Implementation of a novel practical scheme for submarine commitments","fork":false,"url":"https://api.github.com/repos/lorenzb/libsubmarine","forks_url":"https://api.github.com/repos/lorenzb/libsubmarine/forks","keys_url":"https://api.github.com/repos/lorenzb/libsubmarine/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lorenzb/libsubmarine/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lorenzb/libsubmarine/teams","hooks_url":"https://api.github.com/repos/lorenzb/libsubmarine/hooks","issue_events_url":"https://api.github.com/repos/lorenzb/libsubmarine/issues/events{/number}","events_url":"https://api.github.com/repos/lorenzb/libsubmarine/events","assignees_url":"https://api.github.com/repos/lorenzb/libsubmarine/assignees{/user}","branches_url":"https://api.github.com/repos/lorenzb/libsubmarine/branches{/branch}","tags_url":"https://api.github.com/repos/lorenzb/libsubmarine/tags","blobs_url":"https://api.github.com/repos/lorenzb/libsubmarine/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lorenzb/libsubmarine/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lorenzb/libsubmarine/git/refs{/sha}","trees_url":"https://api.github.com/repos/lorenzb/libsubmarine/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lorenzb/libsubmarine/statuses/{sha}","languages_url":"https://api.github.com/repos/lorenzb/libsubmarine/languages","stargazers_url":"https://api.github.com/repos/lorenzb/libsubmarine/stargazers","contributors_url":"https://api.github.com/repos/lorenzb/libsubmarine/contributors","subscribers_url":"https://api.github.com/repos/lorenzb/libsubmarine/subscribers","subscription_url":"https://api.github.com/repos/lorenzb/libsubmarine/subscription","commits_url":"https://api.github.com/repos/lorenzb/libsubmarine/commits{/sha}","git_commits_url":"https://api.github.com/repos/lorenzb/libsubmarine/git/commits{/sha}","comments_url":"https://api.github.com/repos/lorenzb/libsubmarine/comments{/number}","issue_comment_url":"https://api.github.com/repos/lorenzb/libsubmarine/issues/comments{/number}","contents_url":"https://api.github.com/repos/lorenzb/libsubmarine/contents/{+path}","compare_url":"https://api.github.com/repos/lorenzb/libsubmarine/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lorenzb/libsubmarine/merges","archive_url":"https://api.github.com/repos/lorenzb/libsubmarine/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lorenzb/libsubmarine/downloads","issues_url":"https://api.github.com/repos/lorenzb/libsubmarine/issues{/number}","pulls_url":"https://api.github.com/repos/lorenzb/libsubmarine/pulls{/number}","milestones_url":"https://api.github.com/repos/lorenzb/libsubmarine/milestones{/number}","notifications_url":"https://api.github.com/repos/lorenzb/libsubmarine/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lorenzb/libsubmarine/labels{/name}","releases_url":"https://api.github.com/repos/lorenzb/libsubmarine/releases{/id}","deployments_url":"https://api.github.com/repos/lorenzb/libsubmarine/deployments","created_at":"2018-07-25T23:06:32Z","updated_at":"2018-09-26T19:41:08Z","pushed_at":"2018-09-22T00:41:16Z","git_url":"git://github.com/lorenzb/libsubmarine.git","ssh_url":"git@github.com:lorenzb/libsubmarine.git","clone_url":"https://github.com/lorenzb/libsubmarine.git","svn_url":"https://github.com/lorenzb/libsubmarine","homepage":"","size":67,"stargazers_count":15,"watchers_count":15,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":14,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":2,"open_issues":14,"watchers":15,"default_branch":"master"}},"base":{"label":"lorenzb:master","ref":"master","sha":"b0192b2cb6d0289dbf16de9aae42309233dc6514","user":{"login":"lorenzb","id":1148586,"node_id":"MDQ6VXNlcjExNDg1ODY=","avatar_url":"https://avatars2.githubusercontent.com/u/1148586?v=4","gravatar_id":"","url":"https://api.github.com/users/lorenzb","html_url":"https://github.com/lorenzb","followers_url":"https://api.github.com/users/lorenzb/followers","following_url":"https://api.github.com/users/lorenzb/following{/other_user}","gists_url":"https://api.github.com/users/lorenzb/gists{/gist_id}","starred_url":"https://api.github.com/users/lorenzb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lorenzb/subscriptions","organizations_url":"https://api.github.com/users/lorenzb/orgs","repos_url":"https://api.github.com/users/lorenzb/repos","events_url":"https://api.github.com/users/lorenzb/events{/privacy}","received_events_url":"https://api.github.com/users/lorenzb/received_events","type":"User","site_admin":false},"repo":{"id":142362448,"node_id":"MDEwOlJlcG9zaXRvcnkxNDIzNjI0NDg=","name":"libsubmarine","full_name":"lorenzb/libsubmarine","private":false,"owner":{"login":"lorenzb","id":1148586,"node_id":"MDQ6VXNlcjExNDg1ODY=","avatar_url":"https://avatars2.githubusercontent.com/u/1148586?v=4","gravatar_id":"","url":"https://api.github.com/users/lorenzb","html_url":"https://github.com/lorenzb","followers_url":"https://api.github.com/users/lorenzb/followers","following_url":"https://api.github.com/users/lorenzb/following{/other_user}","gists_url":"https://api.github.com/users/lorenzb/gists{/gist_id}","starred_url":"https://api.github.com/users/lorenzb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lorenzb/subscriptions","organizations_url":"https://api.github.com/users/lorenzb/orgs","repos_url":"https://api.github.com/users/lorenzb/repos","events_url":"https://api.github.com/users/lorenzb/events{/privacy}","received_events_url":"https://api.github.com/users/lorenzb/received_events","type":"User","site_admin":false},"html_url":"https://github.com/lorenzb/libsubmarine","description":"Implementation of a novel practical scheme for submarine commitments","fork":false,"url":"https://api.github.com/repos/lorenzb/libsubmarine","forks_url":"https://api.github.com/repos/lorenzb/libsubmarine/forks","keys_url":"https://api.github.com/repos/lorenzb/libsubmarine/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lorenzb/libsubmarine/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lorenzb/libsubmarine/teams","hooks_url":"https://api.github.com/repos/lorenzb/libsubmarine/hooks","issue_events_url":"https://api.github.com/repos/lorenzb/libsubmarine/issues/events{/number}","events_url":"https://api.github.com/repos/lorenzb/libsubmarine/events","assignees_url":"https://api.github.com/repos/lorenzb/libsubmarine/assignees{/user}","branches_url":"https://api.github.com/repos/lorenzb/libsubmarine/branches{/branch}","tags_url":"https://api.github.com/repos/lorenzb/libsubmarine/tags","blobs_url":"https://api.github.com/repos/lorenzb/libsubmarine/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lorenzb/libsubmarine/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lorenzb/libsubmarine/git/refs{/sha}","trees_url":"https://api.github.com/repos/lorenzb/libsubmarine/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lorenzb/libsubmarine/statuses/{sha}","languages_url":"https://api.github.com/repos/lorenzb/libsubmarine/languages","stargazers_url":"https://api.github.com/repos/lorenzb/libsubmarine/stargazers","contributors_url":"https://api.github.com/repos/lorenzb/libsubmarine/contributors","subscribers_url":"https://api.github.com/repos/lorenzb/libsubmarine/subscribers","subscription_url":"https://api.github.com/repos/lorenzb/libsubmarine/subscription","commits_url":"https://api.github.com/repos/lorenzb/libsubmarine/commits{/sha}","git_commits_url":"https://api.github.com/repos/lorenzb/libsubmarine/git/commits{/sha}","comments_url":"https://api.github.com/repos/lorenzb/libsubmarine/comments{/number}","issue_comment_url":"https://api.github.com/repos/lorenzb/libsubmarine/issues/comments{/number}","contents_url":"https://api.github.com/repos/lorenzb/libsubmarine/contents/{+path}","compare_url":"https://api.github.com/repos/lorenzb/libsubmarine/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lorenzb/libsubmarine/merges","archive_url":"https://api.github.com/repos/lorenzb/libsubmarine/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lorenzb/libsubmarine/downloads","issues_url":"https://api.github.com/repos/lorenzb/libsubmarine/issues{/number}","pulls_url":"https://api.github.com/repos/lorenzb/libsubmarine/pulls{/number}","milestones_url":"https://api.github.com/repos/lorenzb/libsubmarine/milestones{/number}","notifications_url":"https://api.github.com/repos/lorenzb/libsubmarine/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lorenzb/libsubmarine/labels{/name}","releases_url":"https://api.github.com/repos/lorenzb/libsubmarine/releases{/id}","deployments_url":"https://api.github.com/repos/lorenzb/libsubmarine/deployments","created_at":"2018-07-25T23:06:32Z","updated_at":"2018-09-26T19:41:08Z","pushed_at":"2018-09-22T00:41:16Z","git_url":"git://github.com/lorenzb/libsubmarine.git","ssh_url":"git@github.com:lorenzb/libsubmarine.git","clone_url":"https://github.com/lorenzb/libsubmarine.git","svn_url":"https://github.com/lorenzb/libsubmarine","homepage":"","size":67,"stargazers_count":15,"watchers_count":15,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":14,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":2,"open_issues":14,"watchers":15,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/lorenzb/libsubmarine/pulls/22"},"html":{"href":"https://github.com/lorenzb/libsubmarine/pull/22"},"issue":{"href":"https://api.github.com/repos/lorenzb/libsubmarine/issues/22"},"comments":{"href":"https://api.github.com/repos/lorenzb/libsubmarine/issues/22/comments"},"review_comments":{"href":"https://api.github.com/repos/lorenzb/libsubmarine/pulls/22/comments"},"review_comment":{"href":"https://api.github.com/repos/lorenzb/libsubmarine/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/lorenzb/libsubmarine/pulls/22/commits"},"statuses":{"href":"https://api.github.com/repos/lorenzb/libsubmarine/statuses/e0e7b0174ff14ea188f1feb392e680b149fa6d86"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"relyt29"}}