{"action":"created","comment":{"url":"https://api.github.com/repos/ethereum/sharding/pulls/comments/152209588","pull_request_review_id":78034613,"id":152209588,"diff_hunk":"@@ -72,58 +100,62 @@ def __init__():\n     self.period_length = 5\n     self.num_validators_per_cycle = 100\n     self.shard_count = 100\n-    self.add_header_log_topic = sha3(\"add_header()\")\n+    self.lookahead_periods = 4\n     self.sighasher_addr = 0xDFFD41E18F04Ad8810c83B14FD1426a82E625A7D\n \n \n+# Checks if empty_slots_stack_top is empty","path":"sharding/contracts/validator_manager.v.py","position":110,"original_position":111,"commit_id":"f4e7132a522ef8f3a79e53654afa2aab671adcf5","original_commit_id":"b2052dd65f2c4921e69f4c21255c2c173be57056","user":{"login":"hwwhww","id":9263930,"avatar_url":"https://avatars3.githubusercontent.com/u/9263930?v=4","gravatar_id":"","url":"https://api.github.com/users/hwwhww","html_url":"https://github.com/hwwhww","followers_url":"https://api.github.com/users/hwwhww/followers","following_url":"https://api.github.com/users/hwwhww/following{/other_user}","gists_url":"https://api.github.com/users/hwwhww/gists{/gist_id}","starred_url":"https://api.github.com/users/hwwhww/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hwwhww/subscriptions","organizations_url":"https://api.github.com/users/hwwhww/orgs","repos_url":"https://api.github.com/users/hwwhww/repos","events_url":"https://api.github.com/users/hwwhww/events{/privacy}","received_events_url":"https://api.github.com/users/hwwhww/received_events","type":"User","site_admin":false},"body":"Modified to uppercases","created_at":"2017-11-21T08:52:50Z","updated_at":"2017-11-21T08:52:50Z","html_url":"https://github.com/ethereum/sharding/pull/33#discussion_r152209588","pull_request_url":"https://api.github.com/repos/ethereum/sharding/pulls/33","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/ethereum/sharding/pulls/comments/152209588"},"html":{"href":"https://github.com/ethereum/sharding/pull/33#discussion_r152209588"},"pull_request":{"href":"https://api.github.com/repos/ethereum/sharding/pulls/33"}},"in_reply_to_id":152177714},"pull_request":{"url":"https://api.github.com/repos/ethereum/sharding/pulls/33","id":153504011,"html_url":"https://github.com/ethereum/sharding/pull/33","diff_url":"https://github.com/ethereum/sharding/pull/33.diff","patch_url":"https://github.com/ethereum/sharding/pull/33.patch","issue_url":"https://api.github.com/repos/ethereum/sharding/issues/33","number":33,"state":"open","locked":false,"title":"Updated validator contract manager and added get_collations_with_score function","user":{"login":"hwwhww","id":9263930,"avatar_url":"https://avatars3.githubusercontent.com/u/9263930?v=4","gravatar_id":"","url":"https://api.github.com/users/hwwhww","html_url":"https://github.com/hwwhww","followers_url":"https://api.github.com/users/hwwhww/followers","following_url":"https://api.github.com/users/hwwhww/following{/other_user}","gists_url":"https://api.github.com/users/hwwhww/gists{/gist_id}","starred_url":"https://api.github.com/users/hwwhww/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hwwhww/subscriptions","organizations_url":"https://api.github.com/users/hwwhww/orgs","repos_url":"https://api.github.com/users/hwwhww/repos","events_url":"https://api.github.com/users/hwwhww/events{/privacy}","received_events_url":"https://api.github.com/users/hwwhww/received_events","type":"User","site_admin":false},"body":"## Description\r\nThis PR is part of the evolution of stateless client #31\r\n1. Updated `validator_manager_contract`\r\n\t* Added `get_eligible_proposer`  function for replacing `sample` function\r\n\t* Added some comments and refactored\r\n\t* Removed some of shuffling cycle code and the rest will be removed after integrating with\r\nstateless collator\r\n\r\n2. Added the easiest part of  `stateless_collator.py`.  `collator.py`  will be replaced with more PRs.\r\n\t* Added `get_collations_with_score` function\r\n\t* Added `get_collations_with_scores_in_range` function\r\n\t* These two function will be used for `CREATE_COLLATION`\r\n3. According to the above code and design, updated `doc.md`.\r\n\r\n## How to test\r\n```\r\npytest sharding/tests\r\n```\r\n\r\n* Especially, `sharding/tests/test_stateless_collator.py`, `test_validator_manager.py`, and `test_validator_manager_utils.py`.\r\n\r\n## Cute Animal Picture\r\n![cute-baby-polar-bear-day-photography-182__880](https://user-images.githubusercontent.com/9263930/32992818-e65a71be-cd14-11e7-8422-b84dbfa60baa.jpg)\r\n","created_at":"2017-11-19T16:34:29Z","updated_at":"2017-11-21T08:52:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"361ca9858751dd5f3e3200f49b2718678c8ee568","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/ethereum/sharding/pulls/33/commits","review_comments_url":"https://api.github.com/repos/ethereum/sharding/pulls/33/comments","review_comment_url":"https://api.github.com/repos/ethereum/sharding/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ethereum/sharding/issues/33/comments","statuses_url":"https://api.github.com/repos/ethereum/sharding/statuses/f4e7132a522ef8f3a79e53654afa2aab671adcf5","head":{"label":"hwwhww:stateless_collator","ref":"stateless_collator","sha":"f4e7132a522ef8f3a79e53654afa2aab671adcf5","user":{"login":"hwwhww","id":9263930,"avatar_url":"https://avatars3.githubusercontent.com/u/9263930?v=4","gravatar_id":"","url":"https://api.github.com/users/hwwhww","html_url":"https://github.com/hwwhww","followers_url":"https://api.github.com/users/hwwhww/followers","following_url":"https://api.github.com/users/hwwhww/following{/other_user}","gists_url":"https://api.github.com/users/hwwhww/gists{/gist_id}","starred_url":"https://api.github.com/users/hwwhww/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hwwhww/subscriptions","organizations_url":"https://api.github.com/users/hwwhww/orgs","repos_url":"https://api.github.com/users/hwwhww/repos","events_url":"https://api.github.com/users/hwwhww/events{/privacy}","received_events_url":"https://api.github.com/users/hwwhww/received_events","type":"User","site_admin":false},"repo":{"id":96691820,"name":"sharding","full_name":"hwwhww/sharding","owner":{"login":"hwwhww","id":9263930,"avatar_url":"https://avatars3.githubusercontent.com/u/9263930?v=4","gravatar_id":"","url":"https://api.github.com/users/hwwhww","html_url":"https://github.com/hwwhww","followers_url":"https://api.github.com/users/hwwhww/followers","following_url":"https://api.github.com/users/hwwhww/following{/other_user}","gists_url":"https://api.github.com/users/hwwhww/gists{/gist_id}","starred_url":"https://api.github.com/users/hwwhww/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hwwhww/subscriptions","organizations_url":"https://api.github.com/users/hwwhww/orgs","repos_url":"https://api.github.com/users/hwwhww/repos","events_url":"https://api.github.com/users/hwwhww/events{/privacy}","received_events_url":"https://api.github.com/users/hwwhww/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hwwhww/sharding","description":null,"fork":true,"url":"https://api.github.com/repos/hwwhww/sharding","forks_url":"https://api.github.com/repos/hwwhww/sharding/forks","keys_url":"https://api.github.com/repos/hwwhww/sharding/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hwwhww/sharding/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hwwhww/sharding/teams","hooks_url":"https://api.github.com/repos/hwwhww/sharding/hooks","issue_events_url":"https://api.github.com/repos/hwwhww/sharding/issues/events{/number}","events_url":"https://api.github.com/repos/hwwhww/sharding/events","assignees_url":"https://api.github.com/repos/hwwhww/sharding/assignees{/user}","branches_url":"https://api.github.com/repos/hwwhww/sharding/branches{/branch}","tags_url":"https://api.github.com/repos/hwwhww/sharding/tags","blobs_url":"https://api.github.com/repos/hwwhww/sharding/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hwwhww/sharding/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hwwhww/sharding/git/refs{/sha}","trees_url":"https://api.github.com/repos/hwwhww/sharding/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hwwhww/sharding/statuses/{sha}","languages_url":"https://api.github.com/repos/hwwhww/sharding/languages","stargazers_url":"https://api.github.com/repos/hwwhww/sharding/stargazers","contributors_url":"https://api.github.com/repos/hwwhww/sharding/contributors","subscribers_url":"https://api.github.com/repos/hwwhww/sharding/subscribers","subscription_url":"https://api.github.com/repos/hwwhww/sharding/subscription","commits_url":"https://api.github.com/repos/hwwhww/sharding/commits{/sha}","git_commits_url":"https://api.github.com/repos/hwwhww/sharding/git/commits{/sha}","comments_url":"https://api.github.com/repos/hwwhww/sharding/comments{/number}","issue_comment_url":"https://api.github.com/repos/hwwhww/sharding/issues/comments{/number}","contents_url":"https://api.github.com/repos/hwwhww/sharding/contents/{+path}","compare_url":"https://api.github.com/repos/hwwhww/sharding/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hwwhww/sharding/merges","archive_url":"https://api.github.com/repos/hwwhww/sharding/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hwwhww/sharding/downloads","issues_url":"https://api.github.com/repos/hwwhww/sharding/issues{/number}","pulls_url":"https://api.github.com/repos/hwwhww/sharding/pulls{/number}","milestones_url":"https://api.github.com/repos/hwwhww/sharding/milestones{/number}","notifications_url":"https://api.github.com/repos/hwwhww/sharding/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hwwhww/sharding/labels{/name}","releases_url":"https://api.github.com/repos/hwwhww/sharding/releases{/id}","deployments_url":"https://api.github.com/repos/hwwhww/sharding/deployments","created_at":"2017-07-09T15:04:31Z","updated_at":"2017-10-29T22:31:55Z","pushed_at":"2017-11-21T08:51:53Z","git_url":"git://github.com/hwwhww/sharding.git","ssh_url":"git@github.com:hwwhww/sharding.git","clone_url":"https://github.com/hwwhww/sharding.git","svn_url":"https://github.com/hwwhww/sharding","homepage":null,"size":355,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"sim_split2"}},"base":{"label":"ethereum:develop","ref":"develop","sha":"cdf69c017a3ef49cc8360ae1bf106d58a0375643","user":{"login":"ethereum","id":6250754,"avatar_url":"https://avatars3.githubusercontent.com/u/6250754?v=4","gravatar_id":"","url":"https://api.github.com/users/ethereum","html_url":"https://github.com/ethereum","followers_url":"https://api.github.com/users/ethereum/followers","following_url":"https://api.github.com/users/ethereum/following{/other_user}","gists_url":"https://api.github.com/users/ethereum/gists{/gist_id}","starred_url":"https://api.github.com/users/ethereum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ethereum/subscriptions","organizations_url":"https://api.github.com/users/ethereum/orgs","repos_url":"https://api.github.com/users/ethereum/repos","events_url":"https://api.github.com/users/ethereum/events{/privacy}","received_events_url":"https://api.github.com/users/ethereum/received_events","type":"Organization","site_admin":false},"repo":{"id":96542036,"name":"sharding","full_name":"ethereum/sharding","owner":{"login":"ethereum","id":6250754,"avatar_url":"https://avatars3.githubusercontent.com/u/6250754?v=4","gravatar_id":"","url":"https://api.github.com/users/ethereum","html_url":"https://github.com/ethereum","followers_url":"https://api.github.com/users/ethereum/followers","following_url":"https://api.github.com/users/ethereum/following{/other_user}","gists_url":"https://api.github.com/users/ethereum/gists{/gist_id}","starred_url":"https://api.github.com/users/ethereum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ethereum/subscriptions","organizations_url":"https://api.github.com/users/ethereum/orgs","repos_url":"https://api.github.com/users/ethereum/repos","events_url":"https://api.github.com/users/ethereum/events{/privacy}","received_events_url":"https://api.github.com/users/ethereum/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ethereum/sharding","description":null,"fork":false,"url":"https://api.github.com/repos/ethereum/sharding","forks_url":"https://api.github.com/repos/ethereum/sharding/forks","keys_url":"https://api.github.com/repos/ethereum/sharding/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ethereum/sharding/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ethereum/sharding/teams","hooks_url":"https://api.github.com/repos/ethereum/sharding/hooks","issue_events_url":"https://api.github.com/repos/ethereum/sharding/issues/events{/number}","events_url":"https://api.github.com/repos/ethereum/sharding/events","assignees_url":"https://api.github.com/repos/ethereum/sharding/assignees{/user}","branches_url":"https://api.github.com/repos/ethereum/sharding/branches{/branch}","tags_url":"https://api.github.com/repos/ethereum/sharding/tags","blobs_url":"https://api.github.com/repos/ethereum/sharding/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ethereum/sharding/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ethereum/sharding/git/refs{/sha}","trees_url":"https://api.github.com/repos/ethereum/sharding/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ethereum/sharding/statuses/{sha}","languages_url":"https://api.github.com/repos/ethereum/sharding/languages","stargazers_url":"https://api.github.com/repos/ethereum/sharding/stargazers","contributors_url":"https://api.github.com/repos/ethereum/sharding/contributors","subscribers_url":"https://api.github.com/repos/ethereum/sharding/subscribers","subscription_url":"https://api.github.com/repos/ethereum/sharding/subscription","commits_url":"https://api.github.com/repos/ethereum/sharding/commits{/sha}","git_commits_url":"https://api.github.com/repos/ethereum/sharding/git/commits{/sha}","comments_url":"https://api.github.com/repos/ethereum/sharding/comments{/number}","issue_comment_url":"https://api.github.com/repos/ethereum/sharding/issues/comments{/number}","contents_url":"https://api.github.com/repos/ethereum/sharding/contents/{+path}","compare_url":"https://api.github.com/repos/ethereum/sharding/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ethereum/sharding/merges","archive_url":"https://api.github.com/repos/ethereum/sharding/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ethereum/sharding/downloads","issues_url":"https://api.github.com/repos/ethereum/sharding/issues{/number}","pulls_url":"https://api.github.com/repos/ethereum/sharding/pulls{/number}","milestones_url":"https://api.github.com/repos/ethereum/sharding/milestones{/number}","notifications_url":"https://api.github.com/repos/ethereum/sharding/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ethereum/sharding/labels{/name}","releases_url":"https://api.github.com/repos/ethereum/sharding/releases{/id}","deployments_url":"https://api.github.com/repos/ethereum/sharding/deployments","created_at":"2017-07-07T13:39:20Z","updated_at":"2017-11-20T01:25:04Z","pushed_at":"2017-11-21T08:51:54Z","git_url":"git://github.com/ethereum/sharding.git","ssh_url":"git@github.com:ethereum/sharding.git","clone_url":"https://github.com/ethereum/sharding.git","svn_url":"https://github.com/ethereum/sharding","homepage":null,"size":288,"stargazers_count":101,"watchers_count":101,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":23,"mirror_url":null,"archived":false,"open_issues_count":15,"forks":23,"open_issues":15,"watchers":101,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/ethereum/sharding/pulls/33"},"html":{"href":"https://github.com/ethereum/sharding/pull/33"},"issue":{"href":"https://api.github.com/repos/ethereum/sharding/issues/33"},"comments":{"href":"https://api.github.com/repos/ethereum/sharding/issues/33/comments"},"review_comments":{"href":"https://api.github.com/repos/ethereum/sharding/pulls/33/comments"},"review_comment":{"href":"https://api.github.com/repos/ethereum/sharding/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ethereum/sharding/pulls/33/commits"},"statuses":{"href":"https://api.github.com/repos/ethereum/sharding/statuses/f4e7132a522ef8f3a79e53654afa2aab671adcf5"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"hwwhww"}}