Can't parse HiddenServiceOptions: HiddenServicePoWDefensesEnabled
While try to run yg after installation I have this error
Setup failed: [Failure instance: Traceback: <class 'RuntimeError'>: Can't parse HiddenServiceOptions: HiddenServicePoWDefensesEnabled
/home/joinmarket/joinmarket/jmvenv/lib/python3.10/site-packages/twisted/internet/defer.py:913:errback
/home/joinmarket/joinmarket/jmvenv/lib/python3.10/site-packages/twisted/internet/defer.py:981:_startRunCallbacks
/home/joinmarket/joinmarket/jmvenv/lib/python3.10/site-packages/twisted/internet/defer.py:1075:_runCallbacks
/home/joinmarket/joinmarket/jmvenv/lib/python3.10/site-packages/twisted/internet/defer.py:1946:_gotResultInlineCallbacks
--- <exception caught here> ---
/home/joinmarket/joinmarket/jmvenv/lib/python3.10/site-packages/twisted/internet/defer.py:1996:_inlineCallbacks
/home/joinmarket/joinmarket/jmvenv/lib/python3.10/site-packages/twisted/python/failure.py:519:throwExceptionIntoGenerator
/home/joinmarket/joinmarket/jmvenv/lib/python3.10/site-packages/txtorcon/controller.py:462:connect
/home/joinmarket/joinmarket/jmvenv/lib/python3.10/site-packages/txtorcon/controller.py:456:connect
/home/joinmarket/joinmarket/jmvenv/lib/python3.10/site-packages/twisted/internet/defer.py:1996:_inlineCallbacks
/home/joinmarket/joinmarket/jmvenv/lib/python3.10/site-packages/twisted/python/failure.py:519:throwExceptionIntoGenerator
/home/joinmarket/joinmarket/jmvenv/lib/python3.10/site-packages/txtorcon/controller.py:427:try_endpoint
/home/joinmarket/joinmarket/jmvenv/lib/python3.10/site-packages/twisted/internet/defer.py:1996:_inlineCallbacks
/home/joinmarket/joinmarket/jmvenv/lib/python3.10/site-packages/twisted/python/failure.py:519:throwExceptionIntoGenerator
/home/joinmarket/joinmarket/jmvenv/lib/python3.10/site-packages/txtorcon/torconfig.py:584:from_protocol
/home/joinmarket/joinmarket/jmvenv/lib/python3.10/site-packages/twisted/internet/defer.py:2000:_inlineCallbacks
/home/joinmarket/joinmarket/jmvenv/lib/python3.10/site-packages/txtorcon/torconfig.py:1035:_do_setup
/home/joinmarket/joinmarket/jmvenv/lib/python3.10/site-packages/txtorcon/torconfig.py:1225:_setup_hidden_services
]
I am new to issue generation. I am available to provide more information if needed.
Full execution logs:
$ ./yg-privacyenhanced.py wallet.jmdat
User data location: /home/joinmarket/.joinmarket/
Enter passphrase to decrypt wallet:
2025-10-11 22:14:44,003 [INFO] JoinMarket 0.9.11
2025-10-11 22:14:44,005 [INFO] starting yield generator
2025-10-11 22:14:44,033 [INFO] Joinmarket daemon listening on port 27183
2025-10-11 22:14:44,033 [INFO] Starting transaction monitor in walletservice
2025-10-11 22:14:44,038 [INFO] Attempting to start onion service on port: 5222 ...
2025-10-11 22:14:44,162 [ERROR] Setup failed: [Failure instance: Traceback: <class 'RuntimeError'>: Can't parse HiddenServiceOptions: HiddenServicePoWDefensesEnabled
/home/joinmarket/joinmarket/jmvenv/lib/python3.10/site-packages/twisted/internet/defer.py:913:errback
/home/joinmarket/joinmarket/jmvenv/lib/python3.10/site-packages/twisted/internet/defer.py:981:_startRunCallbacks
/home/joinmarket/joinmarket/jmvenv/lib/python3.10/site-packages/twisted/internet/defer.py:1075:_runCallbacks
/home/joinmarket/joinmarket/jmvenv/lib/python3.10/site-packages/twisted/internet/defer.py:1946:_gotResultInlineCallbacks
--- <exception caught here> ---
/home/joinmarket/joinmarket/jmvenv/lib/python3.10/site-packages/twisted/internet/defer.py:1996:_inlineCallbacks
/home/joinmarket/joinmarket/jmvenv/lib/python3.10/site-packages/twisted/python/failure.py:519:throwExceptionIntoGenerator
/home/joinmarket/joinmarket/jmvenv/lib/python3.10/site-packages/txtorcon/controller.py:462:connect
/home/joinmarket/joinmarket/jmvenv/lib/python3.10/site-packages/txtorcon/controller.py:456:connect
/home/joinmarket/joinmarket/jmvenv/lib/python3.10/site-packages/twisted/internet/defer.py:1996:_inlineCallbacks
/home/joinmarket/joinmarket/jmvenv/lib/python3.10/site-packages/twisted/python/failure.py:519:throwExceptionIntoGenerator
/home/joinmarket/joinmarket/jmvenv/lib/python3.10/site-packages/txtorcon/controller.py:427:try_endpoint
/home/joinmarket/joinmarket/jmvenv/lib/python3.10/site-packages/twisted/internet/defer.py:1996:_inlineCallbacks
/home/joinmarket/joinmarket/jmvenv/lib/python3.10/site-packages/twisted/python/failure.py:519:throwExceptionIntoGenerator
/home/joinmarket/joinmarket/jmvenv/lib/python3.10/site-packages/txtorcon/torconfig.py:584:from_protocol
/home/joinmarket/joinmarket/jmvenv/lib/python3.10/site-packages/twisted/internet/defer.py:2000:_inlineCallbacks
/home/joinmarket/joinmarket/jmvenv/lib/python3.10/site-packages/txtorcon/torconfig.py:1035:_do_setup
/home/joinmarket/joinmarket/jmvenv/lib/python3.10/site-packages/txtorcon/torconfig.py:1225:_setup_hidden_services
]
created the onion endpoint, now calling listen
^Cdone
Unhandled error in Deferred:
Traceback (most recent call last):
File "/home/joinmarket/joinmarket/jmvenv/lib/python3.10/site-packages/twisted/internet/defer.py", line 1946, in _gotResultInlineCallbacks
_inlineCallbacks(r, gen, status, context)
File "/home/joinmarket/joinmarket/jmvenv/lib/python3.10/site-packages/twisted/internet/defer.py", line 2078, in _inlineCallbacks
status.deferred.errback()
File "/home/joinmarket/joinmarket/jmvenv/lib/python3.10/site-packages/twisted/internet/defer.py", line 913, in errback
self._startRunCallbacks(fail)
File "/home/joinmarket/joinmarket/jmvenv/lib/python3.10/site-packages/twisted/internet/defer.py", line 981, in _startRunCallbacks
self._runCallbacks()
--- <exception caught here> ---
File "/home/joinmarket/joinmarket/jmvenv/lib/python3.10/site-packages/twisted/internet/defer.py", line 1075, in _runCallbacks
current.result = callback( # type: ignore[misc]
File "/home/joinmarket/joinmarket-clientserver-0.9.11/src/jmbase/twisted_utils.py", line 232, in print_host
self.onion_hostname_callback(self.onion.hostname)
builtins.AttributeError: 'NoneType' object has no attribute 'hostname'
$ pip freeze
argon2-cffi==21.3.0
argon2-cffi-bindings==25.1.0
attrs==25.4.0
autobahn==20.12.3
Automat==25.4.16
bencoder.pyx==3.0.1
cffi==2.0.0
chromalog==1.0.5
colorama==0.4.6
constantly==23.10.4
cryptography==41.0.6
future==1.0.0
hyperlink==21.0.0
idna==3.10
incremental==24.7.2
# Editable install with no version control (joinmarket==0.9.11)
-e /home/joinmarket/joinmarket-clientserver-0.9.11
klein==20.6.0
libnacl==1.8.0
MarkupSafe==3.0.3
mnemonic==0.20
pyasn1==0.6.1
pyasn1_modules==0.4.2
pycparser==2.23
PyJWT==2.4.0
pyOpenSSL==23.2.0
python-bitcointx==1.1.5
service-identity==21.1.0
six==1.17.0
tomli==2.3.0
Tubes==0.2.1
Twisted==23.10.0
txaio==25.9.2
txtorcon==23.11.0
typing_extensions==4.15.0
Werkzeug==2.2.3
zope.interface==8.0.1
As per https://onionservices.torproject.org/technology/security/pow/#how-to-enable-this-as-a-service-operator this features seems to be available (but maybe? i think it might depend on the exact distribution process; it talks about a license mismatch) from 0.4.8.1 onwards, a month or two back. But I don't know whether you'd have to explicitly "turn it on" by putting HiddenServicePoWDefensesEnabled=1 in torrc. I think so? Did you do that, or perhaps you could check it, and turn it off? (I remember the yield generator onions are started ephemerally but I've have to go back and check exactly how they get their tor configs, maybe they copy them from existing torrc, or attach to the running tor if it exists, I don't remember).
Maybe run tor --list-modules as per here if you're not sure?
(Of course far more interesting would be to enable it, for directory nodes; since it might help with the problems we had of directory node onions being unreachable; and even if it didn't, it feels like it should! I guess if we did that, we would do the same for yield generators. But that would require a patch and some testing, to say the least...).
I was able to reproduce this error. While directory node will run fine with HiddenServicePoWDefensesEnabled, yg will not due to txtorcon parsing torrc and raising a RuntimeError for unknown config, despite not using hidden service config.
https://github.com/meejah/txtorcon/pull/407 should fix issue in upstream library.
above fix got merge, i can confirm that yg now runs without issue with HiddenServicePoWDefensesEnabled defined for other services. the following extra command after installation does the trick while waiting for a now txtorcon release
pip install --force-reinstall txtorcon@git+https://github.com/meejah/txtorcon.git@85c213092104aebea24adc858ab0ffdd0791ad1d
What tor version are you running in those reported results @roshii ?
0.4.8.16 (debian)
worth nothing that despite being >0.4.8.1, 0.4.8.14 (alpine) isn't working due to to missing gpl pow module, if i remember correctly, but raising an explicit error on tor startup.
actually, running dn with pow enabled required a little tweak to jm: https://github.com/JoinMarket-Org/joinmarket-clientserver/pull/1819
tor doesn't handle pow defense via ADD_ONION at time of writing, therefore hs must be managed directly by tor.