openware / peatio-contrib

Peatio blockchains and currencies plugins

Home Page:https://www.openware.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

electrum plugin errors when adding blockchain

crackfoo opened this issue · comments

I've tried adding a DOGE blockchain and using an existing electrum server but it gives errors about json.

image

blockchain_1            | {"level":"ERROR","time":"2021-02-03 20:33:07","message":"#<Faraday::ConnectionFailed: wrong status line: \"{\\\"jsonrpc\\\": \\\"2.0\\\", \\\"error\\\": {\\\"code\\\": -32700, \\\"message\\\": \\\"invalid JSON\\\"}, \\\"id\\\": null}\">"}
blockchain_1            | {"level":"ERROR","time":"2021-02-03 20:33:07","message":"/usr/local/lib/ruby/2.6.0/net/http/response.rb:42:in `read_status_line'\n/usr/local/lib/ruby/2.6.0/net/http/response.rb:29:in `read_new'\n/usr/local/lib/ruby/2.6.0/net/http.rb:1509:in `block in transport_request'\n/usr/local/lib/ruby/2.6.0/net/http.rb:1506:in `catch'\n/usr/local/lib/ruby/2.6.0/net/http.rb:1506:in `transport_request'\n/usr/local/lib/ruby/2.6.0/net/http.rb:1479:in `request'\n/opt/vendor/bundle/ruby/2.6.0/gems/scout_apm-2.6.10/lib/scout_apm/instruments/net_http.rb:30:in `block in request_with_scout_instruments'\n/opt/vendor/bundle/ruby/2.6.0/gems/scout_apm-2.6.10/lib/scout_apm/tracer.rb:34:in `instrument'\n/opt/vendor/bundle/ruby/2.6.0/gems/scout_apm-2.6.10/lib/scout_apm/tracer.rb:44:in `instrument'\n/opt/vendor/bundle/ruby/2.6.0/gems/scout_apm-2.6.10/lib/scout_apm/instruments/net_http.rb:29:in `request_with_scout_instruments'\n/usr/local/lib/ruby/2.6.0/net/http.rb:1472:in `block in request'\n/usr/local/lib/ruby/2.6.0/net/http.rb:920:in `start'\n/usr/local/lib/ruby/2.6.0/net/http.rb:1470:in `request'\n/opt/vendor/bundle/ruby/2.6.0/gems/scout_apm-2.6.10/lib/scout_apm/instruments/net_http.rb:30:in `block in request_with_scout_instruments'\n/opt/vendor/bundle/ruby/2.6.0/gems/scout_apm-2.6.10/lib/scout_apm/tracer.rb:34:in `instrument'\n/opt/vendor/bundle/ruby/2.6.0/gems/scout_apm-2.6.10/lib/scout_apm/tracer.rb:44:in `instrument'\n/opt/vendor/bundle/ruby/2.6.0/gems/scout_apm-2.6.10/lib/scout_apm/instruments/net_http.rb:29:in `request_with_scout_instruments'\n/opt/vendor/bundle/ruby/2.6.0/gems/faraday-0.17.3/lib/faraday/adapter/net_http.rb:87:in `perform_request'\n/opt/vendor/bundle/ruby/2.6.0/gems/faraday-0.17.3/lib/faraday/adapter/net_http.rb:43:in `block in call'\n/opt/vendor/bundle/ruby/2.6.0/gems/faraday-0.17.3/lib/faraday/adapter/net_http.rb:92:in `with_net_http_connection'\n/opt/vendor/bundle/ruby/2.6.0/gems/faraday-0.17.3/lib/faraday/adapter/net_http.rb:38:in `call'\n/opt/vendor/bundle/ruby/2.6.0/gems/faraday-0.17.3/lib/faraday/request/url_encoded.rb:15:in `call'\n/opt/vendor/bundle/ruby/2.6.0/gems/faraday-0.17.3/lib/faraday/rack_builder.rb:143:in `build_response'\n/opt/vendor/bundle/ruby/2.6.0/gems/faraday-0.17.3/lib/faraday/connection.rb:387:in `run_request'\n/opt/vendor/bundle/ruby/2.6.0/gems/better-faraday-1.0.8/lib/better-faraday.rb:15:in `run_request'\n/opt/vendor/bundle/ruby/2.6.0/gems/faraday-0.17.3/lib/faraday/connection.rb:175:in `post'\n/opt/vendor/bundle/ruby/2.6.0/gems/peatio-electrum-2.6.2/lib/peatio/electrum/client.rb:41:in `call'\n/opt/vendor/bundle/ruby/2.6.0/gems/peatio-electrum-2.6.2/lib/peatio/electrum/client.rb:53:in `get_local_height'\n/opt/vendor/bundle/ruby/2.6.0/gems/peatio-electrum-2.6.2/lib/peatio/electrum/blockchain.rb:100:in `latest_block_number'\n/home/app/app/services/blockchain_service.rb:16:in `latest_block_number'\n/home/app/app/workers/daemons/blockchain.rb:27:in `block (2 levels) in start'\n/home/app/app/workers/daemons/blockchain.rb:22:in `loop'\n/home/app/app/workers/daemons/blockchain.rb:22:in `block in start'"}
blockchain_1            | {"level":"WARN","time":"2021-02-03 20:33:07","message":"Error: wrong status line: \"{\\\"jsonrpc\\\": \\\"2.0\\\", \\\"error\\\": {\\\"code\\\": -32700, \\\"message\\\": \\\"invalid JSON\\\"}, \\\"id\\\": null}\". Sleeping for 10 seconds"}```


Any ideas if this is the proper way to add electrum wallets?

@mnaichuk Do you have some insight to using electrum properly?

Is there a min version of peatio thats needed for this electrum plugin to work properly? Currently using:

peatio: custom/peatio:2.5.46v1
barong: quay.io/openware/barong:2.5.20
frontend: custom/baseapp:2.5.4v1
tower: quay.io/openware/tower:2.5.27
postmaster: quay.io/openware/postmaster:2.3.4
rango: quay.io/openware/rango:2.6.1

Thanks

I've build my own electrumx server but perhaps the plugin only works with your electrum images?

https://github.com/openware/images/tree/master/electrum

Any tips would be great.

Anyone?