{"action":"created","comment":{"url":"https://api.github.com/repos/kowala-tech/kUSD/pulls/comments/177087605","pull_request_review_id":106898983,"id":177087605,"diff_hunk":"@@ -159,17 +99,56 @@ func (api *PrivateValidatorAPI) SetCoinbase(coinbase common.Address) bool {\n \treturn true\n }\n \n-// SetDeposit  sets the deposit of the validator\n+// SetDeposit sets the deposit of the validator\n func (api *PrivateValidatorAPI) SetDeposit(deposit uint64) bool {\n \tapi.kusd.SetDeposit(deposit)\n \treturn true\n }\n \n // GetMinimumDeposit gets the minimum deposit required to take a slot as a validator\n-func (api *PrivateValidatorAPI) GetMinimumDeposit() uint64 {\n+func (api *PrivateValidatorAPI) GetMinimumDeposit() (uint64, error) {\n \treturn api.kusd.GetMinimumDeposit()\n }\n \n+// GetDepositsResult is the result of a validator_getDeposits API call.\n+type GetDepositsResult struct {\n+\tDeposits []depositEntry `json:\"deposits\"`\n+}\n+\n+type depositEntry struct {","path":"kusd/api.go","position":89,"original_position":89,"commit_id":"0c3a346694015e3bea93ec408f2e8ee1365b3ed6","original_commit_id":"0c3a346694015e3bea93ec408f2e8ee1365b3ed6","user":{"login":"acroca","id":16717,"avatar_url":"https://avatars1.githubusercontent.com/u/16717?v=4","gravatar_id":"","url":"https://api.github.com/users/acroca","html_url":"https://github.com/acroca","followers_url":"https://api.github.com/users/acroca/followers","following_url":"https://api.github.com/users/acroca/following{/other_user}","gists_url":"https://api.github.com/users/acroca/gists{/gist_id}","starred_url":"https://api.github.com/users/acroca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acroca/subscriptions","organizations_url":"https://api.github.com/users/acroca/orgs","repos_url":"https://api.github.com/users/acroca/repos","events_url":"https://api.github.com/users/acroca/events{/privacy}","received_events_url":"https://api.github.com/users/acroca/received_events","type":"User","site_admin":false},"body":"`GetDepositsResult` is an exposed struct with an array of `depositEntry`. Shouldn't this also be exposed for consistency?","created_at":"2018-03-26T13:25:00Z","updated_at":"2018-03-26T13:32:37Z","html_url":"https://github.com/kowala-tech/kUSD/pull/161#discussion_r177087605","pull_request_url":"https://api.github.com/repos/kowala-tech/kUSD/pulls/161","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/kowala-tech/kUSD/pulls/comments/177087605"},"html":{"href":"https://github.com/kowala-tech/kUSD/pull/161#discussion_r177087605"},"pull_request":{"href":"https://api.github.com/repos/kowala-tech/kUSD/pulls/161"}}},"pull_request":{"url":"https://api.github.com/repos/kowala-tech/kUSD/pulls/161","id":176281312,"html_url":"https://github.com/kowala-tech/kUSD/pull/161","diff_url":"https://github.com/kowala-tech/kUSD/pull/161.diff","patch_url":"https://github.com/kowala-tech/kUSD/pull/161.patch","issue_url":"https://api.github.com/repos/kowala-tech/kUSD/issues/161","number":161,"state":"open","locked":false,"title":"consensus: unbonding period and contract tests","user":{"login":"rgeraldes","id":26251983,"avatar_url":"https://avatars2.githubusercontent.com/u/26251983?v=4","gravatar_id":"","url":"https://api.github.com/users/rgeraldes","html_url":"https://github.com/rgeraldes","followers_url":"https://api.github.com/users/rgeraldes/followers","following_url":"https://api.github.com/users/rgeraldes/following{/other_user}","gists_url":"https://api.github.com/users/rgeraldes/gists{/gist_id}","starred_url":"https://api.github.com/users/rgeraldes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rgeraldes/subscriptions","organizations_url":"https://api.github.com/users/rgeraldes/orgs","repos_url":"https://api.github.com/users/rgeraldes/repos","events_url":"https://api.github.com/users/rgeraldes/events{/privacy}","received_events_url":"https://api.github.com/users/rgeraldes/received_events","type":"User","site_admin":false},"body":"PR Closes #136, Closes #100, Closes #141.\r\n\r\n**Important changes:**\r\n- Included the latest version of the contract - includes deposits + unbonding period.\r\n- Removed the miner api (obsolete - no longer used) from kusd/api.go.\r\n- Moved validator/validationNetwork (wrapper type) and the interface closer to the contract (go-eth style) and renamed it to \"election\".\r\n- removed availability check (join method) - https://github.com/kowala-tech/kUSD/blob/dev/kusd/validator/validation_network.go#L39 - it's no longer necessary since everyone can join the election as long as the user deposits the minimum required deposit.\r\n- Added two methods to the validator api: getDeposits & redeemDeposits.\r\n- Added to the genesis creation(puppeth): max validators, genesis address, unbonding period, base deposit.\r\n- removed contracts that are not being used/not finalised. (contracts can be found here: \r\nhttps://github.com/kowala-tech/contracts)\r\n- added contracts/network to the stable packages for tests. \r\n- modified GetMinimumDeposit to use the contract vs config.\r\n- included the latest genesis file in internal/assets.\r\n\r\n**Note:**\r\n\r\n- It's not going to be possible to use the default testnet genesis for now since we include accounts with storage and code and the ethereum tool cannot handle that for now - https://github.com/kowala-tech/kUSD/blob/dev/core/mkalloc.go#L53. We will need to perform the \"kusd init\" step.\r\n\r\n**Post:** \r\n\r\n- Create issue for this idea (core/types/validator.go)\r\nDeposit would sit nice under Validator. Seems like a good option for an Aggregate with Validator as top level - https://martinfowler.com/bliki/DDD_Aggregate.html\r\n- Add logic to redeemDeposits (contracts/network/election.go) to skip the operation if the user does not have at least one unlocked deposit.","created_at":"2018-03-20T18:21:46Z","updated_at":"2018-03-26T13:32:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e87f087dce30d290074b78bb12b9a2bf3d9a9990","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/kowala-tech/kUSD/pulls/161/commits","review_comments_url":"https://api.github.com/repos/kowala-tech/kUSD/pulls/161/comments","review_comment_url":"https://api.github.com/repos/kowala-tech/kUSD/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kowala-tech/kUSD/issues/161/comments","statuses_url":"https://api.github.com/repos/kowala-tech/kUSD/statuses/0c3a346694015e3bea93ec408f2e8ee1365b3ed6","head":{"label":"kowala-tech:feature/unbonding-period-part2#136","ref":"feature/unbonding-period-part2#136","sha":"0c3a346694015e3bea93ec408f2e8ee1365b3ed6","user":{"login":"kowala-tech","id":29745494,"avatar_url":"https://avatars0.githubusercontent.com/u/29745494?v=4","gravatar_id":"","url":"https://api.github.com/users/kowala-tech","html_url":"https://github.com/kowala-tech","followers_url":"https://api.github.com/users/kowala-tech/followers","following_url":"https://api.github.com/users/kowala-tech/following{/other_user}","gists_url":"https://api.github.com/users/kowala-tech/gists{/gist_id}","starred_url":"https://api.github.com/users/kowala-tech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kowala-tech/subscriptions","organizations_url":"https://api.github.com/users/kowala-tech/orgs","repos_url":"https://api.github.com/users/kowala-tech/repos","events_url":"https://api.github.com/users/kowala-tech/events{/privacy}","received_events_url":"https://api.github.com/users/kowala-tech/received_events","type":"Organization","site_admin":false},"repo":{"id":98875571,"name":"kUSD","full_name":"kowala-tech/kUSD","owner":{"login":"kowala-tech","id":29745494,"avatar_url":"https://avatars0.githubusercontent.com/u/29745494?v=4","gravatar_id":"","url":"https://api.github.com/users/kowala-tech","html_url":"https://github.com/kowala-tech","followers_url":"https://api.github.com/users/kowala-tech/followers","following_url":"https://api.github.com/users/kowala-tech/following{/other_user}","gists_url":"https://api.github.com/users/kowala-tech/gists{/gist_id}","starred_url":"https://api.github.com/users/kowala-tech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kowala-tech/subscriptions","organizations_url":"https://api.github.com/users/kowala-tech/orgs","repos_url":"https://api.github.com/users/kowala-tech/repos","events_url":"https://api.github.com/users/kowala-tech/events{/privacy}","received_events_url":"https://api.github.com/users/kowala-tech/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kowala-tech/kUSD","description":"A stable cryptocurrency, algorithmically pegged to $1 USD using the Kowala Protocol","fork":false,"url":"https://api.github.com/repos/kowala-tech/kUSD","forks_url":"https://api.github.com/repos/kowala-tech/kUSD/forks","keys_url":"https://api.github.com/repos/kowala-tech/kUSD/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kowala-tech/kUSD/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kowala-tech/kUSD/teams","hooks_url":"https://api.github.com/repos/kowala-tech/kUSD/hooks","issue_events_url":"https://api.github.com/repos/kowala-tech/kUSD/issues/events{/number}","events_url":"https://api.github.com/repos/kowala-tech/kUSD/events","assignees_url":"https://api.github.com/repos/kowala-tech/kUSD/assignees{/user}","branches_url":"https://api.github.com/repos/kowala-tech/kUSD/branches{/branch}","tags_url":"https://api.github.com/repos/kowala-tech/kUSD/tags","blobs_url":"https://api.github.com/repos/kowala-tech/kUSD/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kowala-tech/kUSD/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kowala-tech/kUSD/git/refs{/sha}","trees_url":"https://api.github.com/repos/kowala-tech/kUSD/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kowala-tech/kUSD/statuses/{sha}","languages_url":"https://api.github.com/repos/kowala-tech/kUSD/languages","stargazers_url":"https://api.github.com/repos/kowala-tech/kUSD/stargazers","contributors_url":"https://api.github.com/repos/kowala-tech/kUSD/contributors","subscribers_url":"https://api.github.com/repos/kowala-tech/kUSD/subscribers","subscription_url":"https://api.github.com/repos/kowala-tech/kUSD/subscription","commits_url":"https://api.github.com/repos/kowala-tech/kUSD/commits{/sha}","git_commits_url":"https://api.github.com/repos/kowala-tech/kUSD/git/commits{/sha}","comments_url":"https://api.github.com/repos/kowala-tech/kUSD/comments{/number}","issue_comment_url":"https://api.github.com/repos/kowala-tech/kUSD/issues/comments{/number}","contents_url":"https://api.github.com/repos/kowala-tech/kUSD/contents/{+path}","compare_url":"https://api.github.com/repos/kowala-tech/kUSD/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kowala-tech/kUSD/merges","archive_url":"https://api.github.com/repos/kowala-tech/kUSD/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kowala-tech/kUSD/downloads","issues_url":"https://api.github.com/repos/kowala-tech/kUSD/issues{/number}","pulls_url":"https://api.github.com/repos/kowala-tech/kUSD/pulls{/number}","milestones_url":"https://api.github.com/repos/kowala-tech/kUSD/milestones{/number}","notifications_url":"https://api.github.com/repos/kowala-tech/kUSD/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kowala-tech/kUSD/labels{/name}","releases_url":"https://api.github.com/repos/kowala-tech/kUSD/releases{/id}","deployments_url":"https://api.github.com/repos/kowala-tech/kUSD/deployments","created_at":"2017-07-31T10:09:03Z","updated_at":"2018-03-26T11:37:12Z","pushed_at":"2018-03-26T10:46:14Z","git_url":"git://github.com/kowala-tech/kUSD.git","ssh_url":"git@github.com:kowala-tech/kUSD.git","clone_url":"https://github.com/kowala-tech/kUSD.git","svn_url":"https://github.com/kowala-tech/kUSD","homepage":null,"size":52741,"stargazers_count":10,"watchers_count":10,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":59,"license":null,"forks":4,"open_issues":59,"watchers":10,"default_branch":"dev"}},"base":{"label":"kowala-tech:dev","ref":"dev","sha":"1290327377b412c9905296846a0bb2542f006a22","user":{"login":"kowala-tech","id":29745494,"avatar_url":"https://avatars0.githubusercontent.com/u/29745494?v=4","gravatar_id":"","url":"https://api.github.com/users/kowala-tech","html_url":"https://github.com/kowala-tech","followers_url":"https://api.github.com/users/kowala-tech/followers","following_url":"https://api.github.com/users/kowala-tech/following{/other_user}","gists_url":"https://api.github.com/users/kowala-tech/gists{/gist_id}","starred_url":"https://api.github.com/users/kowala-tech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kowala-tech/subscriptions","organizations_url":"https://api.github.com/users/kowala-tech/orgs","repos_url":"https://api.github.com/users/kowala-tech/repos","events_url":"https://api.github.com/users/kowala-tech/events{/privacy}","received_events_url":"https://api.github.com/users/kowala-tech/received_events","type":"Organization","site_admin":false},"repo":{"id":98875571,"name":"kUSD","full_name":"kowala-tech/kUSD","owner":{"login":"kowala-tech","id":29745494,"avatar_url":"https://avatars0.githubusercontent.com/u/29745494?v=4","gravatar_id":"","url":"https://api.github.com/users/kowala-tech","html_url":"https://github.com/kowala-tech","followers_url":"https://api.github.com/users/kowala-tech/followers","following_url":"https://api.github.com/users/kowala-tech/following{/other_user}","gists_url":"https://api.github.com/users/kowala-tech/gists{/gist_id}","starred_url":"https://api.github.com/users/kowala-tech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kowala-tech/subscriptions","organizations_url":"https://api.github.com/users/kowala-tech/orgs","repos_url":"https://api.github.com/users/kowala-tech/repos","events_url":"https://api.github.com/users/kowala-tech/events{/privacy}","received_events_url":"https://api.github.com/users/kowala-tech/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kowala-tech/kUSD","description":"A stable cryptocurrency, algorithmically pegged to $1 USD using the Kowala Protocol","fork":false,"url":"https://api.github.com/repos/kowala-tech/kUSD","forks_url":"https://api.github.com/repos/kowala-tech/kUSD/forks","keys_url":"https://api.github.com/repos/kowala-tech/kUSD/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kowala-tech/kUSD/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kowala-tech/kUSD/teams","hooks_url":"https://api.github.com/repos/kowala-tech/kUSD/hooks","issue_events_url":"https://api.github.com/repos/kowala-tech/kUSD/issues/events{/number}","events_url":"https://api.github.com/repos/kowala-tech/kUSD/events","assignees_url":"https://api.github.com/repos/kowala-tech/kUSD/assignees{/user}","branches_url":"https://api.github.com/repos/kowala-tech/kUSD/branches{/branch}","tags_url":"https://api.github.com/repos/kowala-tech/kUSD/tags","blobs_url":"https://api.github.com/repos/kowala-tech/kUSD/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kowala-tech/kUSD/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kowala-tech/kUSD/git/refs{/sha}","trees_url":"https://api.github.com/repos/kowala-tech/kUSD/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kowala-tech/kUSD/statuses/{sha}","languages_url":"https://api.github.com/repos/kowala-tech/kUSD/languages","stargazers_url":"https://api.github.com/repos/kowala-tech/kUSD/stargazers","contributors_url":"https://api.github.com/repos/kowala-tech/kUSD/contributors","subscribers_url":"https://api.github.com/repos/kowala-tech/kUSD/subscribers","subscription_url":"https://api.github.com/repos/kowala-tech/kUSD/subscription","commits_url":"https://api.github.com/repos/kowala-tech/kUSD/commits{/sha}","git_commits_url":"https://api.github.com/repos/kowala-tech/kUSD/git/commits{/sha}","comments_url":"https://api.github.com/repos/kowala-tech/kUSD/comments{/number}","issue_comment_url":"https://api.github.com/repos/kowala-tech/kUSD/issues/comments{/number}","contents_url":"https://api.github.com/repos/kowala-tech/kUSD/contents/{+path}","compare_url":"https://api.github.com/repos/kowala-tech/kUSD/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kowala-tech/kUSD/merges","archive_url":"https://api.github.com/repos/kowala-tech/kUSD/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kowala-tech/kUSD/downloads","issues_url":"https://api.github.com/repos/kowala-tech/kUSD/issues{/number}","pulls_url":"https://api.github.com/repos/kowala-tech/kUSD/pulls{/number}","milestones_url":"https://api.github.com/repos/kowala-tech/kUSD/milestones{/number}","notifications_url":"https://api.github.com/repos/kowala-tech/kUSD/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kowala-tech/kUSD/labels{/name}","releases_url":"https://api.github.com/repos/kowala-tech/kUSD/releases{/id}","deployments_url":"https://api.github.com/repos/kowala-tech/kUSD/deployments","created_at":"2017-07-31T10:09:03Z","updated_at":"2018-03-26T11:37:12Z","pushed_at":"2018-03-26T10:46:14Z","git_url":"git://github.com/kowala-tech/kUSD.git","ssh_url":"git@github.com:kowala-tech/kUSD.git","clone_url":"https://github.com/kowala-tech/kUSD.git","svn_url":"https://github.com/kowala-tech/kUSD","homepage":null,"size":52741,"stargazers_count":10,"watchers_count":10,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":59,"license":null,"forks":4,"open_issues":59,"watchers":10,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/kowala-tech/kUSD/pulls/161"},"html":{"href":"https://github.com/kowala-tech/kUSD/pull/161"},"issue":{"href":"https://api.github.com/repos/kowala-tech/kUSD/issues/161"},"comments":{"href":"https://api.github.com/repos/kowala-tech/kUSD/issues/161/comments"},"review_comments":{"href":"https://api.github.com/repos/kowala-tech/kUSD/pulls/161/comments"},"review_comment":{"href":"https://api.github.com/repos/kowala-tech/kUSD/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kowala-tech/kUSD/pulls/161/commits"},"statuses":{"href":"https://api.github.com/repos/kowala-tech/kUSD/statuses/0c3a346694015e3bea93ec408f2e8ee1365b3ed6"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"acroca"}}