chris-belcher / electrum-personal-server

Maximally lightweight electrum server for a single user
MIT License
602 stars 110 forks source link

Issue with EPS 0.2.2 (0.2.1.1, 0.2) after Bitcoin Core 0.22 upgrade #246

Closed tripletuple closed 2 years ago

tripletuple commented 3 years ago

marcok@mint:~/electrum-personal-server-eps-v0.2.2$ electrum-personal-server config.ini INFO:2021-09-21 13:09:34,202: Starting Electrum Personal Server INFO:2021-09-21 13:09:34,202: Logging to /tmp/electrumpersonalserver.log INFO:2021-09-21 13:09:34,782: Displaying first 3 addresses of each master public key: Traceback (most recent call last): File "/home/marcok/.local/bin/electrum-personal-server", line 11, in sys.exit(main()) File "/home/marcok/.local/lib/python3.6/site-packages/electrumpersonalserver/server/common.py", line 840, in main get_scriptpubkeys_to_monitor(rpc, config) File "/home/marcok/.local/lib/python3.6/site-packages/electrumpersonalserver/server/common.py", line 629, in get_scriptpubkeys_to_monitor first_addrs = [hashes.script_to_address(s, rpc) for s in first_spks] File "/home/marcok/.local/lib/python3.6/site-packages/electrumpersonalserver/server/common.py", line 629, in first_addrs = [hashes.script_to_address(s, rpc) for s in first_spks] File "/home/marcok/.local/lib/python3.6/site-packages/electrumpersonalserver/server/hashes.py", line 76, in script_to_address return http://rpc.call("decodescript", [scriptPubKey])["addresses"][0] KeyError: 'addresses'

chris-belcher commented 3 years ago

To fix this for now you have to add deprecatedrpc=addresses to the bitcoin.conf file and then restart Core and EPS.

BTW from reading your error log I see you're not actually using EPS 0.2.2, but an earlier version. If you want you could try uninstalling with pip3 uninstall electrum-personal-server and then installing it again as per the instructions in the project readme.

bar17 commented 2 years ago

Hello,

I just updated bitcoin core to version 22.0. I then decided to update EPS.

I received the same error. On troubleshooting after reading this post I realized I am actually running an older version of EPS then I previously thought. Last time I "upgraded" EPS I never actually upgraded...

Some sort of upgrade section in the "detailed how to" would really be appreciated for those of us who have enough technical knowledge to set this all up but still dig ourselves a hole....

I could try and follow your recommendation and "pip3 uninstall electrum-personal-server" - but will this necessitate a rescan ? Is there a way to do a clean upgrade and make my linux install "know" that the electrum-personal-server command should now use my new electrum-personal-server-eps-v0.2.3 directory files ?

I really appreciate you developing and supporting this software by the way.

chris-belcher commented 2 years ago

It will not necessitate a rescan.

You can always use electrum-personal-server --version to check which version you're running.

Using pip3 uninstall electrum-personal-server and then the pip install command should update the electrum-personal-server command. If not you can try calling it directly with something like ~/.local/bin/electrum-personal-server

A lot of these posts make sense now that I realize many people didn't upgrade. I'll add some notes to do the readme

bar17 commented 2 years ago

Thank you very much. It is now working!

electrum-personal-server --version pip3 uninstall electrum-personal-server cd ~/electrum-*2.3 pip3 install --user . electrum-personal-server --version

I really do appreciate the software!