{"action":"created","comment":{"url":"https://api.github.com/repos/ethereum/go-ethereum/pulls/comments/43028354","id":43028354,"diff_hunk":"@@ -14,12 +14,33 @@\n // You should have received a copy of the GNU Lesser General Public License\n // along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.\n \n-package types\n+package core\n \n-import \"github.com/ethereum/go-ethereum/core/vm\"\n+import \"math/big\"\n \n-type BlockProcessor interface {\n-\tProcess(*Block) (vm.Logs, Receipts, error)\n-\tValidateHeader(*Header, bool, bool) error\n-\tValidateHeaderWithParent(*Header, *Header, bool, bool) error\n+// GasPool tracks the amount of gas available during\n+// execution of the transactions in a block.\n+// The zero value is a pool with zero gas available.\n+type GasPool big.Int\n+\n+// AddGas makes gas available for execution.","path":"core/gaspool.go","position":19,"original_position":19,"commit_id":"3422277bf63c5eecb80b6835ed2facf177cf7d4a","original_commit_id":"3422277bf63c5eecb80b6835ed2facf177cf7d4a","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":"Both `AddGas` and `SubGas` modify the receiver. `AddGas` returns itself.","created_at":"2015-10-26T17:53:13Z","updated_at":"2015-10-26T17:53:13Z","html_url":"https://github.com/ethereum/go-ethereum/pull/1917#discussion_r43028354","pull_request_url":"https://api.github.com/repos/ethereum/go-ethereum/pulls/1917","_links":{"self":{"href":"https://api.github.com/repos/ethereum/go-ethereum/pulls/comments/43028354"},"html":{"href":"https://github.com/ethereum/go-ethereum/pull/1917#discussion_r43028354"},"pull_request":{"href":"https://api.github.com/repos/ethereum/go-ethereum/pulls/1917"}}},"pull_request":{"url":"https://api.github.com/repos/ethereum/go-ethereum/pulls/1917","id":48139706,"html_url":"https://github.com/ethereum/go-ethereum/pull/1917","diff_url":"https://github.com/ethereum/go-ethereum/pull/1917.diff","patch_url":"https://github.com/ethereum/go-ethereum/pull/1917.patch","issue_url":"https://api.github.com/repos/ethereum/go-ethereum/issues/1917","number":1917,"state":"open","locked":false,"title":"core, eth, rpc: split out block validator and state processor","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 removes the burden on a single object to take care of all\r\nvalidation and state processing. Now instead the validation is done by\r\nthe `core.BlockValidator` (`core.Validator`) that takes care of both\r\nheader and uncle validation through the `ValidateBlock` method and state\r\nvalidation through the `ValidateState` method. The state processing is\r\ndone by a new object `core.StateProcessor` (`core.Processor`) and\r\naccepts a new state as input and uses that to process the given block's\r\ntransactions (and uncles for rewords) to calculate the state root for\r\nthe next block (P_n + 1).\r\n\r\nChanged all `blockchain_test`s to no longer rely directly on the `BlockValidator`.\r\n\r\n[1] partially implements https://github.com/ethereum/go-ethereum/issues/1916","created_at":"2015-10-19T23:24:41Z","updated_at":"2015-10-26T17:53:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"57271ef7b02da73de0963dfb5949b467b43f67f5","assignee":null,"milestone":{"url":"https://api.github.com/repos/ethereum/go-ethereum/milestones/21","html_url":"https://github.com/ethereum/go-ethereum/milestones/Refactor","labels_url":"https://api.github.com/repos/ethereum/go-ethereum/milestones/21/labels","id":1301898,"number":21,"title":"Refactor","description":"Generic refactoring milestone","creator":{"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},"open_issues":2,"closed_issues":2,"state":"open","created_at":"2015-09-11T22:29:07Z","updated_at":"2015-10-19T23:24:53Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/ethereum/go-ethereum/pulls/1917/commits","review_comments_url":"https://api.github.com/repos/ethereum/go-ethereum/pulls/1917/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/1917/comments","statuses_url":"https://api.github.com/repos/ethereum/go-ethereum/statuses/3422277bf63c5eecb80b6835ed2facf177cf7d4a","head":{"label":"obscuren:validator-interface","ref":"validator-interface","sha":"3422277bf63c5eecb80b6835ed2facf177cf7d4a","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}","created_at":"2015-04-20T19:55:44Z","updated_at":"2015-09-30T14:09:14Z","pushed_at":"2015-10-23T23:44:18Z","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":49806,"stargazers_count":1,"watchers_count":1,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":1,"default_branch":"develop"}},"base":{"label":"ethereum:develop","ref":"develop","sha":"c43db8a2ee99df6649d017772e1eb70cc9842c6c","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 golang 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}","created_at":"2013-12-26T13:05:46Z","updated_at":"2015-10-26T15:25:02Z","pushed_at":"2015-10-26T11:37:05Z","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":"http://ethereum.github.io/go-ethereum/","size":83160,"stargazers_count":684,"watchers_count":684,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":232,"mirror_url":null,"open_issues_count":119,"forks":232,"open_issues":119,"watchers":684,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ethereum/go-ethereum/pulls/1917"},"html":{"href":"https://github.com/ethereum/go-ethereum/pull/1917"},"issue":{"href":"https://api.github.com/repos/ethereum/go-ethereum/issues/1917"},"comments":{"href":"https://api.github.com/repos/ethereum/go-ethereum/issues/1917/comments"},"review_comments":{"href":"https://api.github.com/repos/ethereum/go-ethereum/pulls/1917/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/1917/commits"},"statuses":{"href":"https://api.github.com/repos/ethereum/go-ethereum/statuses/3422277bf63c5eecb80b6835ed2facf177cf7d4a"}}}}