Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cli_wallet does not answer RPC call given in README #252

Closed
xeroc opened this issue Aug 20, 2015 · 6 comments
Closed

cli_wallet does not answer RPC call given in README #252

xeroc opened this issue Aug 20, 2015 · 6 comments

Comments

@xeroc
Copy link
Contributor

xeroc commented Aug 20, 2015

curl --data '{"jsonrpc": "2.0", "method": "get_accounts", "params": [["1.2.0"]], "id": 1}' http://127.0.0.1:8090/rpc

Exists with an unknown method exception.

and the query:

 {
     "id": 0,
     "method": "get_account"
     "params": [
         [
             "bytemaster"
         ]
     ],
     "jsonrpc": "2.0",
 }

yields:

 grapheneapi.grapheneapi.RPCError: 7 bad_cast_exception: Bad Cast
 Invalid cast from array_type to string
     {"type":"array_type"}
     th_a  variant.cpp:471 as_string
@bytemaster
Copy link
Contributor

@xeroc
Copy link
Contributor Author

xeroc commented Aug 24, 2015

Working calls:

curl --data '{"jsonrpc": "2.0", "method": "call", "params": [0, "list_my_accounts",[]], "id": 1}' http://127.0.0.1:8091/rpc
curl --data '{"jsonrpc": "2.0", "method": "call", "params": [0, "help",[]], "id": 1}' http://127.0.0.1:8091/rpc

not working

    curl --data '{"jsonrpc": "2.0", "method": "call", "params": [0, "info",[]], "id": 1}' http://127.0.0.1:8091/rpc

cli_wallet prints this:

locked >>> here... 
1659993ms th_a       main.cpp:203                  operator()           ] .

Instead of using "method":"call" I also tried with the alternative syntax from the README:

curl --data '{"id":0,"method":"get_block","jsonrpc":"2.0","params":[[298983]]}' http://127.0.0.1:8091/rpc                                                                                                                          ─┘

Output was:

{"id":0,"error":{"code":1,"message":"7 bad_cast_exception: Bad Cast\nInvalid cast from array_type to uint64\n    {\"type\":\"array_type\"}\n    th_a  variant.cpp:403 as_uint64\n\n    {\"*this\":[298983]}\n    th_a  variant.cpp:405 as_uint64","data":{"code":7,"name":"bad_cast_exception","message":"Bad Cast","stack":[{"context":{"level":"error","file":"variant.cpp","line":403,"method":"as_uint64","hostname":"","thread_name":"th_a","timestamp":"2015-08-24T15:28:39"},"format":"Invalid cast from ${type} to uint64","data":{"type":"array_type"}},{"context":{"level":"warn","file":"variant.cpp","line":405,"method":"as_uint64","hostname":"","thread_name":"th_a","timestamp":"2015-08-24T15:28:39"},"format":"","data":{"*this":[298983]}}]}}}%     

@xeroc
Copy link
Contributor Author

xeroc commented Aug 28, 2015

I still cant bring the cli wallet to do anything useful but I need it for the deposit monitoring to decode the tx memo etc...

It would also be useful for writing a trading bot or do you have a different plan for market making?

@xeroc
Copy link
Contributor Author

xeroc commented Aug 28, 2015

I still cant bring the cli wallet to do anything useful but I need it for the deposit monitoring to decode the tx memo etc...

@xeroc
Copy link
Contributor Author

xeroc commented Sep 1, 2015

I am adding some labels to make clear that this needs fixing!

How would a market maker implement a bot when the cli_wallet doesn't reply?
How am I supposed to monitor deposits for exchanges when the cli_wallet doesn't reply?
How am I supposed to test the robustness of the network if I cannot implement a stresstest with cli_wallet?

@xeroc
Copy link
Contributor Author

xeroc commented Sep 3, 2015

Ok .. I figured it out myself! I need to run

./programs/cli_wallet/cli_wallet -H 127.0.0.1:8092

instead of

./programs/cli_wallet/cli_wallet -r 127.0.0.1:8092

@xeroc xeroc closed this as completed Sep 3, 2015
emfrias added a commit to cryptonomex/fc that referenced this issue Feb 10, 2016
…er to the way regular websocket messages were handled since 0144552.  Fixes cryptonomex/graphene#251, and likely eliminates the need for the workaround used to fix cryptonomex/graphene#1 and cryptonomex/graphene#252
JakubFornadel pushed a commit to SophiaTX/SophiaTX-MainNet that referenced this issue Dec 18, 2018
…er to the way regular websocket messages were handled since 01445529f0af904f88cc6c60867b5c5d262aae1f. Fixes cryptonomex/graphene#251, and likely eliminates the need for the workaround used to fix cryptonomex/graphene#1 and cryptonomex/graphene#252
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants