You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Whiling trying to work with my wallet.db I found out that using the standardpassword hellorockstar doesnt actually work. With big help of @ziggie1984, he found out, that the actually wallet.db password ist not hellorockstar
Problem:
The unlock script for LND on BTCPayServer has a issue that led to all LND wallets being initialized and setup with an incorrect default password. Instead of the expected password hellorockstar, due to a coding mistake, the password included an extra line feed (\n) at the end, leading to an actual default password of hellorockstar\n for all LND wallets currently created.
This issue arises because the script did not properly strip newline characters from the password before storing it. As a result, all attempts to manually unlock the wallet with the expected password hellorockstar fail, since the actual password stored contains this hidden newline. Because of this, it is not possible to extract the masterrootkey in case of azeed loss because chantools doesnt support \n when entering the walletpassword.
@ziggie1984 from LND hast also released a special chantools version that can extract the xpriv/masterroot with the current password hellorockstar\n
A fix has been proposed by @ziggie1984 to address this issue by ensuring the trailing newline is not anymore included in the password when it is Base64-encoded and stored in the wallet. This ensures that future wallets are setup up and initialized with the correct password.
It also contains a fallback so that also with this fixed code, older wallets will still be able to unlock.
This change strips any extraneous newline or carriage return characters, ensuring the password is stored correctly.
Migration Plan:
For users whose wallets were initialized with the incorrect password (hellorockstar\n), a password migration process is necessary:
Use the LND REST API: Call the changepassword function using the old code logic to input the current incorrect password (hellorockstar\n).
Password Change: Since manual password entry won't work due to the incorrect stored password, the unlock process must first use the incorrect password to unlock the wallet because lnd asks for the old password. Then, the correct password can be set via the REST API with the new code
Automate the Process: A migration script could be included in the LND Docker startup bash script to check if the wallet is still using the old, incorrect password format. If so, the script could automate the password change process via the rest API function changepassword.
This ensures that wallets using hellorockstar\n as the password can be corrected without user intervention, preventing future unlock issues.
greetings
The text was updated successfully, but these errors were encountered:
Whiling trying to work with my wallet.db I found out that using the standardpassword
hellorockstar
doesnt actually work. With big help of @ziggie1984, he found out, that the actually wallet.db password ist nothellorockstar
Problem:
The unlock script for LND on BTCPayServer has a issue that led to all LND wallets being initialized and setup with an incorrect default password. Instead of the expected password
hellorockstar
, due to a coding mistake, the password included an extra line feed (\n
) at the end, leading to an actual default password ofhellorockstar\n
for all LND wallets currently created.This issue arises because the script did not properly strip newline characters from the password before storing it. As a result, all attempts to manually unlock the wallet with the expected password
hellorockstar
fail, since the actual password stored contains this hidden newline. Because of this, it is not possible to extract the masterrootkey in case of azeed loss because chantools doesnt support \n when entering the walletpassword.@ziggie1984 from LND hast also released a special chantools version that can extract the xpriv/masterroot with the current password hellorockstar
\n
to be found here:
https://github.com/ziggie1984/chantools/tree/btcpay-pw-fix
Current Fix:
A fix has been proposed by @ziggie1984 to address this issue by ensuring the trailing newline is not anymore included in the password when it is Base64-encoded and stored in the wallet. This ensures that future wallets are setup up and initialized with the correct password.
It also contains a fallback so that also with this fixed code, older wallets will still be able to unlock.
btcpayserver/lnd#7
This change strips any extraneous newline or carriage return characters, ensuring the password is stored correctly.
Migration Plan:
For users whose wallets were initialized with the incorrect password (
hellorockstar\n
), a password migration process is necessary:Use the LND REST API: Call the
changepassword
function using the old code logic to input the current incorrect password (hellorockstar\n
).Password Change: Since manual password entry won't work due to the incorrect stored password, the unlock process must first use the incorrect password to unlock the wallet because lnd asks for the old password. Then, the correct password can be set via the REST API with the new code
Automate the Process: A migration script could be included in the LND Docker startup bash script to check if the wallet is still using the old, incorrect password format. If so, the script could automate the password change process via the rest API function
changepassword
.This ensures that wallets using
hellorockstar\n
as the password can be corrected without user intervention, preventing future unlock issues.greetings
The text was updated successfully, but these errors were encountered: