{"action":"created","comment":{"url":"https://api.github.com/repos/OpenSTFoundation/openst-protocol/pulls/comments/197376561","pull_request_review_id":131109135,"id":197376561,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NzM3NjU2MQ==","diff_hunk":"@@ -22,60 +22,112 @@ pragma solidity ^0.4.23;\n // ----------------------------------------------------------------------------\n \n import \"./CoreInterface.sol\";\n+import \"./MerklePatriciaProof.sol\";\n+import \"./util.sol\";\n+import \"./WorkersInterface.sol\";\n+import \"./RLP.sol\";\n \n \n-/// @dev Core is a minimal stub that will become the anchoring and consensus point for\n-///      the utility chain to validate itself against\n-contract Core is CoreInterface {\n+/**\n+*\t@dev Core is a minimal stub that will become the anchoring and consensus point for\n+*      the utility chain to validate itself against\n+*/\n+contract Core is CoreInterface, Util {\n \n-\t/*\n-\t *  Structures\n-\t */\n-\t// struct stakeTokenTuple {\n-\t// \taddress stake;\n-\t// \taddress token;\n-\t// }\n+\t/**\n+\t*    Events\n+\t*/\n+\n+\t/** event StateRootCommitted on successful execution of commitStateRoot */\n+\tevent StateRootCommitted(uint256 blockHeight, bytes32 stateRoot);\n \n+\t/** event OpenSTProven on successful execution of proveOpenST */\n+\tevent OpenSTProven(uint256 blockHeight, bytes32 storageRoot, bytes32 hashedAccount);\n \n-\t/*\n+\t/**\n \t *  Storage\n \t */\n-\t/// registrar registers for the two chains\n-\taddress private coreRegistrar;\n-\t/// chainIdOrigin stores the chainId this chain\n-\tuint256 private coreChainIdOrigin;\n-\t/// chainIdRemote stores the chainId of the remote chain\n+\n+\t/** Mapping of block height to state root of the block.  */\n+\tmapping (uint256 /* block height */ => bytes32) private stateRoots;\n+\n+\t/** Mapping of block height to storafe root of the block.  */","path":"contracts/Core.sol","position":49,"original_position":49,"commit_id":"97dd83677760fef8d9befbfe3bf9e59420fb0bae","original_commit_id":"97dd83677760fef8d9befbfe3bf9e59420fb0bae","user":{"login":"noslav","id":26611201,"node_id":"MDQ6VXNlcjI2NjExMjAx","avatar_url":"https://avatars3.githubusercontent.com/u/26611201?v=4","gravatar_id":"","url":"https://api.github.com/users/noslav","html_url":"https://github.com/noslav","followers_url":"https://api.github.com/users/noslav/followers","following_url":"https://api.github.com/users/noslav/following{/other_user}","gists_url":"https://api.github.com/users/noslav/gists{/gist_id}","starred_url":"https://api.github.com/users/noslav/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/noslav/subscriptions","organizations_url":"https://api.github.com/users/noslav/orgs","repos_url":"https://api.github.com/users/noslav/repos","events_url":"https://api.github.com/users/noslav/events{/privacy}","received_events_url":"https://api.github.com/users/noslav/received_events","type":"User","site_admin":false},"body":"Hi @abhayks1, looking into this PR out of interest, \r\nI noticed that the comment `storage root of the block` has a typo. ","created_at":"2018-06-22T08:33:20Z","updated_at":"2018-06-22T08:33:20Z","html_url":"https://github.com/OpenSTFoundation/openst-protocol/pull/149#discussion_r197376561","pull_request_url":"https://api.github.com/repos/OpenSTFoundation/openst-protocol/pulls/149","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/OpenSTFoundation/openst-protocol/pulls/comments/197376561"},"html":{"href":"https://github.com/OpenSTFoundation/openst-protocol/pull/149#discussion_r197376561"},"pull_request":{"href":"https://api.github.com/repos/OpenSTFoundation/openst-protocol/pulls/149"}}},"pull_request":{"url":"https://api.github.com/repos/OpenSTFoundation/openst-protocol/pulls/149","id":192437213,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkyNDM3MjEz","html_url":"https://github.com/OpenSTFoundation/openst-protocol/pull/149","diff_url":"https://github.com/OpenSTFoundation/openst-protocol/pull/149.diff","patch_url":"https://github.com/OpenSTFoundation/openst-protocol/pull/149.patch","issue_url":"https://api.github.com/repos/OpenSTFoundation/openst-protocol/issues/149","number":149,"state":"open","locked":false,"title":"[MOSA-62] Core Contract Changes","user":{"login":"abhayks1","id":17079457,"node_id":"MDQ6VXNlcjE3MDc5NDU3","avatar_url":"https://avatars2.githubusercontent.com/u/17079457?v=4","gravatar_id":"","url":"https://api.github.com/users/abhayks1","html_url":"https://github.com/abhayks1","followers_url":"https://api.github.com/users/abhayks1/followers","following_url":"https://api.github.com/users/abhayks1/following{/other_user}","gists_url":"https://api.github.com/users/abhayks1/gists{/gist_id}","starred_url":"https://api.github.com/users/abhayks1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abhayks1/subscriptions","organizations_url":"https://api.github.com/users/abhayks1/orgs","repos_url":"https://api.github.com/users/abhayks1/repos","events_url":"https://api.github.com/users/abhayks1/events{/privacy}","received_events_url":"https://api.github.com/users/abhayks1/received_events","type":"User","site_admin":false},"body":"Below tickets are part of PR:\r\n\r\nIntroduce workers in Core contract.\r\n\r\nAdd commitStateRoot function in Core contract.\r\n\r\nAdd whitelisted worker check for commitStateRoot function.\r\n\r\nAdd proveOpenST function.\r\n\r\nAdd a function storageRoots function that returns root for a block height.\r\n\r\nAdd public function latestStateRootBlockHeight() which will return latest block number processed.\r\n\r\nAdd public function latestStorageRootBlockHeight() which will return latest block number processed.","created_at":"2018-06-04T15:01:21Z","updated_at":"2018-06-22T08:33:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"aa623ebff17a1ff6f601a02ea04f385dbc916ed0","assignee":null,"assignees":[],"requested_reviewers":[{"login":"pgev","id":31165699,"node_id":"MDQ6VXNlcjMxMTY1Njk5","avatar_url":"https://avatars3.githubusercontent.com/u/31165699?v=4","gravatar_id":"","url":"https://api.github.com/users/pgev","html_url":"https://github.com/pgev","followers_url":"https://api.github.com/users/pgev/followers","following_url":"https://api.github.com/users/pgev/following{/other_user}","gists_url":"https://api.github.com/users/pgev/gists{/gist_id}","starred_url":"https://api.github.com/users/pgev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pgev/subscriptions","organizations_url":"https://api.github.com/users/pgev/orgs","repos_url":"https://api.github.com/users/pgev/repos","events_url":"https://api.github.com/users/pgev/events{/privacy}","received_events_url":"https://api.github.com/users/pgev/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/OpenSTFoundation/openst-protocol/pulls/149/commits","review_comments_url":"https://api.github.com/repos/OpenSTFoundation/openst-protocol/pulls/149/comments","review_comment_url":"https://api.github.com/repos/OpenSTFoundation/openst-protocol/pulls/comments{/number}","comments_url":"https://api.github.com/repos/OpenSTFoundation/openst-protocol/issues/149/comments","statuses_url":"https://api.github.com/repos/OpenSTFoundation/openst-protocol/statuses/97dd83677760fef8d9befbfe3bf9e59420fb0bae","head":{"label":"OpenSTFoundation:abhay/MOSA-62","ref":"abhay/MOSA-62","sha":"97dd83677760fef8d9befbfe3bf9e59420fb0bae","user":{"login":"OpenSTFoundation","id":31754790,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMxNzU0Nzkw","avatar_url":"https://avatars2.githubusercontent.com/u/31754790?v=4","gravatar_id":"","url":"https://api.github.com/users/OpenSTFoundation","html_url":"https://github.com/OpenSTFoundation","followers_url":"https://api.github.com/users/OpenSTFoundation/followers","following_url":"https://api.github.com/users/OpenSTFoundation/following{/other_user}","gists_url":"https://api.github.com/users/OpenSTFoundation/gists{/gist_id}","starred_url":"https://api.github.com/users/OpenSTFoundation/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OpenSTFoundation/subscriptions","organizations_url":"https://api.github.com/users/OpenSTFoundation/orgs","repos_url":"https://api.github.com/users/OpenSTFoundation/repos","events_url":"https://api.github.com/users/OpenSTFoundation/events{/privacy}","received_events_url":"https://api.github.com/users/OpenSTFoundation/received_events","type":"Organization","site_admin":false},"repo":{"id":108171643,"node_id":"MDEwOlJlcG9zaXRvcnkxMDgxNzE2NDM=","name":"openst-protocol","full_name":"OpenSTFoundation/openst-protocol","owner":{"login":"OpenSTFoundation","id":31754790,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMxNzU0Nzkw","avatar_url":"https://avatars2.githubusercontent.com/u/31754790?v=4","gravatar_id":"","url":"https://api.github.com/users/OpenSTFoundation","html_url":"https://github.com/OpenSTFoundation","followers_url":"https://api.github.com/users/OpenSTFoundation/followers","following_url":"https://api.github.com/users/OpenSTFoundation/following{/other_user}","gists_url":"https://api.github.com/users/OpenSTFoundation/gists{/gist_id}","starred_url":"https://api.github.com/users/OpenSTFoundation/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OpenSTFoundation/subscriptions","organizations_url":"https://api.github.com/users/OpenSTFoundation/orgs","repos_url":"https://api.github.com/users/OpenSTFoundation/repos","events_url":"https://api.github.com/users/OpenSTFoundation/events{/privacy}","received_events_url":"https://api.github.com/users/OpenSTFoundation/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/OpenSTFoundation/openst-protocol","description":"OpenST Protocol allows to stake Simple Token on Ethereum to mint branded utility tokens","fork":false,"url":"https://api.github.com/repos/OpenSTFoundation/openst-protocol","forks_url":"https://api.github.com/repos/OpenSTFoundation/openst-protocol/forks","keys_url":"https://api.github.com/repos/OpenSTFoundation/openst-protocol/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OpenSTFoundation/openst-protocol/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OpenSTFoundation/openst-protocol/teams","hooks_url":"https://api.github.com/repos/OpenSTFoundation/openst-protocol/hooks","issue_events_url":"https://api.github.com/repos/OpenSTFoundation/openst-protocol/issues/events{/number}","events_url":"https://api.github.com/repos/OpenSTFoundation/openst-protocol/events","assignees_url":"https://api.github.com/repos/OpenSTFoundation/openst-protocol/assignees{/user}","branches_url":"https://api.github.com/repos/OpenSTFoundation/openst-protocol/branches{/branch}","tags_url":"https://api.github.com/repos/OpenSTFoundation/openst-protocol/tags","blobs_url":"https://api.github.com/repos/OpenSTFoundation/openst-protocol/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OpenSTFoundation/openst-protocol/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OpenSTFoundation/openst-protocol/git/refs{/sha}","trees_url":"https://api.github.com/repos/OpenSTFoundation/openst-protocol/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OpenSTFoundation/openst-protocol/statuses/{sha}","languages_url":"https://api.github.com/repos/OpenSTFoundation/openst-protocol/languages","stargazers_url":"https://api.github.com/repos/OpenSTFoundation/openst-protocol/stargazers","contributors_url":"https://api.github.com/repos/OpenSTFoundation/openst-protocol/contributors","subscribers_url":"https://api.github.com/repos/OpenSTFoundation/openst-protocol/subscribers","subscription_url":"https://api.github.com/repos/OpenSTFoundation/openst-protocol/subscription","commits_url":"https://api.github.com/repos/OpenSTFoundation/openst-protocol/commits{/sha}","git_commits_url":"https://api.github.com/repos/OpenSTFoundation/openst-protocol/git/commits{/sha}","comments_url":"https://api.github.com/repos/OpenSTFoundation/openst-protocol/comments{/number}","issue_comment_url":"https://api.github.com/repos/OpenSTFoundation/openst-protocol/issues/comments{/number}","contents_url":"https://api.github.com/repos/OpenSTFoundation/openst-protocol/contents/{+path}","compare_url":"https://api.github.com/repos/OpenSTFoundation/openst-protocol/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OpenSTFoundation/openst-protocol/merges","archive_url":"https://api.github.com/repos/OpenSTFoundation/openst-protocol/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OpenSTFoundation/openst-protocol/downloads","issues_url":"https://api.github.com/repos/OpenSTFoundation/openst-protocol/issues{/number}","pulls_url":"https://api.github.com/repos/OpenSTFoundation/openst-protocol/pulls{/number}","milestones_url":"https://api.github.com/repos/OpenSTFoundation/openst-protocol/milestones{/number}","notifications_url":"https://api.github.com/repos/OpenSTFoundation/openst-protocol/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OpenSTFoundation/openst-protocol/labels{/name}","releases_url":"https://api.github.com/repos/OpenSTFoundation/openst-protocol/releases{/id}","deployments_url":"https://api.github.com/repos/OpenSTFoundation/openst-protocol/deployments","created_at":"2017-10-24T19:09:30Z","updated_at":"2018-05-24T18:51:51Z","pushed_at":"2018-06-21T16:46:33Z","git_url":"git://github.com/OpenSTFoundation/openst-protocol.git","ssh_url":"git@github.com:OpenSTFoundation/openst-protocol.git","clone_url":"https://github.com/OpenSTFoundation/openst-protocol.git","svn_url":"https://github.com/OpenSTFoundation/openst-protocol","homepage":"https://simpletoken.org","size":2636,"stargazers_count":63,"watchers_count":63,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13,"mirror_url":null,"archived":false,"open_issues_count":18,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":13,"open_issues":18,"watchers":63,"default_branch":"master"}},"base":{"label":"OpenSTFoundation:develop","ref":"develop","sha":"e79227467384b8bb7e35e3a37aaf6a26ba1b3641","user":{"login":"OpenSTFoundation","id":31754790,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMxNzU0Nzkw","avatar_url":"https://avatars2.githubusercontent.com/u/31754790?v=4","gravatar_id":"","url":"https://api.github.com/users/OpenSTFoundation","html_url":"https://github.com/OpenSTFoundation","followers_url":"https://api.github.com/users/OpenSTFoundation/followers","following_url":"https://api.github.com/users/OpenSTFoundation/following{/other_user}","gists_url":"https://api.github.com/users/OpenSTFoundation/gists{/gist_id}","starred_url":"https://api.github.com/users/OpenSTFoundation/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OpenSTFoundation/subscriptions","organizations_url":"https://api.github.com/users/OpenSTFoundation/orgs","repos_url":"https://api.github.com/users/OpenSTFoundation/repos","events_url":"https://api.github.com/users/OpenSTFoundation/events{/privacy}","received_events_url":"https://api.github.com/users/OpenSTFoundation/received_events","type":"Organization","site_admin":false},"repo":{"id":108171643,"node_id":"MDEwOlJlcG9zaXRvcnkxMDgxNzE2NDM=","name":"openst-protocol","full_name":"OpenSTFoundation/openst-protocol","owner":{"login":"OpenSTFoundation","id":31754790,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMxNzU0Nzkw","avatar_url":"https://avatars2.githubusercontent.com/u/31754790?v=4","gravatar_id":"","url":"https://api.github.com/users/OpenSTFoundation","html_url":"https://github.com/OpenSTFoundation","followers_url":"https://api.github.com/users/OpenSTFoundation/followers","following_url":"https://api.github.com/users/OpenSTFoundation/following{/other_user}","gists_url":"https://api.github.com/users/OpenSTFoundation/gists{/gist_id}","starred_url":"https://api.github.com/users/OpenSTFoundation/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OpenSTFoundation/subscriptions","organizations_url":"https://api.github.com/users/OpenSTFoundation/orgs","repos_url":"https://api.github.com/users/OpenSTFoundation/repos","events_url":"https://api.github.com/users/OpenSTFoundation/events{/privacy}","received_events_url":"https://api.github.com/users/OpenSTFoundation/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/OpenSTFoundation/openst-protocol","description":"OpenST Protocol allows to stake Simple Token on Ethereum to mint branded utility tokens","fork":false,"url":"https://api.github.com/repos/OpenSTFoundation/openst-protocol","forks_url":"https://api.github.com/repos/OpenSTFoundation/openst-protocol/forks","keys_url":"https://api.github.com/repos/OpenSTFoundation/openst-protocol/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OpenSTFoundation/openst-protocol/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OpenSTFoundation/openst-protocol/teams","hooks_url":"https://api.github.com/repos/OpenSTFoundation/openst-protocol/hooks","issue_events_url":"https://api.github.com/repos/OpenSTFoundation/openst-protocol/issues/events{/number}","events_url":"https://api.github.com/repos/OpenSTFoundation/openst-protocol/events","assignees_url":"https://api.github.com/repos/OpenSTFoundation/openst-protocol/assignees{/user}","branches_url":"https://api.github.com/repos/OpenSTFoundation/openst-protocol/branches{/branch}","tags_url":"https://api.github.com/repos/OpenSTFoundation/openst-protocol/tags","blobs_url":"https://api.github.com/repos/OpenSTFoundation/openst-protocol/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OpenSTFoundation/openst-protocol/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OpenSTFoundation/openst-protocol/git/refs{/sha}","trees_url":"https://api.github.com/repos/OpenSTFoundation/openst-protocol/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OpenSTFoundation/openst-protocol/statuses/{sha}","languages_url":"https://api.github.com/repos/OpenSTFoundation/openst-protocol/languages","stargazers_url":"https://api.github.com/repos/OpenSTFoundation/openst-protocol/stargazers","contributors_url":"https://api.github.com/repos/OpenSTFoundation/openst-protocol/contributors","subscribers_url":"https://api.github.com/repos/OpenSTFoundation/openst-protocol/subscribers","subscription_url":"https://api.github.com/repos/OpenSTFoundation/openst-protocol/subscription","commits_url":"https://api.github.com/repos/OpenSTFoundation/openst-protocol/commits{/sha}","git_commits_url":"https://api.github.com/repos/OpenSTFoundation/openst-protocol/git/commits{/sha}","comments_url":"https://api.github.com/repos/OpenSTFoundation/openst-protocol/comments{/number}","issue_comment_url":"https://api.github.com/repos/OpenSTFoundation/openst-protocol/issues/comments{/number}","contents_url":"https://api.github.com/repos/OpenSTFoundation/openst-protocol/contents/{+path}","compare_url":"https://api.github.com/repos/OpenSTFoundation/openst-protocol/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OpenSTFoundation/openst-protocol/merges","archive_url":"https://api.github.com/repos/OpenSTFoundation/openst-protocol/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OpenSTFoundation/openst-protocol/downloads","issues_url":"https://api.github.com/repos/OpenSTFoundation/openst-protocol/issues{/number}","pulls_url":"https://api.github.com/repos/OpenSTFoundation/openst-protocol/pulls{/number}","milestones_url":"https://api.github.com/repos/OpenSTFoundation/openst-protocol/milestones{/number}","notifications_url":"https://api.github.com/repos/OpenSTFoundation/openst-protocol/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OpenSTFoundation/openst-protocol/labels{/name}","releases_url":"https://api.github.com/repos/OpenSTFoundation/openst-protocol/releases{/id}","deployments_url":"https://api.github.com/repos/OpenSTFoundation/openst-protocol/deployments","created_at":"2017-10-24T19:09:30Z","updated_at":"2018-05-24T18:51:51Z","pushed_at":"2018-06-21T16:46:33Z","git_url":"git://github.com/OpenSTFoundation/openst-protocol.git","ssh_url":"git@github.com:OpenSTFoundation/openst-protocol.git","clone_url":"https://github.com/OpenSTFoundation/openst-protocol.git","svn_url":"https://github.com/OpenSTFoundation/openst-protocol","homepage":"https://simpletoken.org","size":2636,"stargazers_count":63,"watchers_count":63,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13,"mirror_url":null,"archived":false,"open_issues_count":18,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":13,"open_issues":18,"watchers":63,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/OpenSTFoundation/openst-protocol/pulls/149"},"html":{"href":"https://github.com/OpenSTFoundation/openst-protocol/pull/149"},"issue":{"href":"https://api.github.com/repos/OpenSTFoundation/openst-protocol/issues/149"},"comments":{"href":"https://api.github.com/repos/OpenSTFoundation/openst-protocol/issues/149/comments"},"review_comments":{"href":"https://api.github.com/repos/OpenSTFoundation/openst-protocol/pulls/149/comments"},"review_comment":{"href":"https://api.github.com/repos/OpenSTFoundation/openst-protocol/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/OpenSTFoundation/openst-protocol/pulls/149/commits"},"statuses":{"href":"https://api.github.com/repos/OpenSTFoundation/openst-protocol/statuses/97dd83677760fef8d9befbfe3bf9e59420fb0bae"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"noslav"}}