Closed Fonta1n3 closed 1 year ago
2022-10-13 17:59:49,038 [WARNING] Invalid address "tb1qc7h7ge6hk3ld4yeg3d8kcduk2dfq2s88f2s4wh342jeaq8txvyfq4f7w5x" 2022-10-13 17:59:49,038 [WARNING] Invalid address "tb1qnn9ga8zgm3gc4mu2lclpnyd6e9gr3hes5k54w2rxh2m8jgpjhgwq7rfvr2" 2022-10-13 17:59:49,038 [WARNING] Invalid address "tb1qwa4t32l0hy0c667k342ljt7w2578yzk0h9gspwfvwaj2ecx7annqj5em6m" 2022-10-13 17:59:49,039 [WARNING] Invalid address "tb1q0ep8xvtaugkcr2nckwflmlmfv6gls8z9zzn4f89cxl25362jx5usg24esg" 2022-10-13 17:59:49,039 [WARNING] Invalid address "tb1q4fha7wyeesa3v5vc35dunnfae7ldkef5ztxs0jjarlkzzkr7x62swxl9yh" 2022-10-13 17:59:49,039 [WARNING] Invalid address "tb1qzuceejghvlq7754knjrgmt9y4wp4srjpjz9twpy58n0pmmyva93qupc5lk" 2022-10-13 17:59:49,039 [WARNING] Invalid address "tb1qztqtzezgcp9ssl6hpuf34kvu5zv8ha2eqlac0jm9fjcdau7qc84sg5qrk9" 2022-10-13 17:59:49,039 [WARNING] Invalid address "tb1qlxl22jmhs94ntnnn86zc4x8mmzashcep863whkayf40n344egf9spas0lf" 2022-10-13 17:59:49,039 [WARNING] Invalid address "tb1qszy62emyp54rqrr7zrmq3ehl5y3p9p4dt8jc77kpujl3apu7ptcsuvgz2z" Fatal sync error: import of 1020 address(es) failed for some reason. To prevent coin or privacy loss, Joinmarket will not load a wallet in this conflicted state. Try using a new Bitcoin Core wallet to sync this Joinmarket wallet, or use a new Joinmarket wallet.
These are signet / testnet not regtest addresses, that's the source of the problem.
This seems strange, as wallet creation via RPC API is covered by test suite and it runs on regtest...
Ok let me try and reproduce it.
@kristapsk I am able to reproduce this. I don't understand as my node is definitely on regtest, JM is configured for regtest, the wallet I created for JM to use is also on regtest. I was using signet prior to attempting to create this regtest wallet.
This is the log output from JM before it shows all the rejected signet/testnet addresses:
(jmvenv) standup@demo:~/joinmarket-clientserver/scripts$ python jmwalletd.py
User data location: /home/standup/. joinmarket/
2022-10-14 15:43:00,238 [INFO] Starting jmwalletd on port: 28183
Enter PEM pass phrase:
2022-10-14 15:43:04,049 [INFO] Joinmarket daemon listening on port 27183
‹Request at 0x7f95c54fafbo method=POST uri=/api/v1/wallet/create clientproto=HTTP/1.1>
b' POST b'/api/v1/wallet/create {7 /api/vl/wallet/create < io.BytesIO object at 0x7£95c5509080> [ (b 'Host', [b'fkvfwqj6ckwx3sxk3g7wqvcu2pnvi2d5pteo2ev5gl6ktrhkh72iduad.onion:28183']), (b'Content-Type', [b'application/json'1),
('Connection', Ib'keep-alive•1). (b'Accept', [b'*/*']), (b'User-Agent', S, en; q=0.9'1), (b'Accept-Encoding' [b'FullyNoded/355 CFNetwork/1331.0.7 Darwin/21.4.0'] , (b'Content-Length', [b'123' ]), (b'Accept-Language', [b'en-u, Ib'gzip, deflate, br'])]
2022-10-14 15:43:29,127 [ERROR] Critical error updating blockheight.
2022-10-14 15:43:29,178 [ERROR] Failure of RPC connection to Bitcoin Core in wallet service startup. Application cannot continue, shutting down.
2022-10-14 15:43:29,127 [ERROR] Critical error updating blockheight.
By looking at code and your log output, it seems that getblockcount
Bitcoin RPC returns 0.
Will try to reproduce later.
2022-10-14 15:43:29,127 [ERROR] Critical error updating blockheight.
By looking at code and your log output, it seems that
getblockcount
Bitcoin RPC returns 0.Will try to reproduce later.
Ah I haven't mined any blocks yet... That's probably why. Will try again.
I mined more then 100 blocks, wallet creation now succeeds but the main issue of incorrect address format persists :
(jmvenv) standup@demo:~/joinmarket-clientserver/scripts$ python jmwalletd.py
User data location: /home/standup/.joinmarket/
2022-10-14 17:15:53,330 [INFO] Starting jmwalletd on port: 28183
Enter PEM pass phrase:
2022-10-14 17:15:56,478 [INFO] Joinmarket daemon listening on port 27183
<Request at 0x7fcdf0a0ab90 method=POST uri=/api/v1/wallet/create clientproto=HTTP/1.1>
b'POST'
b'/api/v1/wallet/create'
{}
b'/api/v1/wallet/create'
<_io.BytesIO object at 0x7fcdf0a17970>
[(b'Host', [b'xxx.onion:28183']), (b'Content-Type', [b'application/json']), (b'Connection', [b'keep-alive']), (b'Accept', [b'*/*']), (b'User-Agent', [b'FullyNoded/355 CFNetwork/1331.0.7 Darwin/21.4.0']), (b'Content-Length', [b'125']), (b'Accept-Language', [b'en-US,en;q=0.9']), (b'Accept-Encoding', [b'gzip, deflate, br'])]
2022-10-14 17:17:03,971 [WARNING] Connection had broken pipe, attempting reconnect.
2022-10-14 17:17:03,984 [INFO] Detected new wallet, performing initial import
2022-10-14 17:17:10,018 [WARNING] Invalid address "tb1qz5du5estdy335ghvkgeps47tq75c4224y4y9mr4plf55rmrr5hkq9c9q50"
2022-10-14 17:17:10,018 [WARNING] Invalid address "tb1q2ecza9aumzlzrenl3m9tw4j9d0hqjrta8u3rk3c28f2juw83zw6sxyul8c"
2022-10-14 17:17:10,018 [WARNING] Invalid address "tb1qj9rsmja58fpuffeh4qazqg7w0murgu757p4gdq44cuhxyh536w9srkkwsa"
....(this goes on for awhile, have deleted for brevity)...
2022-10-14 17:17:10,169 [WARNING] Invalid address "tb1qszqe36slyad3hc5gls9937fgyhyu79q6h5m47drmn5mvx9z4am2q7mepgu"
2022-10-14 17:17:10,170 [WARNING] Invalid address "tb1qs00tu37ue5h3nsdqk465u2a3rt2tzpyd9xn9xllmus47k5sudvgq00382g"
Fatal sync error: import of 1020 address(es) failed for some reason. To prevent coin or privacy loss, Joinmarket will not load a wallet in this conflicted state. Try using a new Bitcoin Core wallet to sync this Joinmarket wallet, or use a new Joinmarket wallet.
<Request at 0x7fcdf0a0a020 method=POST uri=/api/v1/wallet/FullyNoded-b3fkeJrP6C.jmdat/unlock clientproto=HTTP/1.1>
b'POST'
b'/api/v1/wallet/FullyNoded-b3fkeJrP6C.jmdat/unlock'
{}
b'/api/v1/wallet/FullyNoded-b3fkeJrP6C.jmdat/unlock'
<_io.BytesIO object at 0x7fcdf15609f0>
[(b'Host', [b'xxx.onion:28183']), (b'Content-Type', [b'text/plain']), (b'Connection', [b'keep-alive']), (b'Accept', [b'*/*']), (b'User-Agent', [b'FullyNoded/355 CFNetwork/1331.0.7 Darwin/21.4.0']), (b'Content-Length', [b'61']), (b'Accept-Language', [b'en-US,en;q=0.9']), (b'Accept-Encoding', [b'gzip, deflate, br'])]
<Request at 0x7fcdf08dba30 method=GET uri=/api/v1/wallet/FullyNoded-b3fkeJrP6C.jmdat/display clientproto=HTTP/1.1>
b'GET'
b'/api/v1/wallet/FullyNoded-b3fkeJrP6C.jmdat/display'
{}
b'/api/v1/wallet/FullyNoded-b3fkeJrP6C.jmdat/display'
<_io.BytesIO object at 0x7fcdf15609f0>
[(b'Host', [b'xxx.onion:28183']), (b'Content-Type', [b'text/plain']), (b'Connection', [b'keep-alive']), (b'Accept', [b'*/*']), (b'User-Agent', [b'FullyNoded/355 CFNetwork/1331.0.7 Darwin/21.4.0']), (b'Authorization', [b'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ3YWxsZXQiOiJGdWxseU5vZGVkLWIzZmtlSnJQNkMuam1kYXQiLCJleHAiOjE2NjU3Njk5MTl9.GlIA-bm4fioNxzUHRMMjaQNpYUxEYgEvZocabKl-6To']), (b'Accept-Language', [b'en-US,en;q=0.9']), (b'Accept-Encoding', [b'gzip, deflate, br'])]
2022-10-14 17:22:03,894 [WARNING] Connection had broken pipe, attempting reconnect.
2022-10-14 17:22:03,896 [WARNING] Invalid address "tb1qf776xfcta4eefzlamp0hyuetw2w8v0h8j8za83"
2022-10-14 17:22:03,897 [WARNING] Invalid address "tb1qzef3tc4shjwlww8vlmvlpnqgx4sdm09m89dsx8"
2022-10-14 17:22:03,897 [WARNING] Invalid address "tb1qmp3vzcqegqucek26g62qyc7qt7wjffz89szpqh"
2022-10-14 17:22:03,897 [WARNING] Invalid address "tb1qy35u5psse9tdvwxle8xejrrxgp6hkrjytkrq3w"
2022-10-14 17:22:03,897 [WARNING] Invalid address "tb1qyrm7a2qe4pyg69dr0xpw2p5h3rpyx5yd564uqx"
2022-10-14 17:22:03,898 [WARNING] Invalid address "tb1qrspt0zd5mzhlt702egecwjy2a95s423gcsapn3"
Fatal sync error: import of 6 address(es) failed for some reason. To prevent coin or privacy loss, Joinmarket will not load a wallet in this conflicted state. Try using a new Bitcoin Core wallet to sync this Joinmarket wallet, or use a new Joinmarket wallet.
Traceback (most recent call last):
File "/home/standup/joinmarket-clientserver/jmvenv/lib/python3.10/site-packages/twisted/web/server.py", line 292, in render
body = resrc.render(self)
File "/home/standup/joinmarket-clientserver/jmvenv/lib/python3.10/site-packages/klein/_resource.py", line 204, in render
d = defer.maybeDeferred(_execute)
File "/home/standup/joinmarket-clientserver/jmvenv/lib/python3.10/site-packages/twisted/internet/defer.py", line 190, in maybeDeferred
result = f(*args, **kwargs)
File "/home/standup/joinmarket-clientserver/jmvenv/lib/python3.10/site-packages/klein/_resource.py", line 196, in _execute
d = defer.maybeDeferred(
--- <exception caught here> ---
File "/home/standup/joinmarket-clientserver/jmvenv/lib/python3.10/site-packages/twisted/internet/defer.py", line 190, in maybeDeferred
result = f(*args, **kwargs)
File "/home/standup/joinmarket-clientserver/jmvenv/lib/python3.10/site-packages/klein/_app.py", line 129, in execute_endpoint
return endpoint_f(self._instance, *args, **kwargs)
File "/home/standup/joinmarket-clientserver/jmvenv/lib/python3.10/site-packages/klein/_app.py", line 241, in _f
return _call(instance, f, request, *a, **kw)
File "/home/standup/joinmarket-clientserver/jmvenv/lib/python3.10/site-packages/klein/_app.py", line 60, in _call
result = __klein_f__(*args, **kwargs)
File "/home/standup/joinmarket-clientserver/jmclient/jmclient/wallet_rpc.py", line 576, in displaywallet
walletinfo = wallet_display(self.services["wallet"], False, jsonified=True)
File "/home/standup/joinmarket-clientserver/jmclient/jmclient/wallet_utils.py", line 579, in wallet_display
wallet_service.bci.import_addresses(gap_addrs,
File "/home/standup/joinmarket-clientserver/jmclient/jmclient/blockchaininterface.py", line 290, in import_addresses
sys.exit(EXIT_FAILURE)
builtins.SystemExit: 1
2022-10-14 17:22:08,494 [WARNING] Invalid address "tb1qrefxxlu22p63tgh55utp9ufca5866vy789dcf8"
Fatal sync error: import of 1 address(es) failed for some reason. To prevent coin or privacy loss, Joinmarket will not load a wallet in this conflicted state. Try using a new Bitcoin Core wallet to sync this Joinmarket wallet, or use a new Joinmarket wallet.
Traceback (most recent call last):
File "/home/standup/joinmarket-clientserver/jmvenv/lib/python3.10/site-packages/twisted/web/server.py", line 292, in render
body = resrc.render(self)
File "/home/standup/joinmarket-clientserver/jmvenv/lib/python3.10/site-packages/klein/_resource.py", line 204, in render
d = defer.maybeDeferred(_execute)
File "/home/standup/joinmarket-clientserver/jmvenv/lib/python3.10/site-packages/twisted/internet/defer.py", line 190, in maybeDeferred
result = f(*args, **kwargs)
File "/home/standup/joinmarket-clientserver/jmvenv/lib/python3.10/site-packages/klein/_resource.py", line 196, in _execute
d = defer.maybeDeferred(
--- <exception caught here> ---
File "/home/standup/joinmarket-clientserver/jmvenv/lib/python3.10/site-packages/twisted/internet/defer.py", line 190, in maybeDeferred
result = f(*args, **kwargs)
File "/home/standup/joinmarket-clientserver/jmvenv/lib/python3.10/site-packages/klein/_app.py", line 129, in execute_endpoint
return endpoint_f(self._instance, *args, **kwargs)
File "/home/standup/joinmarket-clientserver/jmvenv/lib/python3.10/site-packages/klein/_app.py", line 241, in _f
return _call(instance, f, request, *a, **kw)
File "/home/standup/joinmarket-clientserver/jmvenv/lib/python3.10/site-packages/klein/_app.py", line 60, in _call
result = __klein_f__(*args, **kwargs)
File "/home/standup/joinmarket-clientserver/jmclient/jmclient/wallet_rpc.py", line 960, in getaddress
address = self.services["wallet"].get_external_addr(mixdepth)
File "/home/standup/joinmarket-clientserver/jmclient/jmclient/wallet_service.py", line 996, in get_external_addr
self.import_addr(addr)
File "/home/standup/joinmarket-clientserver/jmclient/jmclient/wallet_service.py", line 938, in import_addr
self.bci.import_addresses([addr], self.wallet.get_wallet_name())
File "/home/standup/joinmarket-clientserver/jmclient/jmclient/blockchaininterface.py", line 290, in import_addresses
sys.exit(EXIT_FAILURE)
builtins.SystemExit: 1
fwiw i've attempted to start from scratch and still get the same error... to reproduce:
Setup a node on regtest.
Create jm-test-wallet
in ~/.bitcoin/regtest/wallets
.
Install jm:
cd joinmarket-clientserver
./install.sh
source jmvenv/bin/activate
cd scripts
python wallet-tool.py generate
Configure jm:
# options: bitcoin-rpc, regtest, bitcoin-rpc-no-history, no-blockchain
# When using bitcoin-rpc-no-history remember to increase the gap limit to scan for more addresses, try -g 5000
# Use 'no-blockchain' to run the ob-watcher.py script in scripts/obwatch without current access
# to Bitcoin Core; note that use of this option for any other purpose is currently unsupported.
blockchain_source = bitcoin-rpc
network = testnet
rpc_host = localhost
rpc_port = 18443
rpc_user = bitcoinrpc rpc_password = password
rpc_wallet_file = jm-test-wallet
- Setup a self signed cert:
```cd .joinmarket
mkdir ssl
cd ssl
openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -sha256 -days 365
Start the jm wallet daemon:
source jmvenv/bin/activate
cd scripts
python jmwalletd.py
Create a new wallet:
POST .../api/v1/wallet/create
Unlock the wallet and show mix depths with display
:
POST .../api/v1/wallet/FullyNoded-b3fkeJrP6C.jmdat/unlock
GET .../api/v1/wallet/FullyNoded-b3fkeJrP6C.jmdat/display
Fatal Sync error: Joinmarket will not load wallet in this conflicted state. Create a new Joinmarket wallet or a bitcoin core wallet I have tried creating a new joinmarket wallet too, but still the same error. Any suggestions
# options: bitcoin-rpc, regtest, bitcoin-rpc-no-history, no-blockchain # When using bitcoin-rpc-no-history remember to increase the gap limit to scan for more addresses, try -g 5000 # Use 'no-blockchain' to run the ob-watcher.py script in scripts/obwatch without current access # to Bitcoin Core; note that use of this option for any other purpose is currently unsupported. blockchain_source = bitcoin-rpc
Try setting blockchain_source
to regtest
. This is what is working for the Jam regtest env.
Thanks a lot, this worked. So now i hope to use all the interface api's
I didn't read the config comment, always stopped reading that part at bitcoin-rpc
😅 Thanks for clarifying!
I am using bitcoin v23.0 on regtest. When I run
https://xxx:28183/api/v1/wallet/create
to my jm server I get the following error:My
joinmarket.cfg
: