{"action":"opened","number":338,"pull_request":{"url":"https://api.github.com/repos/ETCDEVTeam/sputnikvm/pulls/338","id":209583927,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA5NTgzOTI3","html_url":"https://github.com/ETCDEVTeam/sputnikvm/pull/338","diff_url":"https://github.com/ETCDEVTeam/sputnikvm/pull/338.diff","patch_url":"https://github.com/ETCDEVTeam/sputnikvm/pull/338.patch","issue_url":"https://api.github.com/repos/ETCDEVTeam/sputnikvm/issues/338","number":338,"state":"open","locked":false,"title":"Needs Discussion: fix balance check failing tests","user":{"login":"mersinvald","id":8722061,"node_id":"MDQ6VXNlcjg3MjIwNjE=","avatar_url":"https://avatars1.githubusercontent.com/u/8722061?v=4","gravatar_id":"","url":"https://api.github.com/users/mersinvald","html_url":"https://github.com/mersinvald","followers_url":"https://api.github.com/users/mersinvald/followers","following_url":"https://api.github.com/users/mersinvald/following{/other_user}","gists_url":"https://api.github.com/users/mersinvald/gists{/gist_id}","starred_url":"https://api.github.com/users/mersinvald/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mersinvald/subscriptions","organizations_url":"https://api.github.com/users/mersinvald/orgs","repos_url":"https://api.github.com/users/mersinvald/repos","events_url":"https://api.github.com/users/mersinvald/events{/privacy}","received_events_url":"https://api.github.com/users/mersinvald/received_events","type":"User","site_admin":false},"body":"There was a problem with tests changed in this PR: balance check was failing, though that's not right and SputnikVM behavior is correct.\r\n\r\nHere's an explanation we found with @whilei:\r\n\r\n1) Balance check fails due to the transfer from `Caller` to `Created` addresses that's happening in SputnikVM on `CREATE` call (where the transfered amount of `Ether` is the `value` passed to `CREATE` opcode)\r\n\r\nMore on that here: https://github.com/ethereum/wiki/wiki/Subtleties#other-operations  \r\n> The CREATE opcode takes three values: value (ie. initial amount of ether), memory start and memory length, and pushes onto the stack the address of the new contract\r\n\r\nIntuitively, if ether is added to created address it should be drained from the caller.\r\n\r\n2) In `geth` there's no balance transfer taking place in `VMTests`, according to the `env` flag `skipTransfer` that's being set for all `VMTests`:\r\n\r\nhttps://github.com/ethereumproject/go-ethereum/blob/8a3bc2d4f050df752dc9d071c2ef416e035d0216/tests/vm_test_util.go#L224\r\n\r\nhttps://github.com/ethereumproject/go-ethereum/blob/8a3bc2d4f050df752dc9d071c2ef416e035d0216/tests/util.go#L291\r\n\r\nSo while these tests are valid for `geth`, as no transfer is happening, they're not for `SputnikVM`, where VM handles the transfer in both test builds and release builds.\r\n\r\nBased on that, I would like to hear out your opinions on which approach should we chose in `Sputnik` to get that issue resolved:\r\n1) Just fix the tests as it's done in attached commit\r\n2) Introduce a similar `skipTransfer` field in the `Patch` and set it to `true` for testing purposes\r\n\r\nAs far as I can see, the first approach has a significant downside, as we'd need to patch the tests after every `geth` VMTests update in the `Sputnik`\r\n\r\ncc @splix @r8d8 @darcyreno ","created_at":"2018-08-20T16:59:44Z","updated_at":"2018-08-20T16:59:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":{"login":"mersinvald","id":8722061,"node_id":"MDQ6VXNlcjg3MjIwNjE=","avatar_url":"https://avatars1.githubusercontent.com/u/8722061?v=4","gravatar_id":"","url":"https://api.github.com/users/mersinvald","html_url":"https://github.com/mersinvald","followers_url":"https://api.github.com/users/mersinvald/followers","following_url":"https://api.github.com/users/mersinvald/following{/other_user}","gists_url":"https://api.github.com/users/mersinvald/gists{/gist_id}","starred_url":"https://api.github.com/users/mersinvald/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mersinvald/subscriptions","organizations_url":"https://api.github.com/users/mersinvald/orgs","repos_url":"https://api.github.com/users/mersinvald/repos","events_url":"https://api.github.com/users/mersinvald/events{/privacy}","received_events_url":"https://api.github.com/users/mersinvald/received_events","type":"User","site_admin":false},"assignees":[{"login":"mersinvald","id":8722061,"node_id":"MDQ6VXNlcjg3MjIwNjE=","avatar_url":"https://avatars1.githubusercontent.com/u/8722061?v=4","gravatar_id":"","url":"https://api.github.com/users/mersinvald","html_url":"https://github.com/mersinvald","followers_url":"https://api.github.com/users/mersinvald/followers","following_url":"https://api.github.com/users/mersinvald/following{/other_user}","gists_url":"https://api.github.com/users/mersinvald/gists{/gist_id}","starred_url":"https://api.github.com/users/mersinvald/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mersinvald/subscriptions","organizations_url":"https://api.github.com/users/mersinvald/orgs","repos_url":"https://api.github.com/users/mersinvald/repos","events_url":"https://api.github.com/users/mersinvald/events{/privacy}","received_events_url":"https://api.github.com/users/mersinvald/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/ETCDEVTeam/sputnikvm/pulls/338/commits","review_comments_url":"https://api.github.com/repos/ETCDEVTeam/sputnikvm/pulls/338/comments","review_comment_url":"https://api.github.com/repos/ETCDEVTeam/sputnikvm/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ETCDEVTeam/sputnikvm/issues/338/comments","statuses_url":"https://api.github.com/repos/ETCDEVTeam/sputnikvm/statuses/f2bdcb39e98f74b9ccfee12702344a53afaf87b6","head":{"label":"ETCDEVTeam:needs-discussion-fix-failing-balance-check-tests","ref":"needs-discussion-fix-failing-balance-check-tests","sha":"f2bdcb39e98f74b9ccfee12702344a53afaf87b6","user":{"login":"ETCDEVTeam","id":26304684,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI2MzA0Njg0","avatar_url":"https://avatars2.githubusercontent.com/u/26304684?v=4","gravatar_id":"","url":"https://api.github.com/users/ETCDEVTeam","html_url":"https://github.com/ETCDEVTeam","followers_url":"https://api.github.com/users/ETCDEVTeam/followers","following_url":"https://api.github.com/users/ETCDEVTeam/following{/other_user}","gists_url":"https://api.github.com/users/ETCDEVTeam/gists{/gist_id}","starred_url":"https://api.github.com/users/ETCDEVTeam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ETCDEVTeam/subscriptions","organizations_url":"https://api.github.com/users/ETCDEVTeam/orgs","repos_url":"https://api.github.com/users/ETCDEVTeam/repos","events_url":"https://api.github.com/users/ETCDEVTeam/events{/privacy}","received_events_url":"https://api.github.com/users/ETCDEVTeam/received_events","type":"Organization","site_admin":false},"repo":{"id":86829446,"node_id":"MDEwOlJlcG9zaXRvcnk4NjgyOTQ0Ng==","name":"sputnikvm","full_name":"ETCDEVTeam/sputnikvm","owner":{"login":"ETCDEVTeam","id":26304684,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI2MzA0Njg0","avatar_url":"https://avatars2.githubusercontent.com/u/26304684?v=4","gravatar_id":"","url":"https://api.github.com/users/ETCDEVTeam","html_url":"https://github.com/ETCDEVTeam","followers_url":"https://api.github.com/users/ETCDEVTeam/followers","following_url":"https://api.github.com/users/ETCDEVTeam/following{/other_user}","gists_url":"https://api.github.com/users/ETCDEVTeam/gists{/gist_id}","starred_url":"https://api.github.com/users/ETCDEVTeam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ETCDEVTeam/subscriptions","organizations_url":"https://api.github.com/users/ETCDEVTeam/orgs","repos_url":"https://api.github.com/users/ETCDEVTeam/repos","events_url":"https://api.github.com/users/ETCDEVTeam/events{/privacy}","received_events_url":"https://api.github.com/users/ETCDEVTeam/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ETCDEVTeam/sputnikvm","description":"A Blockchain Virtual Machine","fork":false,"url":"https://api.github.com/repos/ETCDEVTeam/sputnikvm","forks_url":"https://api.github.com/repos/ETCDEVTeam/sputnikvm/forks","keys_url":"https://api.github.com/repos/ETCDEVTeam/sputnikvm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ETCDEVTeam/sputnikvm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ETCDEVTeam/sputnikvm/teams","hooks_url":"https://api.github.com/repos/ETCDEVTeam/sputnikvm/hooks","issue_events_url":"https://api.github.com/repos/ETCDEVTeam/sputnikvm/issues/events{/number}","events_url":"https://api.github.com/repos/ETCDEVTeam/sputnikvm/events","assignees_url":"https://api.github.com/repos/ETCDEVTeam/sputnikvm/assignees{/user}","branches_url":"https://api.github.com/repos/ETCDEVTeam/sputnikvm/branches{/branch}","tags_url":"https://api.github.com/repos/ETCDEVTeam/sputnikvm/tags","blobs_url":"https://api.github.com/repos/ETCDEVTeam/sputnikvm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ETCDEVTeam/sputnikvm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ETCDEVTeam/sputnikvm/git/refs{/sha}","trees_url":"https://api.github.com/repos/ETCDEVTeam/sputnikvm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ETCDEVTeam/sputnikvm/statuses/{sha}","languages_url":"https://api.github.com/repos/ETCDEVTeam/sputnikvm/languages","stargazers_url":"https://api.github.com/repos/ETCDEVTeam/sputnikvm/stargazers","contributors_url":"https://api.github.com/repos/ETCDEVTeam/sputnikvm/contributors","subscribers_url":"https://api.github.com/repos/ETCDEVTeam/sputnikvm/subscribers","subscription_url":"https://api.github.com/repos/ETCDEVTeam/sputnikvm/subscription","commits_url":"https://api.github.com/repos/ETCDEVTeam/sputnikvm/commits{/sha}","git_commits_url":"https://api.github.com/repos/ETCDEVTeam/sputnikvm/git/commits{/sha}","comments_url":"https://api.github.com/repos/ETCDEVTeam/sputnikvm/comments{/number}","issue_comment_url":"https://api.github.com/repos/ETCDEVTeam/sputnikvm/issues/comments{/number}","contents_url":"https://api.github.com/repos/ETCDEVTeam/sputnikvm/contents/{+path}","compare_url":"https://api.github.com/repos/ETCDEVTeam/sputnikvm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ETCDEVTeam/sputnikvm/merges","archive_url":"https://api.github.com/repos/ETCDEVTeam/sputnikvm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ETCDEVTeam/sputnikvm/downloads","issues_url":"https://api.github.com/repos/ETCDEVTeam/sputnikvm/issues{/number}","pulls_url":"https://api.github.com/repos/ETCDEVTeam/sputnikvm/pulls{/number}","milestones_url":"https://api.github.com/repos/ETCDEVTeam/sputnikvm/milestones{/number}","notifications_url":"https://api.github.com/repos/ETCDEVTeam/sputnikvm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ETCDEVTeam/sputnikvm/labels{/name}","releases_url":"https://api.github.com/repos/ETCDEVTeam/sputnikvm/releases{/id}","deployments_url":"https://api.github.com/repos/ETCDEVTeam/sputnikvm/deployments","created_at":"2017-03-31T14:42:38Z","updated_at":"2018-08-11T06:56:41Z","pushed_at":"2018-08-20T16:45:24Z","git_url":"git://github.com/ETCDEVTeam/sputnikvm.git","ssh_url":"git@github.com:ETCDEVTeam/sputnikvm.git","clone_url":"https://github.com/ETCDEVTeam/sputnikvm.git","svn_url":"https://github.com/ETCDEVTeam/sputnikvm","homepage":"","size":5959,"stargazers_count":162,"watchers_count":162,"language":"Rust","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":29,"mirror_url":null,"archived":false,"open_issues_count":16,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":29,"open_issues":16,"watchers":162,"default_branch":"master"}},"base":{"label":"ETCDEVTeam:update-tests","ref":"update-tests","sha":"95e2dce07955410cd2652cbf67c8acf4b464ad5e","user":{"login":"ETCDEVTeam","id":26304684,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI2MzA0Njg0","avatar_url":"https://avatars2.githubusercontent.com/u/26304684?v=4","gravatar_id":"","url":"https://api.github.com/users/ETCDEVTeam","html_url":"https://github.com/ETCDEVTeam","followers_url":"https://api.github.com/users/ETCDEVTeam/followers","following_url":"https://api.github.com/users/ETCDEVTeam/following{/other_user}","gists_url":"https://api.github.com/users/ETCDEVTeam/gists{/gist_id}","starred_url":"https://api.github.com/users/ETCDEVTeam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ETCDEVTeam/subscriptions","organizations_url":"https://api.github.com/users/ETCDEVTeam/orgs","repos_url":"https://api.github.com/users/ETCDEVTeam/repos","events_url":"https://api.github.com/users/ETCDEVTeam/events{/privacy}","received_events_url":"https://api.github.com/users/ETCDEVTeam/received_events","type":"Organization","site_admin":false},"repo":{"id":86829446,"node_id":"MDEwOlJlcG9zaXRvcnk4NjgyOTQ0Ng==","name":"sputnikvm","full_name":"ETCDEVTeam/sputnikvm","owner":{"login":"ETCDEVTeam","id":26304684,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI2MzA0Njg0","avatar_url":"https://avatars2.githubusercontent.com/u/26304684?v=4","gravatar_id":"","url":"https://api.github.com/users/ETCDEVTeam","html_url":"https://github.com/ETCDEVTeam","followers_url":"https://api.github.com/users/ETCDEVTeam/followers","following_url":"https://api.github.com/users/ETCDEVTeam/following{/other_user}","gists_url":"https://api.github.com/users/ETCDEVTeam/gists{/gist_id}","starred_url":"https://api.github.com/users/ETCDEVTeam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ETCDEVTeam/subscriptions","organizations_url":"https://api.github.com/users/ETCDEVTeam/orgs","repos_url":"https://api.github.com/users/ETCDEVTeam/repos","events_url":"https://api.github.com/users/ETCDEVTeam/events{/privacy}","received_events_url":"https://api.github.com/users/ETCDEVTeam/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ETCDEVTeam/sputnikvm","description":"A Blockchain Virtual Machine","fork":false,"url":"https://api.github.com/repos/ETCDEVTeam/sputnikvm","forks_url":"https://api.github.com/repos/ETCDEVTeam/sputnikvm/forks","keys_url":"https://api.github.com/repos/ETCDEVTeam/sputnikvm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ETCDEVTeam/sputnikvm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ETCDEVTeam/sputnikvm/teams","hooks_url":"https://api.github.com/repos/ETCDEVTeam/sputnikvm/hooks","issue_events_url":"https://api.github.com/repos/ETCDEVTeam/sputnikvm/issues/events{/number}","events_url":"https://api.github.com/repos/ETCDEVTeam/sputnikvm/events","assignees_url":"https://api.github.com/repos/ETCDEVTeam/sputnikvm/assignees{/user}","branches_url":"https://api.github.com/repos/ETCDEVTeam/sputnikvm/branches{/branch}","tags_url":"https://api.github.com/repos/ETCDEVTeam/sputnikvm/tags","blobs_url":"https://api.github.com/repos/ETCDEVTeam/sputnikvm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ETCDEVTeam/sputnikvm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ETCDEVTeam/sputnikvm/git/refs{/sha}","trees_url":"https://api.github.com/repos/ETCDEVTeam/sputnikvm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ETCDEVTeam/sputnikvm/statuses/{sha}","languages_url":"https://api.github.com/repos/ETCDEVTeam/sputnikvm/languages","stargazers_url":"https://api.github.com/repos/ETCDEVTeam/sputnikvm/stargazers","contributors_url":"https://api.github.com/repos/ETCDEVTeam/sputnikvm/contributors","subscribers_url":"https://api.github.com/repos/ETCDEVTeam/sputnikvm/subscribers","subscription_url":"https://api.github.com/repos/ETCDEVTeam/sputnikvm/subscription","commits_url":"https://api.github.com/repos/ETCDEVTeam/sputnikvm/commits{/sha}","git_commits_url":"https://api.github.com/repos/ETCDEVTeam/sputnikvm/git/commits{/sha}","comments_url":"https://api.github.com/repos/ETCDEVTeam/sputnikvm/comments{/number}","issue_comment_url":"https://api.github.com/repos/ETCDEVTeam/sputnikvm/issues/comments{/number}","contents_url":"https://api.github.com/repos/ETCDEVTeam/sputnikvm/contents/{+path}","compare_url":"https://api.github.com/repos/ETCDEVTeam/sputnikvm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ETCDEVTeam/sputnikvm/merges","archive_url":"https://api.github.com/repos/ETCDEVTeam/sputnikvm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ETCDEVTeam/sputnikvm/downloads","issues_url":"https://api.github.com/repos/ETCDEVTeam/sputnikvm/issues{/number}","pulls_url":"https://api.github.com/repos/ETCDEVTeam/sputnikvm/pulls{/number}","milestones_url":"https://api.github.com/repos/ETCDEVTeam/sputnikvm/milestones{/number}","notifications_url":"https://api.github.com/repos/ETCDEVTeam/sputnikvm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ETCDEVTeam/sputnikvm/labels{/name}","releases_url":"https://api.github.com/repos/ETCDEVTeam/sputnikvm/releases{/id}","deployments_url":"https://api.github.com/repos/ETCDEVTeam/sputnikvm/deployments","created_at":"2017-03-31T14:42:38Z","updated_at":"2018-08-11T06:56:41Z","pushed_at":"2018-08-20T16:45:24Z","git_url":"git://github.com/ETCDEVTeam/sputnikvm.git","ssh_url":"git@github.com:ETCDEVTeam/sputnikvm.git","clone_url":"https://github.com/ETCDEVTeam/sputnikvm.git","svn_url":"https://github.com/ETCDEVTeam/sputnikvm","homepage":"","size":5959,"stargazers_count":162,"watchers_count":162,"language":"Rust","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":29,"mirror_url":null,"archived":false,"open_issues_count":16,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":29,"open_issues":16,"watchers":162,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ETCDEVTeam/sputnikvm/pulls/338"},"html":{"href":"https://github.com/ETCDEVTeam/sputnikvm/pull/338"},"issue":{"href":"https://api.github.com/repos/ETCDEVTeam/sputnikvm/issues/338"},"comments":{"href":"https://api.github.com/repos/ETCDEVTeam/sputnikvm/issues/338/comments"},"review_comments":{"href":"https://api.github.com/repos/ETCDEVTeam/sputnikvm/pulls/338/comments"},"review_comment":{"href":"https://api.github.com/repos/ETCDEVTeam/sputnikvm/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ETCDEVTeam/sputnikvm/pulls/338/commits"},"statuses":{"href":"https://api.github.com/repos/ETCDEVTeam/sputnikvm/statuses/f2bdcb39e98f74b9ccfee12702344a53afaf87b6"}},"author_association":"MEMBER","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":1,"additions":3,"deletions":3,"changed_files":1}}
{"actor":{"display_login":"mersinvald"}}