Open bitphage opened 6 years ago
Success calls by piston-lib:
% ./transfer.py vvk vvk2 0.001 GBG test --broadcast
{'method': 'call', 'params': [1, 'login', ['', '']], 'jsonrpc': '2.0', 'id': 1}
{'method': 'call', 'params': [1, 'get_api_by_name', ['database_api']], 'jsonrpc': '2.0', 'id': 2}
{'method': 'call', 'params': [1, 'get_api_by_name', ['network_broadcast_api']], 'jsonrpc': '2.0', 'id': 3}
{'method': 'call', 'params': [0, 'get_dynamic_global_properties', []], 'jsonrpc': '2.0', 'id': 4}
{'method': 'call', 'params': [1, 'get_api_by_name', ['account_by_key_api']], 'jsonrpc': '2.0', 'id': 5}
2018-01-31 22:07:24,157 INFO: transferring to vvk2: 0.001 GBG
{'method': 'call', 'params': [0, 'get_dynamic_global_properties', []], 'jsonrpc': '2.0', 'id': 6}
{'method': 'call', 'params': [0, 'get_accounts', [['vvk']]], 'jsonrpc': '2.0', 'id': 7}
{'method': 'call', 'params': [0, 'verify_authority', [{'ref_block_num': 55266, 'ref_block_prefix': 795308792, 'expiration': '2018-01-31T17:07:54', 'operations': [['transfer', {'from': 'vvk', 'to': 'vvk2', 'amount': '0.001 GBG', 'memo': 'test'}]], 'extensions': [], 'signatures': ['1f62d603951d51e29abca0b7c00a609b07c494c4771b357230c10dacf1c62e88197828cb8f9afd7628fcf0703d05826a075a1fcb39f4c20b1330ab2bd48ec7d9d7']}]], 'jsonrpc': '2.0', 'id': 8}
{'method': 'call', 'params': [3, 'broadcast_transaction', [{'ref_block_num': 55266, 'ref_block_prefix': 795308792, 'expiration': '2018-01-31T17:07:54', 'operations': [['transfer', {'from': 'vvk', 'to': 'vvk2', 'amount': '0.001 GBG', 'memo': 'test'}]], 'extensions': [], 'signatures': ['1f62d603951d51e29abca0b7c00a609b07c494c4771b357230c10dacf1c62e88197828cb8f9afd7628fcf0703d05826a075a1fcb39f4c20b1330ab2bd48ec7d9d7']}]], 'jsonrpc': '2.0', 'id': 9}
Failed calls by golos-python:
% ./test_transfer.py -d
Format GLS unkown. You've been warned!
Format GLS unkown. You've been warned!
Format GLS unkown. You've been warned!
Format GLS unkown. You've been warned!
Format GLS unkown. You've been warned!
b'{"jsonrpc": "2.0", "id": 0, "method": "call", "params": ["database_api", "get_dynamic_global_properties", []]}'
b'{"jsonrpc": "2.0", "id": 0, "method": "call", "params": ["database_api", "get_block", [13490122]]}'
b'{"jsonrpc": "2.0", "id": 0, "method": "get_accounts", "params": [["vvk"]]}'
b'{"jsonrpc": "2.0", "id": 0, "method": "call", "params": ["database_api", "get_dynamic_global_properties", []]}'
b'{"jsonrpc": "2.0", "id": 0, "method": "call", "params": ["database_api", "get_dynamic_global_properties", []]}'
b'{"jsonrpc": "2.0", "id": 0, "method": "call", "params": ["database_api", "verify_authority", [{"ref_block_num": 55241, "ref_block_prefix": 863592093, "expiration": "2018-01-31T17:07:19", "operations": [["transfer", {"from": "vvk", "to": "vvk2", "amount": "0.001 GBG", "memo": "test"}]], "extensions": [], "signatures": ["1f6f7ace6beb1945a6b793faa45518b0bedbc67d436630da0e9c07c33427e4979a01cd80a8a455fcaf55c655ab44e8a26083a2bbddba66cf9fd1c2a71f220b6789"]}]]}'
b'{"jsonrpc": "2.0", "id": 0, "method": "call", "params": [3, "broadcast_transaction", [{"ref_block_num": 55241, "ref_block_prefix": 863592093, "expiration": "2018-01-31T17:07:19", "operations": [["transfer", {"from": "vvk", "to": "vvk2", "amount": "0.001 GBG", "memo": "test"}]], "extensions": [], "signatures": ["1f6f7ace6beb1945a6b793faa45518b0bedbc67d436630da0e9c07c33427e4979a01cd80a8a455fcaf55c655ab44e8a26083a2bbddba66cf9fd1c2a71f220b6789"]}]]}'
Traceback (most recent call last):
I tried to use golos-python with my LOWMEM node and I found that sending transactions is not working.
Looks like that:
Although piston-lib doesn't have such problems. I added a
print()
call tographeneapi/graphenewsrpc.py
to compare piston-lib generated call:Interesting that I'm not getting such problem whether use vik's node api.golos.cf.
If I set
params[0]
to API id, same as piston-lib, I'm getting another error: