{"action":"created","comment":{"url":"https://api.github.com/repos/aaronang/cong-the-ripper/pulls/comments/85361466","pull_request_review_id":6082757,"id":85361466,"diff_hunk":"@@ -35,20 +33,27 @@ func (j *job) decreaseRunningTasks() {\n \tj.runningTasks = j.runningTasks - 1\n }\n \n-// SplitJob attempts to split a cracking job into equal sized tasks regardless of the job\n+// splitJob attempts to split a cracking job into equal sized tasks regardless of the job\n // the taskSize represents the number of brute force iterations\n-func SplitJob(job *job, taskSize int64) []lib.Task {\n-\tvar tasks []lib.Task\n-\tcands, lens := chunkCandidates(job.Alphabet, job.KeyLen, taskSize)\n+func (j *job) splitJob(taskSize int64) {\n+\tif taskSize < int64(j.Iter) {","path":"master/job.go","position":null,"original_position":24,"commit_id":"daf92841dc9e277767a11a68f38916ed3eff5f59","original_commit_id":"18d8971a8a2c688f964d671eee084bddc3bc8eb9","user":{"login":"kc1212","id":1093806,"avatar_url":"https://avatars.githubusercontent.com/u/1093806?v=3","gravatar_id":"","url":"https://api.github.com/users/kc1212","html_url":"https://github.com/kc1212","followers_url":"https://api.github.com/users/kc1212/followers","following_url":"https://api.github.com/users/kc1212/following{/other_user}","gists_url":"https://api.github.com/users/kc1212/gists{/gist_id}","starred_url":"https://api.github.com/users/kc1212/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kc1212/subscriptions","organizations_url":"https://api.github.com/users/kc1212/orgs","repos_url":"https://api.github.com/users/kc1212/repos","events_url":"https://api.github.com/users/kc1212/events{/privacy}","received_events_url":"https://api.github.com/users/kc1212/received_events","type":"User","site_admin":false},"body":"`taskSize` is the number of SHA2 hashes. Suppose a user submits a job using Iter = 10, and another using Iter = 100, while the other parameters are the same. Then these tasks need to be split differently. The second job will have 10 times more tasks than the first job, but each of these tasks have the same size. ","created_at":"2016-10-27T15:24:00Z","updated_at":"2016-10-27T15:24:00Z","html_url":"https://github.com/aaronang/cong-the-ripper/pull/25#discussion_r85361466","pull_request_url":"https://api.github.com/repos/aaronang/cong-the-ripper/pulls/25","_links":{"self":{"href":"https://api.github.com/repos/aaronang/cong-the-ripper/pulls/comments/85361466"},"html":{"href":"https://github.com/aaronang/cong-the-ripper/pull/25#discussion_r85361466"},"pull_request":{"href":"https://api.github.com/repos/aaronang/cong-the-ripper/pulls/25"}}},"pull_request":{"url":"https://api.github.com/repos/aaronang/cong-the-ripper/pulls/25","id":91189350,"html_url":"https://github.com/aaronang/cong-the-ripper/pull/25","diff_url":"https://github.com/aaronang/cong-the-ripper/pull/25.diff","patch_url":"https://github.com/aaronang/cong-the-ripper/pull/25.patch","issue_url":"https://api.github.com/repos/aaronang/cong-the-ripper/issues/25","number":25,"state":"open","locked":false,"title":"Feature/controller","user":{"login":"kc1212","id":1093806,"avatar_url":"https://avatars.githubusercontent.com/u/1093806?v=3","gravatar_id":"","url":"https://api.github.com/users/kc1212","html_url":"https://github.com/kc1212","followers_url":"https://api.github.com/users/kc1212/followers","following_url":"https://api.github.com/users/kc1212/following{/other_user}","gists_url":"https://api.github.com/users/kc1212/gists{/gist_id}","starred_url":"https://api.github.com/users/kc1212/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kc1212/subscriptions","organizations_url":"https://api.github.com/users/kc1212/orgs","repos_url":"https://api.github.com/users/kc1212/repos","events_url":"https://api.github.com/users/kc1212/events{/privacy}","received_events_url":"https://api.github.com/users/kc1212/received_events","type":"User","site_admin":false},"body":"Some notes:\r\n* Some of the fields are int64, I'm generating random int64s for `JobID` so that the collision is lower than simply using int. Are we ok with mixing int64s and ints? Related to #24 \r\n* I defined slots as the \"entity\" that runs the tasks, i.e. slots may be empty or full, when it's full a tasks is running in the slot. I tried to be consistent in the code but may have missed some. \r\n* I did some simple tests on the controller, to test it fully we need the heartbeats to mutate the master struct to create variation.\r\n* The master begins by creating a new instance, this is probably not necessary later on but it's useful for testing. The controller sees the instance but there are no tasks so it releases it afterwards.\r\n* Haven't moved the master and slave folders to lib yet, but I will when #23 is merged.\r\n* Some code paths are not fully tested because missing heartbeat messages. I will probably write a bit of heartbeat message handling code in the master because I'm the most familiar with it. After that, we just need the heartbeat code on the slave side from @victor-li to tie everything together (read: fix bugs). \r\n \r\nfixes #7 ","created_at":"2016-10-27T12:21:30Z","updated_at":"2016-10-27T15:24:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"84a30e2c15c972463ebf0fb2ac7b19523b267fc4","assignee":{"login":"victor-li","id":2921756,"avatar_url":"https://avatars.githubusercontent.com/u/2921756?v=3","gravatar_id":"","url":"https://api.github.com/users/victor-li","html_url":"https://github.com/victor-li","followers_url":"https://api.github.com/users/victor-li/followers","following_url":"https://api.github.com/users/victor-li/following{/other_user}","gists_url":"https://api.github.com/users/victor-li/gists{/gist_id}","starred_url":"https://api.github.com/users/victor-li/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/victor-li/subscriptions","organizations_url":"https://api.github.com/users/victor-li/orgs","repos_url":"https://api.github.com/users/victor-li/repos","events_url":"https://api.github.com/users/victor-li/events{/privacy}","received_events_url":"https://api.github.com/users/victor-li/received_events","type":"User","site_admin":false},"assignees":[{"login":"victor-li","id":2921756,"avatar_url":"https://avatars.githubusercontent.com/u/2921756?v=3","gravatar_id":"","url":"https://api.github.com/users/victor-li","html_url":"https://github.com/victor-li","followers_url":"https://api.github.com/users/victor-li/followers","following_url":"https://api.github.com/users/victor-li/following{/other_user}","gists_url":"https://api.github.com/users/victor-li/gists{/gist_id}","starred_url":"https://api.github.com/users/victor-li/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/victor-li/subscriptions","organizations_url":"https://api.github.com/users/victor-li/orgs","repos_url":"https://api.github.com/users/victor-li/repos","events_url":"https://api.github.com/users/victor-li/events{/privacy}","received_events_url":"https://api.github.com/users/victor-li/received_events","type":"User","site_admin":false},{"login":"aaronang","id":7579804,"avatar_url":"https://avatars.githubusercontent.com/u/7579804?v=3","gravatar_id":"","url":"https://api.github.com/users/aaronang","html_url":"https://github.com/aaronang","followers_url":"https://api.github.com/users/aaronang/followers","following_url":"https://api.github.com/users/aaronang/following{/other_user}","gists_url":"https://api.github.com/users/aaronang/gists{/gist_id}","starred_url":"https://api.github.com/users/aaronang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aaronang/subscriptions","organizations_url":"https://api.github.com/users/aaronang/orgs","repos_url":"https://api.github.com/users/aaronang/repos","events_url":"https://api.github.com/users/aaronang/events{/privacy}","received_events_url":"https://api.github.com/users/aaronang/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/aaronang/cong-the-ripper/milestones/1","html_url":"https://github.com/aaronang/cong-the-ripper/milestones/System%20Implementation","labels_url":"https://api.github.com/repos/aaronang/cong-the-ripper/milestones/1/labels","id":2081030,"number":1,"title":"System Implementation","description":"","creator":{"login":"aaronang","id":7579804,"avatar_url":"https://avatars.githubusercontent.com/u/7579804?v=3","gravatar_id":"","url":"https://api.github.com/users/aaronang","html_url":"https://github.com/aaronang","followers_url":"https://api.github.com/users/aaronang/followers","following_url":"https://api.github.com/users/aaronang/following{/other_user}","gists_url":"https://api.github.com/users/aaronang/gists{/gist_id}","starred_url":"https://api.github.com/users/aaronang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aaronang/subscriptions","organizations_url":"https://api.github.com/users/aaronang/orgs","repos_url":"https://api.github.com/users/aaronang/repos","events_url":"https://api.github.com/users/aaronang/events{/privacy}","received_events_url":"https://api.github.com/users/aaronang/received_events","type":"User","site_admin":false},"open_issues":6,"closed_issues":13,"state":"open","created_at":"2016-10-19T21:03:52Z","updated_at":"2016-10-27T14:04:45Z","due_on":"2016-10-28T00:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/aaronang/cong-the-ripper/pulls/25/commits","review_comments_url":"https://api.github.com/repos/aaronang/cong-the-ripper/pulls/25/comments","review_comment_url":"https://api.github.com/repos/aaronang/cong-the-ripper/pulls/comments{/number}","comments_url":"https://api.github.com/repos/aaronang/cong-the-ripper/issues/25/comments","statuses_url":"https://api.github.com/repos/aaronang/cong-the-ripper/statuses/daf92841dc9e277767a11a68f38916ed3eff5f59","head":{"label":"aaronang:feature/controller","ref":"feature/controller","sha":"daf92841dc9e277767a11a68f38916ed3eff5f59","user":{"login":"aaronang","id":7579804,"avatar_url":"https://avatars.githubusercontent.com/u/7579804?v=3","gravatar_id":"","url":"https://api.github.com/users/aaronang","html_url":"https://github.com/aaronang","followers_url":"https://api.github.com/users/aaronang/followers","following_url":"https://api.github.com/users/aaronang/following{/other_user}","gists_url":"https://api.github.com/users/aaronang/gists{/gist_id}","starred_url":"https://api.github.com/users/aaronang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aaronang/subscriptions","organizations_url":"https://api.github.com/users/aaronang/orgs","repos_url":"https://api.github.com/users/aaronang/repos","events_url":"https://api.github.com/users/aaronang/events{/privacy}","received_events_url":"https://api.github.com/users/aaronang/received_events","type":"User","site_admin":false},"repo":{"id":70912538,"name":"cong-the-ripper","full_name":"aaronang/cong-the-ripper","owner":{"login":"aaronang","id":7579804,"avatar_url":"https://avatars.githubusercontent.com/u/7579804?v=3","gravatar_id":"","url":"https://api.github.com/users/aaronang","html_url":"https://github.com/aaronang","followers_url":"https://api.github.com/users/aaronang/followers","following_url":"https://api.github.com/users/aaronang/following{/other_user}","gists_url":"https://api.github.com/users/aaronang/gists{/gist_id}","starred_url":"https://api.github.com/users/aaronang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aaronang/subscriptions","organizations_url":"https://api.github.com/users/aaronang/orgs","repos_url":"https://api.github.com/users/aaronang/repos","events_url":"https://api.github.com/users/aaronang/events{/privacy}","received_events_url":"https://api.github.com/users/aaronang/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/aaronang/cong-the-ripper","description":"Cong the Ripper is a *state-of-the-art* cloud-based password cracker","fork":false,"url":"https://api.github.com/repos/aaronang/cong-the-ripper","forks_url":"https://api.github.com/repos/aaronang/cong-the-ripper/forks","keys_url":"https://api.github.com/repos/aaronang/cong-the-ripper/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aaronang/cong-the-ripper/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aaronang/cong-the-ripper/teams","hooks_url":"https://api.github.com/repos/aaronang/cong-the-ripper/hooks","issue_events_url":"https://api.github.com/repos/aaronang/cong-the-ripper/issues/events{/number}","events_url":"https://api.github.com/repos/aaronang/cong-the-ripper/events","assignees_url":"https://api.github.com/repos/aaronang/cong-the-ripper/assignees{/user}","branches_url":"https://api.github.com/repos/aaronang/cong-the-ripper/branches{/branch}","tags_url":"https://api.github.com/repos/aaronang/cong-the-ripper/tags","blobs_url":"https://api.github.com/repos/aaronang/cong-the-ripper/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aaronang/cong-the-ripper/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aaronang/cong-the-ripper/git/refs{/sha}","trees_url":"https://api.github.com/repos/aaronang/cong-the-ripper/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aaronang/cong-the-ripper/statuses/{sha}","languages_url":"https://api.github.com/repos/aaronang/cong-the-ripper/languages","stargazers_url":"https://api.github.com/repos/aaronang/cong-the-ripper/stargazers","contributors_url":"https://api.github.com/repos/aaronang/cong-the-ripper/contributors","subscribers_url":"https://api.github.com/repos/aaronang/cong-the-ripper/subscribers","subscription_url":"https://api.github.com/repos/aaronang/cong-the-ripper/subscription","commits_url":"https://api.github.com/repos/aaronang/cong-the-ripper/commits{/sha}","git_commits_url":"https://api.github.com/repos/aaronang/cong-the-ripper/git/commits{/sha}","comments_url":"https://api.github.com/repos/aaronang/cong-the-ripper/comments{/number}","issue_comment_url":"https://api.github.com/repos/aaronang/cong-the-ripper/issues/comments{/number}","contents_url":"https://api.github.com/repos/aaronang/cong-the-ripper/contents/{+path}","compare_url":"https://api.github.com/repos/aaronang/cong-the-ripper/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aaronang/cong-the-ripper/merges","archive_url":"https://api.github.com/repos/aaronang/cong-the-ripper/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aaronang/cong-the-ripper/downloads","issues_url":"https://api.github.com/repos/aaronang/cong-the-ripper/issues{/number}","pulls_url":"https://api.github.com/repos/aaronang/cong-the-ripper/pulls{/number}","milestones_url":"https://api.github.com/repos/aaronang/cong-the-ripper/milestones{/number}","notifications_url":"https://api.github.com/repos/aaronang/cong-the-ripper/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aaronang/cong-the-ripper/labels{/name}","releases_url":"https://api.github.com/repos/aaronang/cong-the-ripper/releases{/id}","deployments_url":"https://api.github.com/repos/aaronang/cong-the-ripper/deployments","created_at":"2016-10-14T13:26:11Z","updated_at":"2016-10-23T17:03:48Z","pushed_at":"2016-10-27T14:25:55Z","git_url":"git://github.com/aaronang/cong-the-ripper.git","ssh_url":"git@github.com:aaronang/cong-the-ripper.git","clone_url":"https://github.com/aaronang/cong-the-ripper.git","svn_url":"https://github.com/aaronang/cong-the-ripper","homepage":"","size":121,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":9,"forks":0,"open_issues":9,"watchers":0,"default_branch":"master"}},"base":{"label":"aaronang:master","ref":"master","sha":"742103894f08b7c44a59c0aec2a257b54384f563","user":{"login":"aaronang","id":7579804,"avatar_url":"https://avatars.githubusercontent.com/u/7579804?v=3","gravatar_id":"","url":"https://api.github.com/users/aaronang","html_url":"https://github.com/aaronang","followers_url":"https://api.github.com/users/aaronang/followers","following_url":"https://api.github.com/users/aaronang/following{/other_user}","gists_url":"https://api.github.com/users/aaronang/gists{/gist_id}","starred_url":"https://api.github.com/users/aaronang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aaronang/subscriptions","organizations_url":"https://api.github.com/users/aaronang/orgs","repos_url":"https://api.github.com/users/aaronang/repos","events_url":"https://api.github.com/users/aaronang/events{/privacy}","received_events_url":"https://api.github.com/users/aaronang/received_events","type":"User","site_admin":false},"repo":{"id":70912538,"name":"cong-the-ripper","full_name":"aaronang/cong-the-ripper","owner":{"login":"aaronang","id":7579804,"avatar_url":"https://avatars.githubusercontent.com/u/7579804?v=3","gravatar_id":"","url":"https://api.github.com/users/aaronang","html_url":"https://github.com/aaronang","followers_url":"https://api.github.com/users/aaronang/followers","following_url":"https://api.github.com/users/aaronang/following{/other_user}","gists_url":"https://api.github.com/users/aaronang/gists{/gist_id}","starred_url":"https://api.github.com/users/aaronang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aaronang/subscriptions","organizations_url":"https://api.github.com/users/aaronang/orgs","repos_url":"https://api.github.com/users/aaronang/repos","events_url":"https://api.github.com/users/aaronang/events{/privacy}","received_events_url":"https://api.github.com/users/aaronang/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/aaronang/cong-the-ripper","description":"Cong the Ripper is a *state-of-the-art* cloud-based password cracker","fork":false,"url":"https://api.github.com/repos/aaronang/cong-the-ripper","forks_url":"https://api.github.com/repos/aaronang/cong-the-ripper/forks","keys_url":"https://api.github.com/repos/aaronang/cong-the-ripper/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aaronang/cong-the-ripper/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aaronang/cong-the-ripper/teams","hooks_url":"https://api.github.com/repos/aaronang/cong-the-ripper/hooks","issue_events_url":"https://api.github.com/repos/aaronang/cong-the-ripper/issues/events{/number}","events_url":"https://api.github.com/repos/aaronang/cong-the-ripper/events","assignees_url":"https://api.github.com/repos/aaronang/cong-the-ripper/assignees{/user}","branches_url":"https://api.github.com/repos/aaronang/cong-the-ripper/branches{/branch}","tags_url":"https://api.github.com/repos/aaronang/cong-the-ripper/tags","blobs_url":"https://api.github.com/repos/aaronang/cong-the-ripper/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aaronang/cong-the-ripper/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aaronang/cong-the-ripper/git/refs{/sha}","trees_url":"https://api.github.com/repos/aaronang/cong-the-ripper/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aaronang/cong-the-ripper/statuses/{sha}","languages_url":"https://api.github.com/repos/aaronang/cong-the-ripper/languages","stargazers_url":"https://api.github.com/repos/aaronang/cong-the-ripper/stargazers","contributors_url":"https://api.github.com/repos/aaronang/cong-the-ripper/contributors","subscribers_url":"https://api.github.com/repos/aaronang/cong-the-ripper/subscribers","subscription_url":"https://api.github.com/repos/aaronang/cong-the-ripper/subscription","commits_url":"https://api.github.com/repos/aaronang/cong-the-ripper/commits{/sha}","git_commits_url":"https://api.github.com/repos/aaronang/cong-the-ripper/git/commits{/sha}","comments_url":"https://api.github.com/repos/aaronang/cong-the-ripper/comments{/number}","issue_comment_url":"https://api.github.com/repos/aaronang/cong-the-ripper/issues/comments{/number}","contents_url":"https://api.github.com/repos/aaronang/cong-the-ripper/contents/{+path}","compare_url":"https://api.github.com/repos/aaronang/cong-the-ripper/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aaronang/cong-the-ripper/merges","archive_url":"https://api.github.com/repos/aaronang/cong-the-ripper/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aaronang/cong-the-ripper/downloads","issues_url":"https://api.github.com/repos/aaronang/cong-the-ripper/issues{/number}","pulls_url":"https://api.github.com/repos/aaronang/cong-the-ripper/pulls{/number}","milestones_url":"https://api.github.com/repos/aaronang/cong-the-ripper/milestones{/number}","notifications_url":"https://api.github.com/repos/aaronang/cong-the-ripper/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aaronang/cong-the-ripper/labels{/name}","releases_url":"https://api.github.com/repos/aaronang/cong-the-ripper/releases{/id}","deployments_url":"https://api.github.com/repos/aaronang/cong-the-ripper/deployments","created_at":"2016-10-14T13:26:11Z","updated_at":"2016-10-23T17:03:48Z","pushed_at":"2016-10-27T14:25:55Z","git_url":"git://github.com/aaronang/cong-the-ripper.git","ssh_url":"git@github.com:aaronang/cong-the-ripper.git","clone_url":"https://github.com/aaronang/cong-the-ripper.git","svn_url":"https://github.com/aaronang/cong-the-ripper","homepage":"","size":121,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":9,"forks":0,"open_issues":9,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/aaronang/cong-the-ripper/pulls/25"},"html":{"href":"https://github.com/aaronang/cong-the-ripper/pull/25"},"issue":{"href":"https://api.github.com/repos/aaronang/cong-the-ripper/issues/25"},"comments":{"href":"https://api.github.com/repos/aaronang/cong-the-ripper/issues/25/comments"},"review_comments":{"href":"https://api.github.com/repos/aaronang/cong-the-ripper/pulls/25/comments"},"review_comment":{"href":"https://api.github.com/repos/aaronang/cong-the-ripper/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/aaronang/cong-the-ripper/pulls/25/commits"},"statuses":{"href":"https://api.github.com/repos/aaronang/cong-the-ripper/statuses/daf92841dc9e277767a11a68f38916ed3eff5f59"}}}}
{"actor":{"display_login":"kc1212"}}