Open kenneth opened 4 years ago
Why did you close this without saying the fix?
Ok, so apparently this happens on debian 10, but not on e.g. ubuntu 20.04.
I will have to look into this more, but I suppose the idea is that the libsecp256k1-0
package in debian 10 apt does not have the recovery module.
Workarounds for users, in order of increasing complexity:
$ contrib/make_libsecp256k1.sh
$ tar -xzvf Electrum-4.0.3.tar.gz
$ ./Electrum-4.0.3/contrib/make_libsecp256k1.sh
$ python3 -m pip show electrum
[...]
Location: /home/user/.local/lib/python3.8/site-packages
[...]
^ look at "Location" line, and copy libsecp256k1.so.0
into electrum
folder at Location, e.g.:
$ cp Electrum-4.0.3/electrum/libsecp256k1.so.0 /home/user/.local/lib/python3.8/site-packages/electrum
For anyone else having this issue, when compiling with
./Electrum-4.0.3/contrib/make_libsecp256k1.sh
It spits out a library path like
/home/nick/install/electrum-4.0.5/contrib/secp256k1/dist/lib
Running as LD_LIBRARY_PATH=/home/nick/install/electrum-4.0.5/contrib/secp256k1/dist/lib electrum
works for me.
For anyone else having this issue, when compiling with
./Electrum-4.0.3/contrib/make_libsecp256k1.sh
It spits out a library path like/home/nick/install/electrum-4.0.5/contrib/secp256k1/dist/lib
Running asLD_LIBRARY_PATH=/home/nick/install/electrum-4.0.5/contrib/secp256k1/dist/lib electrum
works for me.
@nickfarrow You can just add the path to /etc/ld.so.conf
:
/home/nick/install/electrum-4.0.5/contrib/secp256k1/dist/lib
Run sudo ldconfig
to update the system library paths, and make sure you don't remove the Electrum folder by accident.
@SomberNight What do you think about phasing out the module-recovery code in the long run?
What do you think about phasing out the module-recovery code in the long run?
Why? libsecp256k1 is a good library. The "recovery" module is optional in it, unfortunately, yes; but is that the sole reason you would want not to require it? Then we would need an alternative or at least a fallback implementation. In the past we used python-ecdsa for this. I would like to minimise crypto code we need to maintain. And libsecp256k1 is probably much more tested and more widely used.
Also, for taproot support we will need another optional module from libsecp256k1 ("schnorrsig"), and there is no alternative for that.
I think people running from source will just have to make sure to get libsecp with the needed extra modules included. In particular the distro packagers for libsecp256k1 should make the optional modules available either as part of the main package or as additional packages.