{"action":"created","comment":{"url":"https://api.github.com/repos/ethereum/go-ethereum/pulls/comments/97270814","pull_request_review_id":17873867,"id":97270814,"diff_hunk":"@@ -0,0 +1,25 @@\n+package math\n+\n+import gmath \"math\"\n+\n+/*\n+ * NOTE: The following methods need to be optimised using either bit checking or asm\n+ */\n+\n+// IsMinSafe returns whether the subtraction is safe and does not overflow.\n+func SafeSub(x, y uint64) (uint64, bool) {\n+\treturn x - y, x < y\n+}\n+\n+// IsAddSafe returns whether the addition is safe and does not overflow.\n+func SafeAdd(x, y uint64) (uint64, bool) {\n+\treturn x + y, y > gmath.MaxUint64-x\n+}\n+\n+// IsAddSafe returns whether the multiplication is safe and does not overflow.","path":"common/math/integer.go","position":19,"original_position":19,"commit_id":"a48b4016f789fbdd9a29df705c7a924524deb70f","original_commit_id":"915348c5c163a04df216d98e97eb50e9ec64d186","user":{"login":"holiman","id":142290,"avatar_url":"https://avatars.githubusercontent.com/u/142290?v=3","gravatar_id":"","url":"https://api.github.com/users/holiman","html_url":"https://github.com/holiman","followers_url":"https://api.github.com/users/holiman/followers","following_url":"https://api.github.com/users/holiman/following{/other_user}","gists_url":"https://api.github.com/users/holiman/gists{/gist_id}","starred_url":"https://api.github.com/users/holiman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/holiman/subscriptions","organizations_url":"https://api.github.com/users/holiman/orgs","repos_url":"https://api.github.com/users/holiman/repos","events_url":"https://api.github.com/users/holiman/events{/privacy}","received_events_url":"https://api.github.com/users/holiman/received_events","type":"User","site_admin":false},"body":"> // IsAddSafe returns whether the multiplication is safe and does not overflow.\r\n\r\nShould be\r\n\r\n// SafeMul returns multiplication result and whether overflow occurred.","created_at":"2017-01-23T08:35:00Z","updated_at":"2017-01-23T08:36:57Z","html_url":"https://github.com/ethereum/go-ethereum/pull/3514#discussion_r97270814","pull_request_url":"https://api.github.com/repos/ethereum/go-ethereum/pulls/3514","_links":{"self":{"href":"https://api.github.com/repos/ethereum/go-ethereum/pulls/comments/97270814"},"html":{"href":"https://github.com/ethereum/go-ethereum/pull/3514#discussion_r97270814"},"pull_request":{"href":"https://api.github.com/repos/ethereum/go-ethereum/pulls/3514"}}},"pull_request":{"url":"https://api.github.com/repos/ethereum/go-ethereum/pulls/3514","id":100171886,"html_url":"https://github.com/ethereum/go-ethereum/pull/3514","diff_url":"https://github.com/ethereum/go-ethereum/pull/3514.diff","patch_url":"https://github.com/ethereum/go-ethereum/pull/3514.patch","issue_url":"https://api.github.com/repos/ethereum/go-ethereum/issues/3514","number":3514,"state":"open","locked":false,"title":"core/vm: 64 bit gas instructions","user":{"login":"obscuren","id":6264126,"avatar_url":"https://avatars.githubusercontent.com/u/6264126?v=3","gravatar_id":"","url":"https://api.github.com/users/obscuren","html_url":"https://github.com/obscuren","followers_url":"https://api.github.com/users/obscuren/followers","following_url":"https://api.github.com/users/obscuren/following{/other_user}","gists_url":"https://api.github.com/users/obscuren/gists{/gist_id}","starred_url":"https://api.github.com/users/obscuren/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/obscuren/subscriptions","organizations_url":"https://api.github.com/users/obscuren/orgs","repos_url":"https://api.github.com/users/obscuren/repos","events_url":"https://api.github.com/users/obscuren/events{/privacy}","received_events_url":"https://api.github.com/users/obscuren/received_events","type":"User","site_admin":false},"body":"This PR changes all gas instructions from `*big.Int` to `uint64`, a new theoretical limit.\r\n\r\nIt also implements a new `*big.Int` instruction pool, which contains reusable `*big.Int`s. Instructions found in `core/vm/instructions.go` do no longer initialise new `big.Int`s but instead call `intPool.Get()` returning either a reusable integer -- **beware** this may contain an old value -- or `new(big.Int)` if the pool is empty. I've decided to implement my own pool instead of using the `sync.Pool` because I do not require a thread safe pool and I do not want the typecasting overhead required with the `sync.Pool. ","created_at":"2017-01-04T19:18:24Z","updated_at":"2017-01-23T08:36:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"471505352f0d452e467a8e31b22d11b6a819f3c0","assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/ethereum/go-ethereum/milestones/45","html_url":"https://github.com/ethereum/go-ethereum/milestone/45","labels_url":"https://api.github.com/repos/ethereum/go-ethereum/milestones/45/labels","id":2254297,"number":45,"title":"1.5.8","description":"","creator":{"login":"karalabe","id":129561,"avatar_url":"https://avatars.githubusercontent.com/u/129561?v=3","gravatar_id":"","url":"https://api.github.com/users/karalabe","html_url":"https://github.com/karalabe","followers_url":"https://api.github.com/users/karalabe/followers","following_url":"https://api.github.com/users/karalabe/following{/other_user}","gists_url":"https://api.github.com/users/karalabe/gists{/gist_id}","starred_url":"https://api.github.com/users/karalabe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karalabe/subscriptions","organizations_url":"https://api.github.com/users/karalabe/orgs","repos_url":"https://api.github.com/users/karalabe/repos","events_url":"https://api.github.com/users/karalabe/events{/privacy}","received_events_url":"https://api.github.com/users/karalabe/received_events","type":"User","site_admin":false},"open_issues":17,"closed_issues":10,"state":"open","created_at":"2017-01-16T10:02:50Z","updated_at":"2017-01-22T22:28:48Z","due_on":"2017-01-30T08:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/ethereum/go-ethereum/pulls/3514/commits","review_comments_url":"https://api.github.com/repos/ethereum/go-ethereum/pulls/3514/comments","review_comment_url":"https://api.github.com/repos/ethereum/go-ethereum/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ethereum/go-ethereum/issues/3514/comments","statuses_url":"https://api.github.com/repos/ethereum/go-ethereum/statuses/a48b4016f789fbdd9a29df705c7a924524deb70f","head":{"label":"obscuren:gas64","ref":"gas64","sha":"a48b4016f789fbdd9a29df705c7a924524deb70f","user":{"login":"obscuren","id":6264126,"avatar_url":"https://avatars.githubusercontent.com/u/6264126?v=3","gravatar_id":"","url":"https://api.github.com/users/obscuren","html_url":"https://github.com/obscuren","followers_url":"https://api.github.com/users/obscuren/followers","following_url":"https://api.github.com/users/obscuren/following{/other_user}","gists_url":"https://api.github.com/users/obscuren/gists{/gist_id}","starred_url":"https://api.github.com/users/obscuren/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/obscuren/subscriptions","organizations_url":"https://api.github.com/users/obscuren/orgs","repos_url":"https://api.github.com/users/obscuren/repos","events_url":"https://api.github.com/users/obscuren/events{/privacy}","received_events_url":"https://api.github.com/users/obscuren/received_events","type":"User","site_admin":false},"repo":{"id":34282926,"name":"go-ethereum","full_name":"obscuren/go-ethereum","owner":{"login":"obscuren","id":6264126,"avatar_url":"https://avatars.githubusercontent.com/u/6264126?v=3","gravatar_id":"","url":"https://api.github.com/users/obscuren","html_url":"https://github.com/obscuren","followers_url":"https://api.github.com/users/obscuren/followers","following_url":"https://api.github.com/users/obscuren/following{/other_user}","gists_url":"https://api.github.com/users/obscuren/gists{/gist_id}","starred_url":"https://api.github.com/users/obscuren/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/obscuren/subscriptions","organizations_url":"https://api.github.com/users/obscuren/orgs","repos_url":"https://api.github.com/users/obscuren/repos","events_url":"https://api.github.com/users/obscuren/events{/privacy}","received_events_url":"https://api.github.com/users/obscuren/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/obscuren/go-ethereum","description":"Jeffrey Wilcke's Go implementation of the Ethereum y/w paper","fork":true,"url":"https://api.github.com/repos/obscuren/go-ethereum","forks_url":"https://api.github.com/repos/obscuren/go-ethereum/forks","keys_url":"https://api.github.com/repos/obscuren/go-ethereum/keys{/key_id}","collaborators_url":"https://api.github.com/repos/obscuren/go-ethereum/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/obscuren/go-ethereum/teams","hooks_url":"https://api.github.com/repos/obscuren/go-ethereum/hooks","issue_events_url":"https://api.github.com/repos/obscuren/go-ethereum/issues/events{/number}","events_url":"https://api.github.com/repos/obscuren/go-ethereum/events","assignees_url":"https://api.github.com/repos/obscuren/go-ethereum/assignees{/user}","branches_url":"https://api.github.com/repos/obscuren/go-ethereum/branches{/branch}","tags_url":"https://api.github.com/repos/obscuren/go-ethereum/tags","blobs_url":"https://api.github.com/repos/obscuren/go-ethereum/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/obscuren/go-ethereum/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/obscuren/go-ethereum/git/refs{/sha}","trees_url":"https://api.github.com/repos/obscuren/go-ethereum/git/trees{/sha}","statuses_url":"https://api.github.com/repos/obscuren/go-ethereum/statuses/{sha}","languages_url":"https://api.github.com/repos/obscuren/go-ethereum/languages","stargazers_url":"https://api.github.com/repos/obscuren/go-ethereum/stargazers","contributors_url":"https://api.github.com/repos/obscuren/go-ethereum/contributors","subscribers_url":"https://api.github.com/repos/obscuren/go-ethereum/subscribers","subscription_url":"https://api.github.com/repos/obscuren/go-ethereum/subscription","commits_url":"https://api.github.com/repos/obscuren/go-ethereum/commits{/sha}","git_commits_url":"https://api.github.com/repos/obscuren/go-ethereum/git/commits{/sha}","comments_url":"https://api.github.com/repos/obscuren/go-ethereum/comments{/number}","issue_comment_url":"https://api.github.com/repos/obscuren/go-ethereum/issues/comments{/number}","contents_url":"https://api.github.com/repos/obscuren/go-ethereum/contents/{+path}","compare_url":"https://api.github.com/repos/obscuren/go-ethereum/compare/{base}...{head}","merges_url":"https://api.github.com/repos/obscuren/go-ethereum/merges","archive_url":"https://api.github.com/repos/obscuren/go-ethereum/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/obscuren/go-ethereum/downloads","issues_url":"https://api.github.com/repos/obscuren/go-ethereum/issues{/number}","pulls_url":"https://api.github.com/repos/obscuren/go-ethereum/pulls{/number}","milestones_url":"https://api.github.com/repos/obscuren/go-ethereum/milestones{/number}","notifications_url":"https://api.github.com/repos/obscuren/go-ethereum/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/obscuren/go-ethereum/labels{/name}","releases_url":"https://api.github.com/repos/obscuren/go-ethereum/releases{/id}","deployments_url":"https://api.github.com/repos/obscuren/go-ethereum/deployments","created_at":"2015-04-20T19:55:44Z","updated_at":"2016-10-27T11:03:42Z","pushed_at":"2017-01-23T08:36:40Z","git_url":"git://github.com/obscuren/go-ethereum.git","ssh_url":"git@github.com:obscuren/go-ethereum.git","clone_url":"https://github.com/obscuren/go-ethereum.git","svn_url":"https://github.com/obscuren/go-ethereum","homepage":"","size":69727,"stargazers_count":4,"watchers_count":4,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2,"mirror_url":null,"open_issues_count":4,"forks":2,"open_issues":4,"watchers":4,"default_branch":"develop"}},"base":{"label":"ethereum:master","ref":"master","sha":"f087c66f9599b0f4650ae643d3342b10a6b56c5b","user":{"login":"ethereum","id":6250754,"avatar_url":"https://avatars.githubusercontent.com/u/6250754?v=3","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":15452919,"name":"go-ethereum","full_name":"ethereum/go-ethereum","owner":{"login":"ethereum","id":6250754,"avatar_url":"https://avatars.githubusercontent.com/u/6250754?v=3","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/go-ethereum","description":"Official Go implementation of the Ethereum protocol","fork":false,"url":"https://api.github.com/repos/ethereum/go-ethereum","forks_url":"https://api.github.com/repos/ethereum/go-ethereum/forks","keys_url":"https://api.github.com/repos/ethereum/go-ethereum/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ethereum/go-ethereum/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ethereum/go-ethereum/teams","hooks_url":"https://api.github.com/repos/ethereum/go-ethereum/hooks","issue_events_url":"https://api.github.com/repos/ethereum/go-ethereum/issues/events{/number}","events_url":"https://api.github.com/repos/ethereum/go-ethereum/events","assignees_url":"https://api.github.com/repos/ethereum/go-ethereum/assignees{/user}","branches_url":"https://api.github.com/repos/ethereum/go-ethereum/branches{/branch}","tags_url":"https://api.github.com/repos/ethereum/go-ethereum/tags","blobs_url":"https://api.github.com/repos/ethereum/go-ethereum/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ethereum/go-ethereum/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ethereum/go-ethereum/git/refs{/sha}","trees_url":"https://api.github.com/repos/ethereum/go-ethereum/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ethereum/go-ethereum/statuses/{sha}","languages_url":"https://api.github.com/repos/ethereum/go-ethereum/languages","stargazers_url":"https://api.github.com/repos/ethereum/go-ethereum/stargazers","contributors_url":"https://api.github.com/repos/ethereum/go-ethereum/contributors","subscribers_url":"https://api.github.com/repos/ethereum/go-ethereum/subscribers","subscription_url":"https://api.github.com/repos/ethereum/go-ethereum/subscription","commits_url":"https://api.github.com/repos/ethereum/go-ethereum/commits{/sha}","git_commits_url":"https://api.github.com/repos/ethereum/go-ethereum/git/commits{/sha}","comments_url":"https://api.github.com/repos/ethereum/go-ethereum/comments{/number}","issue_comment_url":"https://api.github.com/repos/ethereum/go-ethereum/issues/comments{/number}","contents_url":"https://api.github.com/repos/ethereum/go-ethereum/contents/{+path}","compare_url":"https://api.github.com/repos/ethereum/go-ethereum/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ethereum/go-ethereum/merges","archive_url":"https://api.github.com/repos/ethereum/go-ethereum/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ethereum/go-ethereum/downloads","issues_url":"https://api.github.com/repos/ethereum/go-ethereum/issues{/number}","pulls_url":"https://api.github.com/repos/ethereum/go-ethereum/pulls{/number}","milestones_url":"https://api.github.com/repos/ethereum/go-ethereum/milestones{/number}","notifications_url":"https://api.github.com/repos/ethereum/go-ethereum/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ethereum/go-ethereum/labels{/name}","releases_url":"https://api.github.com/repos/ethereum/go-ethereum/releases{/id}","deployments_url":"https://api.github.com/repos/ethereum/go-ethereum/deployments","created_at":"2013-12-26T13:05:46Z","updated_at":"2017-01-23T00:41:11Z","pushed_at":"2017-01-23T08:36:42Z","git_url":"git://github.com/ethereum/go-ethereum.git","ssh_url":"git@github.com:ethereum/go-ethereum.git","clone_url":"https://github.com/ethereum/go-ethereum.git","svn_url":"https://github.com/ethereum/go-ethereum","homepage":"https://geth.ethereum.org","size":81400,"stargazers_count":2823,"watchers_count":2823,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":986,"mirror_url":null,"open_issues_count":337,"forks":986,"open_issues":337,"watchers":2823,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ethereum/go-ethereum/pulls/3514"},"html":{"href":"https://github.com/ethereum/go-ethereum/pull/3514"},"issue":{"href":"https://api.github.com/repos/ethereum/go-ethereum/issues/3514"},"comments":{"href":"https://api.github.com/repos/ethereum/go-ethereum/issues/3514/comments"},"review_comments":{"href":"https://api.github.com/repos/ethereum/go-ethereum/pulls/3514/comments"},"review_comment":{"href":"https://api.github.com/repos/ethereum/go-ethereum/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ethereum/go-ethereum/pulls/3514/commits"},"statuses":{"href":"https://api.github.com/repos/ethereum/go-ethereum/statuses/a48b4016f789fbdd9a29df705c7a924524deb70f"}}}}
{"actor":{"display_login":"holiman"}}