Skip to content

Commit cf4c65b

Browse files
committed
Merge branch 'fix-ripemd160-lbfoundation' of https://github.com/Brian496/lbry-sdk
2 parents dc280b7 + 74dfea1 commit cf4c65b

2 files changed

Lines changed: 21 additions & 1 deletion

File tree

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,16 @@ The documentation for the API can be found [here](https://lbry.tech/api/sdk).
5454
Daemon defaults, ports, and other settings are documented [here](https://lbry.tech/resources/daemon-settings).
5555

5656
Settings can be configured using a daemon-settings.yml file. An example can be found [here](https://github.com/lbryio/lbry-sdk/blob/master/example_daemon_settings.yml).
57+
58+
## Troubleshooting
59+
60+
### Error: unsupported hash type 'ripemd160'
61+
62+
If you see this error when running `lbrynet start`, it likely means your OpenSSL or Python installation is missing RIPEMD160 support.
63+
64+
To fix it:
65+
66+
- Ensure you are using a version of Python compiled with OpenSSL support.
67+
- On Ubuntu/Debian, try: `sudo apt install libssl-dev` and reinstall Python.
68+
- Alternatively, use a precompiled Python version (e.g., via `pyenv install 3.8.18` after `libssl-dev` is installed).
69+

lbry/crypto/hash.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,18 @@ def sha512(x):
1515

1616
def ripemd160(x):
1717
""" Simple wrapper of hashlib ripemd160. """
18-
h = hashlib.new('ripemd160')
18+
try:
19+
h = hashlib.new('ripemd160')
20+
except ValueError as e:
21+
raise RuntimeError(
22+
"Your Python/OpenSSL installation does not support RIPEMD160. "
23+
"Try reinstalling Python with full OpenSSL support."
24+
) from e
1925
h.update(x)
2026
return h.digest()
2127

2228

29+
2330
def double_sha256(x):
2431
""" SHA-256 of SHA-256, as used extensively in bitcoin. """
2532
return sha256(sha256(x))

0 commit comments

Comments
 (0)