{"action":"opened","issue":{"url":"https://api.github.com/repos/bigchaindb/bigchaindb/issues/774","repository_url":"https://api.github.com/repos/bigchaindb/bigchaindb","labels_url":"https://api.github.com/repos/bigchaindb/bigchaindb/issues/774/labels{/name}","comments_url":"https://api.github.com/repos/bigchaindb/bigchaindb/issues/774/comments","events_url":"https://api.github.com/repos/bigchaindb/bigchaindb/issues/774/events","html_url":"https://github.com/bigchaindb/bigchaindb/issues/774","id":186336318,"number":774,"title":"Rewriting transactions from invalid block may lead to DoubleSpends","user":{"login":"sohkai","id":4166642,"avatar_url":"https://avatars.githubusercontent.com/u/4166642?v=3","gravatar_id":"","url":"https://api.github.com/users/sohkai","html_url":"https://github.com/sohkai","followers_url":"https://api.github.com/users/sohkai/followers","following_url":"https://api.github.com/users/sohkai/following{/other_user}","gists_url":"https://api.github.com/users/sohkai/gists{/gist_id}","starred_url":"https://api.github.com/users/sohkai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sohkai/subscriptions","organizations_url":"https://api.github.com/users/sohkai/orgs","repos_url":"https://api.github.com/users/sohkai/repos","events_url":"https://api.github.com/users/sohkai/events{/privacy}","received_events_url":"https://api.github.com/users/sohkai/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"rhsimplex","id":6517700,"avatar_url":"https://avatars.githubusercontent.com/u/6517700?v=3","gravatar_id":"","url":"https://api.github.com/users/rhsimplex","html_url":"https://github.com/rhsimplex","followers_url":"https://api.github.com/users/rhsimplex/followers","following_url":"https://api.github.com/users/rhsimplex/following{/other_user}","gists_url":"https://api.github.com/users/rhsimplex/gists{/gist_id}","starred_url":"https://api.github.com/users/rhsimplex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhsimplex/subscriptions","organizations_url":"https://api.github.com/users/rhsimplex/orgs","repos_url":"https://api.github.com/users/rhsimplex/repos","events_url":"https://api.github.com/users/rhsimplex/events{/privacy}","received_events_url":"https://api.github.com/users/rhsimplex/received_events","type":"User","site_admin":false},"assignees":[{"login":"rhsimplex","id":6517700,"avatar_url":"https://avatars.githubusercontent.com/u/6517700?v=3","gravatar_id":"","url":"https://api.github.com/users/rhsimplex","html_url":"https://github.com/rhsimplex","followers_url":"https://api.github.com/users/rhsimplex/followers","following_url":"https://api.github.com/users/rhsimplex/following{/other_user}","gists_url":"https://api.github.com/users/rhsimplex/gists{/gist_id}","starred_url":"https://api.github.com/users/rhsimplex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhsimplex/subscriptions","organizations_url":"https://api.github.com/users/rhsimplex/orgs","repos_url":"https://api.github.com/users/rhsimplex/repos","events_url":"https://api.github.com/users/rhsimplex/events{/privacy}","received_events_url":"https://api.github.com/users/rhsimplex/received_events","type":"User","site_admin":false}],"milestone":null,"comments":0,"created_at":"2016-10-31T16:51:12Z","updated_at":"2016-10-31T16:51:12Z","closed_at":null,"body":"From @diminator in https://github.com/bigchaindb/bigchaindb/pull/614#issuecomment-250196840, who needs to update the scripts causing this issue to 0.7.0-compatible code:\r\n\r\nreproduce by:\r\n\r\n```bash\r\ngit clone git@github.com:bigchaindb/hyperchaindb.git\r\ngit checkout bug/doublespent-on-owned\r\ncd bigchaindb_workshop\r\n# virtualenv\r\npip install -e . [dev]\r\n# start bigchaindb\r\nbigchaindb start\r\n# start webserver in terminal 2 (virtualenv & cd bigchaindb_workshop)\r\npython -m backend.server\r\n# run example in terminal 3 (virtualenv & cd bigchaindb_workshop)\r\npython -m exercises.bdb.ex1_tx_create_transfer_solution\r\n```\r\n\r\nYou will now see the following output:\r\n\r\n```\r\n[2016-09-28 17:01:00 +0200] [30802] [INFO] Booting worker with pid: 30802\r\nINFO:bigchaindb.pipelines.block:Write new block 1c21b76bcf9ffa522b54f5589c9ae73b871f419ec80be7807dddc40e9b7911fb with 1 transactions\r\nINFO:bigchaindb.pipelines.block:Write new block 9baf086364c79ef20b84c5a8178d4f3f6317b6299df6ca1aa99a6608bb052488 with 1 transactions\r\nINFO:bigchaindb.pipelines.block:Write new block dd25da2c599451f7dd267291004cc01add98dae38f6060c4a76f581ecc05abae with 1 transactions\r\nINFO:bigchaindb.pipelines.election:Rewriting 1 transactions from invalid block dd25da2c599451f7dd267291004cc01add98dae38f6060c4a76f581ecc05abae\r\n```\r\n\r\nWhich means that the block was invalid and rewritten...\r\n\r\nRunning the example again (python -m exercises.bdb.ex1_tx_create_transfer_solution) yields Doublespend mania on get_owned_ids:\r\n\r\n```python\r\nTraceback (most recent call last):\r\n  File \"/usr/lib/python3.5/runpy.py\", line 184, in _run_module_as_main\r\n    \"__main__\", mod_spec)\r\n  File \"/usr/lib/python3.5/runpy.py\", line 85, in _run_code\r\n    exec(code, run_globals)\r\n  File \"/home/dimi/code_ascribe/hyperchaindb/src/github.com/hyperchaindb/bigchaindb_workshop/exercises/bdb/ex1_tx_create_transfer_solution.py\", line 28, in <module>\r\n    printd(get_tx_owned(dimi['vk']))\r\n  File \"/home/dimi/code_ascribe/hyperchaindb/src/github.com/hyperchaindb/bigchaindb_workshop/exercises/bdb/driver.py\", line 35, in get_tx_owned\r\n    return b.get_owned_ids(vk)\r\n  File \"/home/dimi/code_ascribe/hyperchaindb/src/github.com/hyperchaindb/bigchaindb_workshop/venv/lib/python3.5/site-packages/bigchaindb/core.py\", line 368, in get_owned_ids\r\n    if not self.get_spent(tx_input):\r\n  File \"/home/dimi/code_ascribe/hyperchaindb/src/github.com/hyperchaindb/bigchaindb_workshop/venv/lib/python3.5/site-packages/bigchaindb/core.py\", line 317, in get_spent\r\n    tx_input['txid']))\r\nbigchaindb.exceptions.DoubleSpend: `74bdebbb947bf9c99d7e1510e8b97ad3ba02ea74f97dfe1042a832f64d6f8984` was spent more then once. There is a problem with the chain\r\n```"}}
{"actor":{"display_login":"sohkai"}}