{"action":"closed","issue":{"url":"https://api.github.com/repos/fyookball/electrum/issues/638","repository_url":"https://api.github.com/repos/fyookball/electrum","labels_url":"https://api.github.com/repos/fyookball/electrum/issues/638/labels{/name}","comments_url":"https://api.github.com/repos/fyookball/electrum/issues/638/comments","events_url":"https://api.github.com/repos/fyookball/electrum/issues/638/events","html_url":"https://github.com/fyookball/electrum/issues/638","id":314325874,"node_id":"MDU6SXNzdWUzMTQzMjU4NzQ=","number":638,"title":"deserialize fails","user":{"login":"awemany","id":13838274,"node_id":"MDQ6VXNlcjEzODM4Mjc0","avatar_url":"https://avatars3.githubusercontent.com/u/13838274?v=4","gravatar_id":"","url":"https://api.github.com/users/awemany","html_url":"https://github.com/awemany","followers_url":"https://api.github.com/users/awemany/followers","following_url":"https://api.github.com/users/awemany/following{/other_user}","gists_url":"https://api.github.com/users/awemany/gists{/gist_id}","starred_url":"https://api.github.com/users/awemany/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/awemany/subscriptions","organizations_url":"https://api.github.com/users/awemany/orgs","repos_url":"https://api.github.com/users/awemany/repos","events_url":"https://api.github.com/users/awemany/events{/privacy}","received_events_url":"https://api.github.com/users/awemany/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":17,"created_at":"2018-04-14T12:39:09Z","updated_at":"2018-08-24T12:35:05Z","closed_at":"2018-08-24T12:35:05Z","author_association":"NONE","body":"Hi, \r\n\r\nthe `deserialize` cmd does not seem to work for me. I started an `electron-cash` daemon as well as an `electrum` one. Electrum 3.1.2. can decode the BCH txn, though electron-cash can't. Here's my console interaction to try to decode a recent coinbase txn:\r\n```\r\nawemany@bitcoinunlimited:~/Electron Cash-3.1.6$ ./electron-cash gettransaction 147f8cff3bb64a78bd97a947cb90734c9ee4aed9002aa026f98fb39379797bfa{\r\n    \"complete\": true,\r\n    \"final\": true,\r\n    \"hex\": \"01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff2503020608184d696e656420627920416e74506f6f6c343505205ad1f03ede83000063f70100ffffffff0209e9954a000000001976a9141fefe863a7e0ddc767780ce3bedc564cf5cbda6388acfcc80200000000001976a914000000000000000000000000000000000000000088ac00000000\"\r\n}\r\nawemany@bitcoinunlimited:~/Electron Cash-3.1.6$ ./electron-cash deserialize 01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff2503020608184d696e656420627920416e74506f6f6c343505205ad1f03ede83000063f70100ffffffff0209e9954a000000001976a9141fefe863a7e0ddc767780ce3bedc564cf5cbda6388acfcc80200000000001976a914000000000000000000000000000000000000000088ac00000000\r\nServer-side error: <Fault -32603: Server error: File \"/usr/lib/python3.6/json/encoder.py\", line 180, in default | TypeError: Object of type 'bytes' is not JSON serializable\r\n>\r\nTraceback (most recent call last):\r\n  File \"/home/awemany/Electron Cash-3.1.6/packages/jsonrpclib/SimpleJSONRPCServer.py\", line 447, in do_POST\r\n    data, getattr(self, '_dispatch', None), self.path)\r\n  File \"/home/awemany/Electron Cash-3.1.6/packages/jsonrpclib/SimpleJSONRPCServer.py\", line 268, in _marshaled_dispatch\r\n    return jsonrpclib.jdumps(response, self.encoding)\r\n  File \"/home/awemany/Electron Cash-3.1.6/packages/jsonrpclib/jsonrpc.py\", line 160, in jdumps\r\n    return json.dumps(obj)\r\n  File \"/usr/lib/python3.6/json/__init__.py\", line 231, in dumps\r\n    return _default_encoder.encode(obj)\r\n  File \"/usr/lib/python3.6/json/encoder.py\", line 199, in encode\r\n    chunks = self.iterencode(o, _one_shot=True)\r\n  File \"/usr/lib/python3.6/json/encoder.py\", line 257, in iterencode\r\n    return _iterencode(o, 0)\r\n  File \"/usr/lib/python3.6/json/encoder.py\", line 180, in default\r\n    o.__class__.__name__)\r\nTypeError: Object of type 'bytes' is not JSON serializable\r\nTraceback (most recent call last):\r\n  File \"./electron-cash\", line 435, in <module>\r\n    result = server.run_cmdline(config_options)\r\n  File \"/home/awemany/Electron Cash-3.1.6/packages/jsonrpclib/jsonrpc.py\", line 650, in __call__\r\n    return self.__send(self.__name, args)\r\n  File \"/home/awemany/Electron Cash-3.1.6/packages/jsonrpclib/jsonrpc.py\", line 531, in _request\r\n    response = self._run_request(request)\r\n  File \"/home/awemany/Electron Cash-3.1.6/packages/jsonrpclib/jsonrpc.py\", line 564, in _run_request\r\n    verbose=self.__verbose\r\n  File \"/usr/lib/python3.6/xmlrpc/client.py\", line 1154, in request\r\n    return self.single_request(host, handler, request_body, verbose)\r\n  File \"/home/awemany/Electron Cash-3.1.6/packages/jsonrpclib/jsonrpc.py\", line 387, in single_request\r\n    response.msg)\r\njsonrpclib.jsonrpc.ProtocolError: ('user:XXX@127.0.0.1:34825/', 500, 'Internal Server Error', <http.client.HTTPMessage object at 0x7f650ead0048>)\r\nawemany@bitcoinunlimited:~/Electron Cash-3.1.6$ electrum deserialize 01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff2503020608184d696e656420627920416e74506f6f6c343505205ad1f03ede83000063f70100ffffffff0209e9954a000000001976a9141fefe863a7e0ddc767780ce3bedc564cf5cbda6388acfcc80200000000001976a914000000000000000000000000000000000000000088ac00000000\r\n{\r\n    \"inputs\": [\r\n        {\r\n            \"address\": null,\r\n            \"num_sig\": 0,\r\n            \"prevout_hash\": \"0000000000000000000000000000000000000000000000000000000000000000\",\r\n            \"prevout_n\": 4294967295,\r\n            \"pubkeys\": [],\r\n            \"scriptSig\": \"03020608184d696e656420627920416e74506f6f6c343505205ad1f03ede83000063f70100\",\r\n            \"sequence\": 4294967295,\r\n            \"signatures\": {},\r\n            \"type\": \"coinbase\",\r\n            \"x_pubkeys\": []\r\n        }\r\n    ],\r\n    \"lockTime\": 0,\r\n    \"outputs\": [\r\n        {\r\n            \"address\": \"13usM2ns3f466LP65EY1h8hnTBLFiJV6rD\",\r\n            \"prevout_n\": 0,\r\n            \"scriptPubKey\": \"76a9141fefe863a7e0ddc767780ce3bedc564cf5cbda6388ac\",\r\n            \"type\": 0,\r\n            \"value\": 1251338505\r\n        },\r\n        {\r\n            \"address\": \"1111111111111111111114oLvT2\",\r\n            \"prevout_n\": 1,\r\n            \"scriptPubKey\": \"76a914000000000000000000000000000000000000000088ac\",\r\n            \"type\": 0,\r\n            \"value\": 182524\r\n        }\r\n    ],\r\n    \"version\": 1\r\n}```"}}
{"actor":{"display_login":"cculianu"}}