peatio icon indicating copy to clipboard operation
peatio copied to clipboard

electrum plugin doesn't seem to work

Open crackfoo opened this issue 4 years ago • 5 comments

Hi,

Peatio:2.6.29

I've tried using electrum as the blockchain client but it doesn't seem to work. I've tried public electrum servers as well as creating my own electrumx server without any luck with either tcp or ssl. Is there any more documentation about this plugin or perhaps limitations?

blockchain_1 | {"level":"WARN","time":"2021-02-14 23:46:41","message":"Error: wrong status line: \"{\\\"jsonrpc\\\": \\\"2.0\\\", \\\"error\\\": {\\\"code\\\": -32700, \\\"message\\\": \\\"invalid JSON\\\"}, \\\"id\\\": null}\". Sleeping for 10 seconds"}

Has anyone successfully use this plugin?

Thanks

crackfoo avatar Feb 19 '21 19:02 crackfoo

Hey, getting electrum work was painful for us, we just switched to using custom TX indexer and wallet generator. The bitcoin node is required for publishing singed transactions and block data

martianatwork avatar Feb 20 '21 08:02 martianatwork

You can find a docker image of electrum compatible with peatio here: https://github.com/openware/images/tree/master/electrum

calj avatar Feb 20 '21 15:02 calj

You can find a docker image of electrum compatible with peatio here: https://github.com/openware/images/tree/master/electrum

Thanks, I'll see about those. Is there any possibility you'll design the electrum plugin to work with official releases of Electrum/Electrumx? I mean, you already provide plugins for dash/litecoin/bitcoin to connect to native wallets.

I thought the addition of the electrum plugin would then allow the addition of many other coins with just the one plugin, just as long as they are supported by Electrum. It would be great if it could be unified then the list of coins would be quite substantial:

https://github.com/spesmilo/electrumx/blob/master/electrumx/lib/coins.py

Thanks for the reply and confirmation that the plugin is designed for the peatio specific electrum servers.

Cheers

crackfoo avatar Feb 20 '21 19:02 crackfoo

ElextrumX is an other software than Electrum, it probably needs a specific peatio plugin. Though it's very interesting if it supports main UTXO base currencies. We would need to review the API documentation to see if there is everything needed to write a peatio plugin. Also I don't see in the docs how to configure an other currency than Bitcoin.

calj avatar Feb 21 '21 08:02 calj

Yes, it is a different software however forked from Electrum and expanded with support for many altcoins. The configuration is control by setting the environment variables:

https://electrumx-spesmilo.readthedocs.io/en/latest/environment.html

These environment variables are always required:

COIN
Must be a NAME from one of the Coin classes in lib/coins.py. For example, Bitcoin.
DB_DIRECTORY
The path to the database directory. 
DAEMON_URL
A comma-separated list of daemon URLs. 

but the API should be very similar to the original

https://electrumx-spesmilo.readthedocs.io/en/latest/protocol.html

Cheers

crackfoo avatar Feb 21 '21 14:02 crackfoo