{"action":"opened","number":1,"pull_request":{"url":"https://api.github.com/repos/storj/storj-contracts/pulls/1","id":191593423,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkxNTkzNDIz","html_url":"https://github.com/storj/storj-contracts/pull/1","diff_url":"https://github.com/storj/storj-contracts/pull/1.diff","patch_url":"https://github.com/storj/storj-contracts/pull/1.patch","issue_url":"https://api.github.com/repos/storj/storj-contracts/issues/1","number":1,"state":"open","locked":false,"title":"Multisend contract for cheaper and faster payouts","user":{"login":"littleskunk","id":6333390,"node_id":"MDQ6VXNlcjYzMzMzOTA=","avatar_url":"https://avatars0.githubusercontent.com/u/6333390?v=4","gravatar_id":"","url":"https://api.github.com/users/littleskunk","html_url":"https://github.com/littleskunk","followers_url":"https://api.github.com/users/littleskunk/followers","following_url":"https://api.github.com/users/littleskunk/following{/other_user}","gists_url":"https://api.github.com/users/littleskunk/gists{/gist_id}","starred_url":"https://api.github.com/users/littleskunk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/littleskunk/subscriptions","organizations_url":"https://api.github.com/users/littleskunk/orgs","repos_url":"https://api.github.com/users/littleskunk/repos","events_url":"https://api.github.com/users/littleskunk/events{/privacy}","received_events_url":"https://api.github.com/users/littleskunk/received_events","type":"User","site_admin":false},"body":"This contract can handle ~150 payouts with a single multisend transaction. The gas cost depends on the history of each address. \r\n\r\nWorst case 32,000 gas per address:\r\nhttps://ropsten.etherscan.io/tx/0x4761c5611605c551c8b1afce01f3ff3963a317b9c1e60ebb1897608a9050c6ee\r\n\r\nBest case 17,600 gas per address:\r\nhttps://ropsten.etherscan.io/tx/0x1791da53fd2a6904d9e5f8184602910d8c2994d9c6bb4d505c015664e579010d\r\n\r\nIn both cases it should be half the cost we would pay with 150 single transactions. The payout process should need only half the time that way.\r\n\r\nNote:\r\nThe contract will pay 0 payouts. A simple if statement to skip them will cost ~15,000 gas even if there is nothing to skip. Throwing an error message is even more expensive. It is cheaper to make sure we never send 0 payouts to the contract.\r\n\r\nAt the moment the gas limit 8M. If we spend 1 wei more than the block average the miner will include a complete 8M transaction and ignore even the transaction with higher gas price. However that would mean we stop all other Ethereum transactions for a few hours. This will trigger a higher gas price. A better target would be a 4M transaction. Add 10 farmer, calculate gas cost, add the next 10 farmer until the gas price is higher than 4M. Call it and verify the return code. If the return code is false the transaction will faile and we should not send. Most likely the contract was running out of tokens.","created_at":"2018-05-30T22:02:36Z","updated_at":"2018-05-30T22:02:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/storj/storj-contracts/pulls/1/commits","review_comments_url":"https://api.github.com/repos/storj/storj-contracts/pulls/1/comments","review_comment_url":"https://api.github.com/repos/storj/storj-contracts/pulls/comments{/number}","comments_url":"https://api.github.com/repos/storj/storj-contracts/issues/1/comments","statuses_url":"https://api.github.com/repos/storj/storj-contracts/statuses/849ce0ebd94156fc65795d1f7e010ff592a697c0","head":{"label":"littleskunk:master","ref":"master","sha":"849ce0ebd94156fc65795d1f7e010ff592a697c0","user":{"login":"littleskunk","id":6333390,"node_id":"MDQ6VXNlcjYzMzMzOTA=","avatar_url":"https://avatars0.githubusercontent.com/u/6333390?v=4","gravatar_id":"","url":"https://api.github.com/users/littleskunk","html_url":"https://github.com/littleskunk","followers_url":"https://api.github.com/users/littleskunk/followers","following_url":"https://api.github.com/users/littleskunk/following{/other_user}","gists_url":"https://api.github.com/users/littleskunk/gists{/gist_id}","starred_url":"https://api.github.com/users/littleskunk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/littleskunk/subscriptions","organizations_url":"https://api.github.com/users/littleskunk/orgs","repos_url":"https://api.github.com/users/littleskunk/repos","events_url":"https://api.github.com/users/littleskunk/events{/privacy}","received_events_url":"https://api.github.com/users/littleskunk/received_events","type":"User","site_admin":false},"repo":{"id":135500219,"node_id":"MDEwOlJlcG9zaXRvcnkxMzU1MDAyMTk=","name":"storj-contracts","full_name":"littleskunk/storj-contracts","owner":{"login":"littleskunk","id":6333390,"node_id":"MDQ6VXNlcjYzMzMzOTA=","avatar_url":"https://avatars0.githubusercontent.com/u/6333390?v=4","gravatar_id":"","url":"https://api.github.com/users/littleskunk","html_url":"https://github.com/littleskunk","followers_url":"https://api.github.com/users/littleskunk/followers","following_url":"https://api.github.com/users/littleskunk/following{/other_user}","gists_url":"https://api.github.com/users/littleskunk/gists{/gist_id}","starred_url":"https://api.github.com/users/littleskunk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/littleskunk/subscriptions","organizations_url":"https://api.github.com/users/littleskunk/orgs","repos_url":"https://api.github.com/users/littleskunk/repos","events_url":"https://api.github.com/users/littleskunk/events{/privacy}","received_events_url":"https://api.github.com/users/littleskunk/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/littleskunk/storj-contracts","description":null,"fork":true,"url":"https://api.github.com/repos/littleskunk/storj-contracts","forks_url":"https://api.github.com/repos/littleskunk/storj-contracts/forks","keys_url":"https://api.github.com/repos/littleskunk/storj-contracts/keys{/key_id}","collaborators_url":"https://api.github.com/repos/littleskunk/storj-contracts/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/littleskunk/storj-contracts/teams","hooks_url":"https://api.github.com/repos/littleskunk/storj-contracts/hooks","issue_events_url":"https://api.github.com/repos/littleskunk/storj-contracts/issues/events{/number}","events_url":"https://api.github.com/repos/littleskunk/storj-contracts/events","assignees_url":"https://api.github.com/repos/littleskunk/storj-contracts/assignees{/user}","branches_url":"https://api.github.com/repos/littleskunk/storj-contracts/branches{/branch}","tags_url":"https://api.github.com/repos/littleskunk/storj-contracts/tags","blobs_url":"https://api.github.com/repos/littleskunk/storj-contracts/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/littleskunk/storj-contracts/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/littleskunk/storj-contracts/git/refs{/sha}","trees_url":"https://api.github.com/repos/littleskunk/storj-contracts/git/trees{/sha}","statuses_url":"https://api.github.com/repos/littleskunk/storj-contracts/statuses/{sha}","languages_url":"https://api.github.com/repos/littleskunk/storj-contracts/languages","stargazers_url":"https://api.github.com/repos/littleskunk/storj-contracts/stargazers","contributors_url":"https://api.github.com/repos/littleskunk/storj-contracts/contributors","subscribers_url":"https://api.github.com/repos/littleskunk/storj-contracts/subscribers","subscription_url":"https://api.github.com/repos/littleskunk/storj-contracts/subscription","commits_url":"https://api.github.com/repos/littleskunk/storj-contracts/commits{/sha}","git_commits_url":"https://api.github.com/repos/littleskunk/storj-contracts/git/commits{/sha}","comments_url":"https://api.github.com/repos/littleskunk/storj-contracts/comments{/number}","issue_comment_url":"https://api.github.com/repos/littleskunk/storj-contracts/issues/comments{/number}","contents_url":"https://api.github.com/repos/littleskunk/storj-contracts/contents/{+path}","compare_url":"https://api.github.com/repos/littleskunk/storj-contracts/compare/{base}...{head}","merges_url":"https://api.github.com/repos/littleskunk/storj-contracts/merges","archive_url":"https://api.github.com/repos/littleskunk/storj-contracts/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/littleskunk/storj-contracts/downloads","issues_url":"https://api.github.com/repos/littleskunk/storj-contracts/issues{/number}","pulls_url":"https://api.github.com/repos/littleskunk/storj-contracts/pulls{/number}","milestones_url":"https://api.github.com/repos/littleskunk/storj-contracts/milestones{/number}","notifications_url":"https://api.github.com/repos/littleskunk/storj-contracts/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/littleskunk/storj-contracts/labels{/name}","releases_url":"https://api.github.com/repos/littleskunk/storj-contracts/releases{/id}","deployments_url":"https://api.github.com/repos/littleskunk/storj-contracts/deployments","created_at":"2018-05-30T21:38:31Z","updated_at":"2018-05-30T21:43:11Z","pushed_at":"2018-05-30T21:43:09Z","git_url":"git://github.com/littleskunk/storj-contracts.git","ssh_url":"git@github.com:littleskunk/storj-contracts.git","clone_url":"https://github.com/littleskunk/storj-contracts.git","svn_url":"https://github.com/littleskunk/storj-contracts","homepage":null,"size":59,"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,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"storj:master","ref":"master","sha":"d5b09ed4adbbaced0830cf22ee596857605143ba","user":{"login":"storj","id":6308081,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYzMDgwODE=","avatar_url":"https://avatars3.githubusercontent.com/u/6308081?v=4","gravatar_id":"","url":"https://api.github.com/users/storj","html_url":"https://github.com/storj","followers_url":"https://api.github.com/users/storj/followers","following_url":"https://api.github.com/users/storj/following{/other_user}","gists_url":"https://api.github.com/users/storj/gists{/gist_id}","starred_url":"https://api.github.com/users/storj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/storj/subscriptions","organizations_url":"https://api.github.com/users/storj/orgs","repos_url":"https://api.github.com/users/storj/repos","events_url":"https://api.github.com/users/storj/events{/privacy}","received_events_url":"https://api.github.com/users/storj/received_events","type":"Organization","site_admin":false},"repo":{"id":90190013,"node_id":"MDEwOlJlcG9zaXRvcnk5MDE5MDAxMw==","name":"storj-contracts","full_name":"storj/storj-contracts","owner":{"login":"storj","id":6308081,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYzMDgwODE=","avatar_url":"https://avatars3.githubusercontent.com/u/6308081?v=4","gravatar_id":"","url":"https://api.github.com/users/storj","html_url":"https://github.com/storj","followers_url":"https://api.github.com/users/storj/followers","following_url":"https://api.github.com/users/storj/following{/other_user}","gists_url":"https://api.github.com/users/storj/gists{/gist_id}","starred_url":"https://api.github.com/users/storj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/storj/subscriptions","organizations_url":"https://api.github.com/users/storj/orgs","repos_url":"https://api.github.com/users/storj/repos","events_url":"https://api.github.com/users/storj/events{/privacy}","received_events_url":"https://api.github.com/users/storj/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/storj/storj-contracts","description":null,"fork":false,"url":"https://api.github.com/repos/storj/storj-contracts","forks_url":"https://api.github.com/repos/storj/storj-contracts/forks","keys_url":"https://api.github.com/repos/storj/storj-contracts/keys{/key_id}","collaborators_url":"https://api.github.com/repos/storj/storj-contracts/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/storj/storj-contracts/teams","hooks_url":"https://api.github.com/repos/storj/storj-contracts/hooks","issue_events_url":"https://api.github.com/repos/storj/storj-contracts/issues/events{/number}","events_url":"https://api.github.com/repos/storj/storj-contracts/events","assignees_url":"https://api.github.com/repos/storj/storj-contracts/assignees{/user}","branches_url":"https://api.github.com/repos/storj/storj-contracts/branches{/branch}","tags_url":"https://api.github.com/repos/storj/storj-contracts/tags","blobs_url":"https://api.github.com/repos/storj/storj-contracts/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/storj/storj-contracts/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/storj/storj-contracts/git/refs{/sha}","trees_url":"https://api.github.com/repos/storj/storj-contracts/git/trees{/sha}","statuses_url":"https://api.github.com/repos/storj/storj-contracts/statuses/{sha}","languages_url":"https://api.github.com/repos/storj/storj-contracts/languages","stargazers_url":"https://api.github.com/repos/storj/storj-contracts/stargazers","contributors_url":"https://api.github.com/repos/storj/storj-contracts/contributors","subscribers_url":"https://api.github.com/repos/storj/storj-contracts/subscribers","subscription_url":"https://api.github.com/repos/storj/storj-contracts/subscription","commits_url":"https://api.github.com/repos/storj/storj-contracts/commits{/sha}","git_commits_url":"https://api.github.com/repos/storj/storj-contracts/git/commits{/sha}","comments_url":"https://api.github.com/repos/storj/storj-contracts/comments{/number}","issue_comment_url":"https://api.github.com/repos/storj/storj-contracts/issues/comments{/number}","contents_url":"https://api.github.com/repos/storj/storj-contracts/contents/{+path}","compare_url":"https://api.github.com/repos/storj/storj-contracts/compare/{base}...{head}","merges_url":"https://api.github.com/repos/storj/storj-contracts/merges","archive_url":"https://api.github.com/repos/storj/storj-contracts/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/storj/storj-contracts/downloads","issues_url":"https://api.github.com/repos/storj/storj-contracts/issues{/number}","pulls_url":"https://api.github.com/repos/storj/storj-contracts/pulls{/number}","milestones_url":"https://api.github.com/repos/storj/storj-contracts/milestones{/number}","notifications_url":"https://api.github.com/repos/storj/storj-contracts/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/storj/storj-contracts/labels{/name}","releases_url":"https://api.github.com/repos/storj/storj-contracts/releases{/id}","deployments_url":"https://api.github.com/repos/storj/storj-contracts/deployments","created_at":"2017-05-03T20:21:07Z","updated_at":"2018-03-23T08:06:19Z","pushed_at":"2018-01-30T20:54:20Z","git_url":"git://github.com/storj/storj-contracts.git","ssh_url":"git@github.com:storj/storj-contracts.git","clone_url":"https://github.com/storj/storj-contracts.git","svn_url":"https://github.com/storj/storj-contracts","homepage":null,"size":59,"stargazers_count":11,"watchers_count":11,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":9,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":9,"open_issues":1,"watchers":11,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/storj/storj-contracts/pulls/1"},"html":{"href":"https://github.com/storj/storj-contracts/pull/1"},"issue":{"href":"https://api.github.com/repos/storj/storj-contracts/issues/1"},"comments":{"href":"https://api.github.com/repos/storj/storj-contracts/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/storj/storj-contracts/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/storj/storj-contracts/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/storj/storj-contracts/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/storj/storj-contracts/statuses/849ce0ebd94156fc65795d1f7e010ff592a697c0"}},"author_association":"COLLABORATOR","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":1,"additions":60,"deletions":0,"changed_files":1}}
{"actor":{"display_login":"littleskunk"}}