{"action":"created","comment":{"url":"https://api.github.com/repos/ethereum/go-ethereum/pulls/comments/46723131","id":46723131,"diff_hunk":"@@ -529,10 +529,11 @@ func opCreate(instr instruction, pc *uint64, env Environment, contract *Contract\n \t\tdataGas.Mul(dataGas, params.CreateDataGas)\n \t\tif contract.UseGas(dataGas) {\n \t\t\tenv.Db().SetCode(addr, ret)\n+\t\t\tstack.push(addr.Big())\n+\t\t} else if params.IsHomestead(env.BlockNumber()) {\n+\t\t\tenv.Db().Delete(addr)\n+\t\t\tstack.push(new(big.Int))\n \t\t}","path":"core/vm/instructions.go","position":8,"original_position":8,"commit_id":"70916a4f35f857c7c72d84d7d5413ce39a8adbbd","original_commit_id":"70916a4f35f857c7c72d84d7d5413ce39a8adbbd","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":"I believe you're missing a case here; `contract.UseGas(dataGas) == false` and not homestead. Before this commit; that case still pushed address to stack. As I read it right now, you will fail to push the address for pre-homestead contract creation failures. \r\nI think it should be something like this:\r\n\r\n\t\tstack.push(addr.Big())\r\n\t}\r\n\telse \r\n\t{\r\n\t\tif params.IsHomestead(env.BlockNumber()) {\r\n\t\t\tenv.Db().Delete(addr)\r\n\t\t\tstack.push(new(big.Int))\r\n\t\t}else{\t\t\t\r\n\t\t\tstack.push(addr.Big)\r\n\t\t}\r\n\t}\r\n","created_at":"2015-12-04T19:41:05Z","updated_at":"2015-12-04T19:41:05Z","html_url":"https://github.com/ethereum/go-ethereum/pull/2027#discussion_r46723131","pull_request_url":"https://api.github.com/repos/ethereum/go-ethereum/pulls/2027","_links":{"self":{"href":"https://api.github.com/repos/ethereum/go-ethereum/pulls/comments/46723131"},"html":{"href":"https://github.com/ethereum/go-ethereum/pull/2027#discussion_r46723131"},"pull_request":{"href":"https://api.github.com/repos/ethereum/go-ethereum/pulls/2027"}}},"pull_request":{"url":"https://api.github.com/repos/ethereum/go-ethereum/pulls/2027","id":52246873,"html_url":"https://github.com/ethereum/go-ethereum/pull/2027","diff_url":"https://github.com/ethereum/go-ethereum/pull/2027.diff","patch_url":"https://github.com/ethereum/go-ethereum/pull/2027.patch","issue_url":"https://api.github.com/repos/ethereum/go-ethereum/issues/2027","number":2027,"state":"open","locked":false,"title":"parmas, crypto, core, core/vm: homestead consensus protocol changes","user":{"login":"Gustav-Simonsson","id":293096,"avatar_url":"https://avatars.githubusercontent.com/u/293096?v=3","gravatar_id":"","url":"https://api.github.com/users/Gustav-Simonsson","html_url":"https://github.com/Gustav-Simonsson","followers_url":"https://api.github.com/users/Gustav-Simonsson/followers","following_url":"https://api.github.com/users/Gustav-Simonsson/following{/other_user}","gists_url":"https://api.github.com/users/Gustav-Simonsson/gists{/gist_id}","starred_url":"https://api.github.com/users/Gustav-Simonsson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gustav-Simonsson/subscriptions","organizations_url":"https://api.github.com/users/Gustav-Simonsson/orgs","repos_url":"https://api.github.com/users/Gustav-Simonsson/repos","events_url":"https://api.github.com/users/Gustav-Simonsson/events{/privacy}","received_events_url":"https://api.github.com/users/Gustav-Simonsson/received_events","type":"User","site_admin":false},"body":"**WIP!**\r\n**Changes likely after common tests are ready. Until then, many tests will fail as they expect the current Frontier protocol.**\r\n**Exact homestead block number is yet to be configured once we have community consensus.**\r\n\r\nhttps://github.com/ethereum/EIPs/blob/master/EIPS/eip-2.mediawiki\r\n\r\n* change gas cost for contract creating txs\r\n* invalidate signature with s value greater than secp256k1 N / 2\r\n* OOG contract creation if not enough gas to store code\r\n* new difficulty adjustment algorithm","created_at":"2015-12-01T11:34:51Z","updated_at":"2015-12-04T19:41:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"835fe7d42156442b468637208d56d2f555ce01d8","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ethereum/go-ethereum/pulls/2027/commits","review_comments_url":"https://api.github.com/repos/ethereum/go-ethereum/pulls/2027/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/2027/comments","statuses_url":"https://api.github.com/repos/ethereum/go-ethereum/statuses/70916a4f35f857c7c72d84d7d5413ce39a8adbbd","head":{"label":"Gustav-Simonsson:homestead_hard_fork","ref":"homestead_hard_fork","sha":"70916a4f35f857c7c72d84d7d5413ce39a8adbbd","user":{"login":"Gustav-Simonsson","id":293096,"avatar_url":"https://avatars.githubusercontent.com/u/293096?v=3","gravatar_id":"","url":"https://api.github.com/users/Gustav-Simonsson","html_url":"https://github.com/Gustav-Simonsson","followers_url":"https://api.github.com/users/Gustav-Simonsson/followers","following_url":"https://api.github.com/users/Gustav-Simonsson/following{/other_user}","gists_url":"https://api.github.com/users/Gustav-Simonsson/gists{/gist_id}","starred_url":"https://api.github.com/users/Gustav-Simonsson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gustav-Simonsson/subscriptions","organizations_url":"https://api.github.com/users/Gustav-Simonsson/orgs","repos_url":"https://api.github.com/users/Gustav-Simonsson/repos","events_url":"https://api.github.com/users/Gustav-Simonsson/events{/privacy}","received_events_url":"https://api.github.com/users/Gustav-Simonsson/received_events","type":"User","site_admin":false},"repo":{"id":27963592,"name":"go-ethereum","full_name":"Gustav-Simonsson/go-ethereum","owner":{"login":"Gustav-Simonsson","id":293096,"avatar_url":"https://avatars.githubusercontent.com/u/293096?v=3","gravatar_id":"","url":"https://api.github.com/users/Gustav-Simonsson","html_url":"https://github.com/Gustav-Simonsson","followers_url":"https://api.github.com/users/Gustav-Simonsson/followers","following_url":"https://api.github.com/users/Gustav-Simonsson/following{/other_user}","gists_url":"https://api.github.com/users/Gustav-Simonsson/gists{/gist_id}","starred_url":"https://api.github.com/users/Gustav-Simonsson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gustav-Simonsson/subscriptions","organizations_url":"https://api.github.com/users/Gustav-Simonsson/orgs","repos_url":"https://api.github.com/users/Gustav-Simonsson/repos","events_url":"https://api.github.com/users/Gustav-Simonsson/events{/privacy}","received_events_url":"https://api.github.com/users/Gustav-Simonsson/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Gustav-Simonsson/go-ethereum","description":"Ethereum Go - Mist (Ether Browser)","fork":true,"url":"https://api.github.com/repos/Gustav-Simonsson/go-ethereum","forks_url":"https://api.github.com/repos/Gustav-Simonsson/go-ethereum/forks","keys_url":"https://api.github.com/repos/Gustav-Simonsson/go-ethereum/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Gustav-Simonsson/go-ethereum/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Gustav-Simonsson/go-ethereum/teams","hooks_url":"https://api.github.com/repos/Gustav-Simonsson/go-ethereum/hooks","issue_events_url":"https://api.github.com/repos/Gustav-Simonsson/go-ethereum/issues/events{/number}","events_url":"https://api.github.com/repos/Gustav-Simonsson/go-ethereum/events","assignees_url":"https://api.github.com/repos/Gustav-Simonsson/go-ethereum/assignees{/user}","branches_url":"https://api.github.com/repos/Gustav-Simonsson/go-ethereum/branches{/branch}","tags_url":"https://api.github.com/repos/Gustav-Simonsson/go-ethereum/tags","blobs_url":"https://api.github.com/repos/Gustav-Simonsson/go-ethereum/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Gustav-Simonsson/go-ethereum/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Gustav-Simonsson/go-ethereum/git/refs{/sha}","trees_url":"https://api.github.com/repos/Gustav-Simonsson/go-ethereum/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Gustav-Simonsson/go-ethereum/statuses/{sha}","languages_url":"https://api.github.com/repos/Gustav-Simonsson/go-ethereum/languages","stargazers_url":"https://api.github.com/repos/Gustav-Simonsson/go-ethereum/stargazers","contributors_url":"https://api.github.com/repos/Gustav-Simonsson/go-ethereum/contributors","subscribers_url":"https://api.github.com/repos/Gustav-Simonsson/go-ethereum/subscribers","subscription_url":"https://api.github.com/repos/Gustav-Simonsson/go-ethereum/subscription","commits_url":"https://api.github.com/repos/Gustav-Simonsson/go-ethereum/commits{/sha}","git_commits_url":"https://api.github.com/repos/Gustav-Simonsson/go-ethereum/git/commits{/sha}","comments_url":"https://api.github.com/repos/Gustav-Simonsson/go-ethereum/comments{/number}","issue_comment_url":"https://api.github.com/repos/Gustav-Simonsson/go-ethereum/issues/comments{/number}","contents_url":"https://api.github.com/repos/Gustav-Simonsson/go-ethereum/contents/{+path}","compare_url":"https://api.github.com/repos/Gustav-Simonsson/go-ethereum/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Gustav-Simonsson/go-ethereum/merges","archive_url":"https://api.github.com/repos/Gustav-Simonsson/go-ethereum/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Gustav-Simonsson/go-ethereum/downloads","issues_url":"https://api.github.com/repos/Gustav-Simonsson/go-ethereum/issues{/number}","pulls_url":"https://api.github.com/repos/Gustav-Simonsson/go-ethereum/pulls{/number}","milestones_url":"https://api.github.com/repos/Gustav-Simonsson/go-ethereum/milestones{/number}","notifications_url":"https://api.github.com/repos/Gustav-Simonsson/go-ethereum/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Gustav-Simonsson/go-ethereum/labels{/name}","releases_url":"https://api.github.com/repos/Gustav-Simonsson/go-ethereum/releases{/id}","created_at":"2014-12-13T14:48:30Z","updated_at":"2015-01-19T23:50:05Z","pushed_at":"2015-12-01T11:34:29Z","git_url":"git://github.com/Gustav-Simonsson/go-ethereum.git","ssh_url":"git@github.com:Gustav-Simonsson/go-ethereum.git","clone_url":"https://github.com/Gustav-Simonsson/go-ethereum.git","svn_url":"https://github.com/Gustav-Simonsson/go-ethereum","homepage":"","size":49506,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"ethereum:develop","ref":"develop","sha":"96d86740a1d27d548cba4fffd22d3b85a6975c4d","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-12-04T19:04:20Z","pushed_at":"2015-12-04T18:32:45Z","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":64035,"stargazers_count":753,"watchers_count":753,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":256,"mirror_url":null,"open_issues_count":144,"forks":256,"open_issues":144,"watchers":753,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ethereum/go-ethereum/pulls/2027"},"html":{"href":"https://github.com/ethereum/go-ethereum/pull/2027"},"issue":{"href":"https://api.github.com/repos/ethereum/go-ethereum/issues/2027"},"comments":{"href":"https://api.github.com/repos/ethereum/go-ethereum/issues/2027/comments"},"review_comments":{"href":"https://api.github.com/repos/ethereum/go-ethereum/pulls/2027/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/2027/commits"},"statuses":{"href":"https://api.github.com/repos/ethereum/go-ethereum/statuses/70916a4f35f857c7c72d84d7d5413ce39a8adbbd"}}}}