getumbrel / umbrel-bitcoin

The official Bitcoin Node app for Umbrel, powered by Bitcoin Core.
https://umbrel.com
Other
34 stars 18 forks source link

Add `deprecatedrpc=create_bdb` to `bitcoin.conf` #19

Closed theborakompanioni closed 2 months ago

theborakompanioni commented 5 months ago

BerkeleyDB (BDB) wallet creation was deprecated in Bitcoin Core v26.0. This leads to issues for JoinMarket and thus also Jam. The problem should be fixed once JoinMarket supports Bitcoin Core descriptor wallets.

For the time being, the fix for affected users is to add deprecatedrpc=create_bdb to bitcoin.conf file.

Can this be added to Umbrel in order for users not getting annoyed by sudden malfunction after updating to Core v26? What is the proper procedure here?

Thank you for any feedback on this :pray:

nmfretz commented 4 months ago

For the time being, the fix for affected users is to add deprecatedrpc=create_bdb to bitcoin.conf file.

Can this be added to Umbrel in order for users not getting annoyed by sudden malfunction after updating to Core v26? What is the proper procedure here?

I will bring this up with the team and discuss, thanks for letting us know. One option could be to include a deprecratedrpc=create_bdb option in Advanced Settings for users to toggle on/off

theborakompanioni commented 4 months ago

For the time being, the fix for affected users is to add deprecatedrpc=create_bdb to bitcoin.conf file. Can this be added to Umbrel in order for users not getting annoyed by sudden malfunction after updating to Core v26? What is the proper procedure here?

I will bring this up with the team and discuss, thanks for letting us know. One option could be to include a deprecratedrpc=create_bdb option in Advanced Settings for users to toggle on/off

Not totally sure if this is that interesting to users as to include it in the visual settings section, but you do whatever you feel is best. Highly appreciate you bringing some attention to it :pray:

theborakompanioni commented 3 months ago

Any news on this one would be highly appreciated.

More and more users will run into this: https://github.com/joinmarket-webui/jam/issues/733

Can I help in any way?

nmfretz commented 2 months ago

Hi @theborakompanioni. Sorry for the delay on this. I have a Bitcoin Node app update ready to go here with deprecratedrpc=create_bdb: https://github.com/getumbrel/umbrel-apps/pull/1074

I tested installing Jam and creating a wallet using Bitcoin Core v26.0 WITHOUT deprecratedrpc=create_bdb and I didn't run into any errors. Is the expected behaviour that a wallet can still be created without deprecratedrpc=create_bdb in Core >=26.0 but other JoinMarket functionality won't work? Or would you expect actual wallet creation to fail?

More and more users will run into this: https://github.com/joinmarket-webui/jam/issues/733

Also, for issues like this where users are reporting a backend connection issue, are you sure that this is always related to deprecratedrpc=create_bdb? I'm actually able to recreate this if Jam tries to connect to Bitcoin Core when it is down. So I can recreate when updating the Bitcoin Node app (even with deprecratedrpc=create_bdb) or by simply stopping Bitcoin Core and trying to start Jam.

This is what I see in the Jam logs:

$ sudo docker logs -f jam_web_1
[WARN  tini (7)] Tini is not running as PID 1 and isn't registered as a child subreaper.
Zombie processes will not be re-parented to Tini, so zombie reaping won't work.
To fix the problem, use the -s option or set the environment variable TINI_SUBREAPER to register Tini as a child subreaper, or run Tini as PID 1.
Remove leftover wallet lockfiles before startup...
~/.joinmarket/ssl /src/scripts
Generating a RSA private key
.....................++++
.................................................................................................++++
writing new private key to 'key.pem'
-----
/src/scripts
Waiting for bitcoind to accept RPC requests...
Successfully waited for bitcoind to accept RPC requests.
Creating wallet jam_default if missing...
Loading wallet jam_default...
[  OK  ] nginx
[  OK  ] tor
[  OK  ] ob-watcher
[  OK  ] jmwalletd
[  OK  ] boot
dinit: Service jmwalletd process terminated with exit code 1
dinit: Service jmwalletd process terminated with exit code 1
dinit: Service jmwalletd process terminated with exit code 1
dinit: Service jmwalletd restarting too quickly; stopping.
dinit: Service jmwalletd restarting too quickly; stopping.
[STOPPD] jmwalletd

In the above logs, initial Jam install worked fine when the Bitcoin Node app on v26.0 WITHOUT deprecratedrpc=create_bdb. I created a wallet in Jam and the logs did not include any dinit errors (they stopped at [ OK ] boot), but then I tested the Bitcoin Node v27.0 update with deprecratedrpc=create_bdb. After Bitcoin update, Jam errored and jmwalletd stopped. I then could see this in the UI:

image

Restarting the Jam app fixes the issue.

UPDATE: I just tried a completely fresh install of Bitcoin v26 without deprecratedrpc=create_bdb and hit this issue. This time, multiple restarts of Jam did not fix the issue, but adding deprecratedrpc=create_bdb and restarting bitcoin/jam did fix it.

theborakompanioni commented 2 months ago

UPDATE: I just tried a completely fresh install of Bitcoin v26 without deprecratedrpc=create_bdb and hit this issue. This time, multiple restarts of Jam did not fix the issue, but adding deprecratedrpc=create_bdb and restarting bitcoin/jam did fix it.

Glad you could reproduce the problem! Highly appreciate the time and effort you put into this. Thank you :pray: Closing the issue now!