{"action":"opened","number":1544,"pull_request":{"url":"https://api.github.com/repos/ArkEcosystem/core/pulls/1544","id":234642774,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM0NjQyNzc0","html_url":"https://github.com/ArkEcosystem/core/pull/1544","diff_url":"https://github.com/ArkEcosystem/core/pull/1544.diff","patch_url":"https://github.com/ArkEcosystem/core/pull/1544.patch","issue_url":"https://api.github.com/repos/ArkEcosystem/core/issues/1544","number":1544,"state":"open","locked":false,"title":"fix(core-transaction-pool-mem): remove checkApplyToBlockchain","user":{"login":"supaiku0","id":1311798,"node_id":"MDQ6VXNlcjEzMTE3OTg=","avatar_url":"https://avatars2.githubusercontent.com/u/1311798?v=4","gravatar_id":"","url":"https://api.github.com/users/supaiku0","html_url":"https://github.com/supaiku0","followers_url":"https://api.github.com/users/supaiku0/followers","following_url":"https://api.github.com/users/supaiku0/following{/other_user}","gists_url":"https://api.github.com/users/supaiku0/gists{/gist_id}","starred_url":"https://api.github.com/users/supaiku0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/supaiku0/subscriptions","organizations_url":"https://api.github.com/users/supaiku0/orgs","repos_url":"https://api.github.com/users/supaiku0/repos","events_url":"https://api.github.com/users/supaiku0/events{/privacy}","received_events_url":"https://api.github.com/users/supaiku0/received_events","type":"User","site_admin":false},"body":"## Proposed changes\r\n<!--\r\nDescribe the big picture of your changes here to communicate to the maintainers why we should accept this pull request. If it fixes a bug or resolves a feature request, be sure to link to that issue.\r\n-->\r\nThis check makes no sense, as it breaks in the following scenario:\r\n\r\n```\r\nWallet B is initially empty, both TX are unconfirmed an got accepted by the mem pool:\r\nTX1: A sends 5 ARK to B\r\nTX2: B sends 5 ARK to C\r\n```\r\nworks fine on paper. But now a forger wants to forge a block and calls `getTransactionsForForging`.\r\nBoth transactions are checked individually against the blockchain wallet manager.\r\n```\r\nA.canApply(TX1) => true\r\nB.canApply(TX2) => false, since B has no balance as TX1 is unconfirmed\r\nB gets purged, TX2 is removed\r\n```\r\nWe forge a block without TX2.\r\n\r\nNow we receive a block with TX2, call `acceptChainedBlock` and it can't find TX2 in the mem pool, so it tries to apply it => it fails again. We just purged B, so the wallet has a balance of 0.\r\n\r\n## Types of changes\r\n<!--\r\nWhat types of changes does your code introduce?\r\n_Put an `x` in the boxes that apply and remove the rest of them: keep this PR as concise, but descriptive, as possible.._\r\n-->\r\n\r\n- [X] Bugfix (non-breaking change which fixes an issue)\r\n- [ ] New feature (non-breaking change which adds functionality)\r\n- [ ] Refactoring (improve a current implementation without adding a new feature or fixing a bug)\r\n- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)\r\n- [ ] Build (changes that affect the build system)\r\n- [ ] Docs (documentation only changes)\r\n- [ ] Test (adding missing tests or fixing existing tests)\r\n- [ ] Other... Please describe:\r\n\r\n## Checklist\r\n<!--\r\n_Put an `x` in the boxes that apply and remove this text and the rest of them. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code._\r\n-->\r\n\r\n- [ ] I have read the [CONTRIBUTING](https://docs.ark.io/developers/guidelines/contributing.html) documentation\r\n- [ ] Lint and unit tests pass locally with my changes\r\n- [ ] I have added tests that prove my fix is effective or that my feature works\r\n- [ ] I have added necessary documentation (if appropriate)\r\n<!--\r\n\r\n## Further comments\r\n\r\nIf this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...\r\n-->\r\n","created_at":"2018-11-29T13:44:32Z","updated_at":"2018-11-29T13:44:32Z","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/ArkEcosystem/core/pulls/1544/commits","review_comments_url":"https://api.github.com/repos/ArkEcosystem/core/pulls/1544/comments","review_comment_url":"https://api.github.com/repos/ArkEcosystem/core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ArkEcosystem/core/issues/1544/comments","statuses_url":"https://api.github.com/repos/ArkEcosystem/core/statuses/ad637ba5d93206d10d2d6d98244fdf0bc991fd6e","head":{"label":"supaiku0:remove-check-apply-blockchain","ref":"remove-check-apply-blockchain","sha":"ad637ba5d93206d10d2d6d98244fdf0bc991fd6e","user":{"login":"supaiku0","id":1311798,"node_id":"MDQ6VXNlcjEzMTE3OTg=","avatar_url":"https://avatars2.githubusercontent.com/u/1311798?v=4","gravatar_id":"","url":"https://api.github.com/users/supaiku0","html_url":"https://github.com/supaiku0","followers_url":"https://api.github.com/users/supaiku0/followers","following_url":"https://api.github.com/users/supaiku0/following{/other_user}","gists_url":"https://api.github.com/users/supaiku0/gists{/gist_id}","starred_url":"https://api.github.com/users/supaiku0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/supaiku0/subscriptions","organizations_url":"https://api.github.com/users/supaiku0/orgs","repos_url":"https://api.github.com/users/supaiku0/repos","events_url":"https://api.github.com/users/supaiku0/events{/privacy}","received_events_url":"https://api.github.com/users/supaiku0/received_events","type":"User","site_admin":false},"repo":{"id":138334989,"node_id":"MDEwOlJlcG9zaXRvcnkxMzgzMzQ5ODk=","name":"core","full_name":"supaiku0/core","private":false,"owner":{"login":"supaiku0","id":1311798,"node_id":"MDQ6VXNlcjEzMTE3OTg=","avatar_url":"https://avatars2.githubusercontent.com/u/1311798?v=4","gravatar_id":"","url":"https://api.github.com/users/supaiku0","html_url":"https://github.com/supaiku0","followers_url":"https://api.github.com/users/supaiku0/followers","following_url":"https://api.github.com/users/supaiku0/following{/other_user}","gists_url":"https://api.github.com/users/supaiku0/gists{/gist_id}","starred_url":"https://api.github.com/users/supaiku0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/supaiku0/subscriptions","organizations_url":"https://api.github.com/users/supaiku0/orgs","repos_url":"https://api.github.com/users/supaiku0/repos","events_url":"https://api.github.com/users/supaiku0/events{/privacy}","received_events_url":"https://api.github.com/users/supaiku0/received_events","type":"User","site_admin":false},"html_url":"https://github.com/supaiku0/core","description":"The WP of Blockchains :fireworks:","fork":true,"url":"https://api.github.com/repos/supaiku0/core","forks_url":"https://api.github.com/repos/supaiku0/core/forks","keys_url":"https://api.github.com/repos/supaiku0/core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/supaiku0/core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/supaiku0/core/teams","hooks_url":"https://api.github.com/repos/supaiku0/core/hooks","issue_events_url":"https://api.github.com/repos/supaiku0/core/issues/events{/number}","events_url":"https://api.github.com/repos/supaiku0/core/events","assignees_url":"https://api.github.com/repos/supaiku0/core/assignees{/user}","branches_url":"https://api.github.com/repos/supaiku0/core/branches{/branch}","tags_url":"https://api.github.com/repos/supaiku0/core/tags","blobs_url":"https://api.github.com/repos/supaiku0/core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/supaiku0/core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/supaiku0/core/git/refs{/sha}","trees_url":"https://api.github.com/repos/supaiku0/core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/supaiku0/core/statuses/{sha}","languages_url":"https://api.github.com/repos/supaiku0/core/languages","stargazers_url":"https://api.github.com/repos/supaiku0/core/stargazers","contributors_url":"https://api.github.com/repos/supaiku0/core/contributors","subscribers_url":"https://api.github.com/repos/supaiku0/core/subscribers","subscription_url":"https://api.github.com/repos/supaiku0/core/subscription","commits_url":"https://api.github.com/repos/supaiku0/core/commits{/sha}","git_commits_url":"https://api.github.com/repos/supaiku0/core/git/commits{/sha}","comments_url":"https://api.github.com/repos/supaiku0/core/comments{/number}","issue_comment_url":"https://api.github.com/repos/supaiku0/core/issues/comments{/number}","contents_url":"https://api.github.com/repos/supaiku0/core/contents/{+path}","compare_url":"https://api.github.com/repos/supaiku0/core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/supaiku0/core/merges","archive_url":"https://api.github.com/repos/supaiku0/core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/supaiku0/core/downloads","issues_url":"https://api.github.com/repos/supaiku0/core/issues{/number}","pulls_url":"https://api.github.com/repos/supaiku0/core/pulls{/number}","milestones_url":"https://api.github.com/repos/supaiku0/core/milestones{/number}","notifications_url":"https://api.github.com/repos/supaiku0/core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/supaiku0/core/labels{/name}","releases_url":"https://api.github.com/repos/supaiku0/core/releases{/id}","deployments_url":"https://api.github.com/repos/supaiku0/core/deployments","created_at":"2018-06-22T18:21:50Z","updated_at":"2018-06-22T18:21:53Z","pushed_at":"2018-11-29T13:31:20Z","git_url":"git://github.com/supaiku0/core.git","ssh_url":"git@github.com:supaiku0/core.git","clone_url":"https://github.com/supaiku0/core.git","svn_url":"https://github.com/supaiku0/core","homepage":"https://ark.io","size":11123,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ArkEcosystem:develop","ref":"develop","sha":"cc7ceb8f8cbf35192379a2fd9d5ac3e20932e0ce","user":{"login":"ArkEcosystem","id":22457396,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyNDU3Mzk2","avatar_url":"https://avatars3.githubusercontent.com/u/22457396?v=4","gravatar_id":"","url":"https://api.github.com/users/ArkEcosystem","html_url":"https://github.com/ArkEcosystem","followers_url":"https://api.github.com/users/ArkEcosystem/followers","following_url":"https://api.github.com/users/ArkEcosystem/following{/other_user}","gists_url":"https://api.github.com/users/ArkEcosystem/gists{/gist_id}","starred_url":"https://api.github.com/users/ArkEcosystem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ArkEcosystem/subscriptions","organizations_url":"https://api.github.com/users/ArkEcosystem/orgs","repos_url":"https://api.github.com/users/ArkEcosystem/repos","events_url":"https://api.github.com/users/ArkEcosystem/events{/privacy}","received_events_url":"https://api.github.com/users/ArkEcosystem/received_events","type":"Organization","site_admin":false},"repo":{"id":111684364,"node_id":"MDEwOlJlcG9zaXRvcnkxMTE2ODQzNjQ=","name":"core","full_name":"ArkEcosystem/core","private":false,"owner":{"login":"ArkEcosystem","id":22457396,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyNDU3Mzk2","avatar_url":"https://avatars3.githubusercontent.com/u/22457396?v=4","gravatar_id":"","url":"https://api.github.com/users/ArkEcosystem","html_url":"https://github.com/ArkEcosystem","followers_url":"https://api.github.com/users/ArkEcosystem/followers","following_url":"https://api.github.com/users/ArkEcosystem/following{/other_user}","gists_url":"https://api.github.com/users/ArkEcosystem/gists{/gist_id}","starred_url":"https://api.github.com/users/ArkEcosystem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ArkEcosystem/subscriptions","organizations_url":"https://api.github.com/users/ArkEcosystem/orgs","repos_url":"https://api.github.com/users/ArkEcosystem/repos","events_url":"https://api.github.com/users/ArkEcosystem/events{/privacy}","received_events_url":"https://api.github.com/users/ArkEcosystem/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/ArkEcosystem/core","description":"The Ark Blockchain :fireworks:. Check https://docs.ark.io/guidebook/ for more information.","fork":false,"url":"https://api.github.com/repos/ArkEcosystem/core","forks_url":"https://api.github.com/repos/ArkEcosystem/core/forks","keys_url":"https://api.github.com/repos/ArkEcosystem/core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ArkEcosystem/core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ArkEcosystem/core/teams","hooks_url":"https://api.github.com/repos/ArkEcosystem/core/hooks","issue_events_url":"https://api.github.com/repos/ArkEcosystem/core/issues/events{/number}","events_url":"https://api.github.com/repos/ArkEcosystem/core/events","assignees_url":"https://api.github.com/repos/ArkEcosystem/core/assignees{/user}","branches_url":"https://api.github.com/repos/ArkEcosystem/core/branches{/branch}","tags_url":"https://api.github.com/repos/ArkEcosystem/core/tags","blobs_url":"https://api.github.com/repos/ArkEcosystem/core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ArkEcosystem/core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ArkEcosystem/core/git/refs{/sha}","trees_url":"https://api.github.com/repos/ArkEcosystem/core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ArkEcosystem/core/statuses/{sha}","languages_url":"https://api.github.com/repos/ArkEcosystem/core/languages","stargazers_url":"https://api.github.com/repos/ArkEcosystem/core/stargazers","contributors_url":"https://api.github.com/repos/ArkEcosystem/core/contributors","subscribers_url":"https://api.github.com/repos/ArkEcosystem/core/subscribers","subscription_url":"https://api.github.com/repos/ArkEcosystem/core/subscription","commits_url":"https://api.github.com/repos/ArkEcosystem/core/commits{/sha}","git_commits_url":"https://api.github.com/repos/ArkEcosystem/core/git/commits{/sha}","comments_url":"https://api.github.com/repos/ArkEcosystem/core/comments{/number}","issue_comment_url":"https://api.github.com/repos/ArkEcosystem/core/issues/comments{/number}","contents_url":"https://api.github.com/repos/ArkEcosystem/core/contents/{+path}","compare_url":"https://api.github.com/repos/ArkEcosystem/core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ArkEcosystem/core/merges","archive_url":"https://api.github.com/repos/ArkEcosystem/core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ArkEcosystem/core/downloads","issues_url":"https://api.github.com/repos/ArkEcosystem/core/issues{/number}","pulls_url":"https://api.github.com/repos/ArkEcosystem/core/pulls{/number}","milestones_url":"https://api.github.com/repos/ArkEcosystem/core/milestones{/number}","notifications_url":"https://api.github.com/repos/ArkEcosystem/core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ArkEcosystem/core/labels{/name}","releases_url":"https://api.github.com/repos/ArkEcosystem/core/releases{/id}","deployments_url":"https://api.github.com/repos/ArkEcosystem/core/deployments","created_at":"2017-11-22T12:57:35Z","updated_at":"2018-11-29T08:26:10Z","pushed_at":"2018-11-29T12:33:59Z","git_url":"git://github.com/ArkEcosystem/core.git","ssh_url":"git@github.com:ArkEcosystem/core.git","clone_url":"https://github.com/ArkEcosystem/core.git","svn_url":"https://github.com/ArkEcosystem/core","homepage":"https://ark.io","size":10958,"stargazers_count":97,"watchers_count":97,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":65,"mirror_url":null,"archived":false,"open_issues_count":9,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":65,"open_issues":9,"watchers":97,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/ArkEcosystem/core/pulls/1544"},"html":{"href":"https://github.com/ArkEcosystem/core/pull/1544"},"issue":{"href":"https://api.github.com/repos/ArkEcosystem/core/issues/1544"},"comments":{"href":"https://api.github.com/repos/ArkEcosystem/core/issues/1544/comments"},"review_comments":{"href":"https://api.github.com/repos/ArkEcosystem/core/pulls/1544/comments"},"review_comment":{"href":"https://api.github.com/repos/ArkEcosystem/core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ArkEcosystem/core/pulls/1544/commits"},"statuses":{"href":"https://api.github.com/repos/ArkEcosystem/core/statuses/ad637ba5d93206d10d2d6d98244fdf0bc991fd6e"}},"author_association":"CONTRIBUTOR","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":2,"additions":2,"deletions":2,"changed_files":2}}
{"actor":{"display_login":"supaiku0"}}