{"action":"created","issue":{"url":"https://api.github.com/repos/bigchaindb/bigchaindb/issues/340","repository_url":"https://api.github.com/repos/bigchaindb/bigchaindb","labels_url":"https://api.github.com/repos/bigchaindb/bigchaindb/issues/340/labels{/name}","comments_url":"https://api.github.com/repos/bigchaindb/bigchaindb/issues/340/comments","events_url":"https://api.github.com/repos/bigchaindb/bigchaindb/issues/340/events","html_url":"https://github.com/bigchaindb/bigchaindb/issues/340","id":157465177,"number":340,"title":"Remove \"operation\" from transactions: not needed","user":{"login":"ttmc","id":1210951,"avatar_url":"https://avatars.githubusercontent.com/u/1210951?v=3","gravatar_id":"","url":"https://api.github.com/users/ttmc","html_url":"https://github.com/ttmc","followers_url":"https://api.github.com/users/ttmc/followers","following_url":"https://api.github.com/users/ttmc/following{/other_user}","gists_url":"https://api.github.com/users/ttmc/gists{/gist_id}","starred_url":"https://api.github.com/users/ttmc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ttmc/subscriptions","organizations_url":"https://api.github.com/users/ttmc/orgs","repos_url":"https://api.github.com/users/ttmc/repos","events_url":"https://api.github.com/users/ttmc/events{/privacy}","received_events_url":"https://api.github.com/users/ttmc/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/bigchaindb/bigchaindb/labels/topic:%20TXS%20assets%20data","name":"topic: TXS assets data","color":"1d76db"},{"url":"https://api.github.com/repos/bigchaindb/bigchaindb/labels/when:%20In%20progress","name":"when: In progress","color":"00dd00"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-05-30T09:27:10Z","updated_at":"2016-08-10T16:41:48Z","closed_at":null,"body":"We don't need the \"operation\" (which can be \"CREATE\" or \"TRANSFER\") in the [transaction data model](http://bigchaindb.readthedocs.io/en/latest/models.html#the-transaction-model). We can already figure out if a transaction is a creation or transfer transaction by checking to see if it has any inputs. (No inputs means it's a creation transaction.)\r\n\r\nFor the most part, I think the code already uses the number of inputs to figure out the transaction operation already, so this wouldn't require much change to the code."},"comment":{"url":"https://api.github.com/repos/bigchaindb/bigchaindb/issues/comments/238926797","html_url":"https://github.com/bigchaindb/bigchaindb/issues/340#issuecomment-238926797","issue_url":"https://api.github.com/repos/bigchaindb/bigchaindb/issues/340","id":238926797,"user":{"login":"sonkesun","id":20474646,"avatar_url":"https://avatars.githubusercontent.com/u/20474646?v=3","gravatar_id":"","url":"https://api.github.com/users/sonkesun","html_url":"https://github.com/sonkesun","followers_url":"https://api.github.com/users/sonkesun/followers","following_url":"https://api.github.com/users/sonkesun/following{/other_user}","gists_url":"https://api.github.com/users/sonkesun/gists{/gist_id}","starred_url":"https://api.github.com/users/sonkesun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sonkesun/subscriptions","organizations_url":"https://api.github.com/users/sonkesun/orgs","repos_url":"https://api.github.com/users/sonkesun/repos","events_url":"https://api.github.com/users/sonkesun/events{/privacy}","received_events_url":"https://api.github.com/users/sonkesun/received_events","type":"User","site_admin":false},"created_at":"2016-08-10T16:41:48Z","updated_at":"2016-08-10T16:41:48Z","body":"One way to solve this would be to overwrite the 'CREATE' operation only for the 'GENESIS' transaction and to update the transaction id (hash) with the new hash in the prepare_genesis_block function of util.py. \r\nThe 'CREATE' and 'TRANSFER' operations can be set in create_tx depending on the input.  By doing this the operation would no longer be required for the create_transaction function and we keep the 'GENESIS' operation. What do you think?"}}
{"actor":{"display_login":"sonkesun"}}