Hello Bitcoin Core version 0.20.1 Last transaction sent 7/29/2020. Upgrade from 0.18 to 0.20. Last transaction received 10/27/2020 Upgrade from 0.20 to 0.20.1 today. Cannot send any transaction, error; "Can't generate a change-address key. No keys in the internal keypool and can't generate any keys." Any feedback will be appreciated, can't use my wallet. Looked other issues like this, can't find a way to fix it. Wallet is looked and encrypted since 2014.
-
Smesterj1952 commented at 10:57 PM on January 6, 2021: none
-
MarcoFalke commented at 7:49 AM on January 7, 2021: member
Duplicate of #16091 ? Thus, fixed in 0.21.0
-
p3yot3 commented at 11:21 AM on January 7, 2021: none
Is it - definitely? I ask because I got no response when I asked this in #16091 & the issue has been ongoing since 26 May 2019 - that's 20 months of users being unable to access their BTC or use their wallets, which is quite disturbing for us early adopters considering the recent price increases.
-
Smesterj1952 commented at 2:53 PM on January 7, 2021: none
It looks like definitely, will try to make another brand new wallet and restore from a previous backup to see what happen. Did you try installing v0.17.1 using same wallet.dat and then use the upgrade command?
-
p3yot3 commented at 3:01 PM on January 7, 2021: none
I was going to try that, but other users complained of stuck transactions after doing so in the other thread, so I wasn't prepared to risk it.
-
Smesterj1952 commented at 3:13 PM on January 7, 2021: none
To risk what? We cannot use the wallet anyway whatever is there we lost it already. I will try it if the new restored wallet does not work.
-
Smesterj1952 commented at 3:28 PM on January 7, 2021: none
I am using 0.21.1 and still having same issue.
?????
On Thu, Jan 7, 2021 at 2:49 AM MarcoFalke notifications@github.com wrote:
Duplicate of #16091 https://github.com/bitcoin/bitcoin/issues/16091 ? Thus, fixed in 0.21.0
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/bitcoin/bitcoin/issues/20871#issuecomment-755947938, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASMCNKKVRQPXLDCEIIOPIV3SYVRP3ANCNFSM4VYFQYNQ .
-
p3yot3 commented at 3:42 PM on January 7, 2021: none
I am using 0.21.1 and still having same issue. ????? …
This is what I feared. With the current price rises there will be more & more early adopters digging out their old wallets only to find that they are unusable - it's a terrible situation to find oneself in & should have been documented & addressed as soon as the issue became apparent - which was almost two years ago now. WTF?!
-
MarcoFalke commented at 3:55 PM on January 7, 2021: member
There is no Bitcoin Core 0.21.1. However, there is a 0.21.0rc5 (pre release version), so use at you own risk. See #20555.
What was the result of the
upgradewalletRPC? -
Smesterj1952 commented at 4:01 PM on January 7, 2021: none
Sorry, 0.20.1, the last version, I used your number in the previous reply "Thus, fixed in 0.21.0"
On Thu, Jan 7, 2021 at 10:55 AM MarcoFalke notifications@github.com wrote:
There is no Bitcoin Core 0.21.1. However, there is a 0.21.0rc5 (pre release version), so use at you own risk.
What was the result of the upgradewallet RPC?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/bitcoin/bitcoin/issues/20871#issuecomment-756203332, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASMCNKI3V7UJFLVXLPTYKK3SYXKOZANCNFSM4VYFQYNQ .
-
MarcoFalke commented at 5:06 PM on January 7, 2021: member
Yes, this should be fixed in 0.21.0, not 0.20.1
-
p3yot3 commented at 5:17 PM on January 7, 2021: none
Yes, this should be fixed in 0.21.0, not 0.20.1
Should be fixed? Sounds like you're still not sure - has the fix not been tested in the pre-release yet?
-
MarcoFalke commented at 5:28 PM on January 7, 2021: member
I don't have a "broken" wallet personally and I didn't create one to test this, but according to #16091 (comment) this is fixed in 0.21.0
-
p3yot3 commented at 5:34 PM on January 7, 2021: none
Yes, I saw that comment. That's fine for code gurus, but what about the average users (me included) who don't have a clue what "bashing" & "looping scripts" are - how would they apply the fix? The wallets aren't "broken" per-se, they are what was supplied for download & worked perfectly at the time. Code changes in releases since then are the problem because devs didn't fully check for backwards compatibility then ignored the issue when it was discovered over 20 months ago. this needs to be addressed as a matter of urgency & a fully tested & working fix applied, not just because I & a few others can't access their funds or use their wallets - but because there will be many more people running into the same problem very soon. The lamestream media will have a field day if this gets out - I can see the headline now: Early Bitcoin adopters locked out of wallets - devs unmoved. Really, this has gone on for far too long already.
-
MarcoFalke commented at 5:40 PM on January 7, 2021: member
There is no need to apply the fix. You simply download the release once it is available and test whether it works, with the usual caution of course. If you don't want to wait for the final release, you can get the pre-release version from https://bitcoincore.org/bin/bitcoin-core-0.21.0/test.rc5/
-
p3yot3 commented at 6:23 PM on January 7, 2021: none
There is no need to apply the fix. You simply download the release once it is available and test whether it works, with the usual caution of course. If you don't want to wait for the final release, you can get the pre-release version from https://bitcoincore.org/bin/bitcoin-core-0.21.0/test.rc5/
But @Smesterj1952 has already confirmed a few posts up that it doesn't work.
Edit: I'm trying the RC5 now, but "Warning: Fee estimation is not possible". Failed.
Edit1: Estimation now working. Tried sending & was asked to run "keypoolrefill":
Did that & tried again - same thing. Transaction failed.
-
p3yot3 commented at 7:33 PM on January 7, 2021: none
So, I can confirm what @Smesterj1952 has already said - the issue is still ongoing on RC5.
If you need any more help/info then let me know, but in the meantime please do not close this issue like you did the last one until a fully tested & proven fix is available. After waiting patiently for 20 months I think we deserve it, before the next release.
-
achow101 commented at 9:30 PM on January 7, 2021: member
@Smesterj1952 @p3yot3 Can you open the debug window and post the results of
getwalletinfo? For your privacy, please remove the lines forbalance,unconfirmed_balance, andimmature_balancebefore posting.From the other issue, it seems like using rc5 to upgrade the wallet fixed the issue, not using rc5 itself.
-
p3yot3 commented at 9:36 PM on January 7, 2021: none
@achow101 Here you go:
"walletname": "", "walletversion": 169900, "format": "bdb", "txcount": 815, "keypoololdest": 1435111019, "keypoolsize": 998, "keypoolsize_hd_internal": 0, "unlocked_until": 0, "paytxfee": 0.00000000, "private_keys_enabled": true, "avoid_reuse": false, "scanning": false, "descriptors": false
-
p3yot3 commented at 9:43 PM on January 7, 2021: none
In all honesty, I'm sure I must have done at some point since 0.17 - it was a long time ago so can't be sure when. I've not done it with this version though. What syntax should one use now when upgrading a wallet?
-
achow101 commented at 9:56 PM on January 7, 2021: member
In 0.21.0rc5, go to the debug console and do
upgradewallet. That should fix the problem. You must create a new backup after upgrading.
It looks like the cause of this problem is having a wallet version that is supposed to be HD split, but not having an hd seed in the wallet. You can tell because the wallet version is greater than 139900, but there is no
hdseedidin thegetwalletinfooutput. So how did this happen?In 0.17, we allowed the
-upgradewalletoption to upgrade a non-HD wallet to HD. This would set the version number to something that actually supports HD, HD split, and pre-split keypool. This upgrade would first increase the wallet version number, and then generate the new hd seed. However the hd seed would fail to generate for encrypted wallets and the software would crash at this point. But the new version number would already be written to the wallet file. Subsequent use of that wallet would make the software think it can support HD split even though it doesn't actually. Because of that, it would try to fetch keys from the empty internal keypool and additionally fail the check for whether new keys could be generated, thus causing the error you see.The check for whether new keys were generated depended on either the wallet version saying it is non-HD, or for there to be a HD seed. Since the wallet version purports to be HD and there is no HD seed, this would fail. The only reason you could still get new addresses and receive Bitcoin is because the keypool is big.
This should be resolved by 0.21 now supporting upgrading encrypted wallets. This upgrade will generate a HD seed for wallets that should be supporting HD based on the version number but do not currently have a seed (this is a side effect of how the upgrade works). However because your wallet will be believed to already support the split keypool, the pre-split keypool will not be used so a new backup must be created after upgrading. After the upgrade, all newly fetched change addresses will come from the newly generated HD seed.
To replicate this issue, create a non-HD wallet using 0.15.2 or older. Encrypt that wallet. Using any version 0.17 - 0.20 inclusive, do
-upgradewallet. The wallet will then have the same issue as described.getrawchangeaddressshould fail. Using 0.21+, unlock the wallet and doupgradewallet.getrawchangeaddressshould now work. -
p3yot3 commented at 10:01 PM on January 7, 2021: none
Right.....that's all well above my pay grade I'm afraid.......anyway - here's the result of using upgradewallet as you suggested:
"wallet_name": "", "previous_version": 169900, "current_version": 169900, "result": "Already at latest version. Wallet version unchanged."
Should I now try to make a transaction?.....
-
achow101 commented at 10:03 PM on January 7, 2021: member
Yes, try making a transaction.
That message is a bit misleading in this case, but it is reasonable given the state of the wallet. The upgrade still occurs as this message is produced after the upgrade function is called.
-
p3yot3 commented at 10:09 PM on January 7, 2021: none
SUCCESS!!!
I don't believe it - I was beginning to think I'd lost my entire investment - thankyouthankyouthankyou!! Praise the cybergods & yourself for saving my financial life - achow101 for president!!
Think I'm gonna cry - I need to lie down......
-
Smesterj1952 commented at 11:40 PM on January 7, 2021: none
Hey guys thank you for your help, when I created a new 0.20.1 wallet from scratch and restore from the previous "broken" wallet that bring the message, it went away, I can send Transactions now without any error. I also though I lost my Bitcoins but everything looks good now. I recommend everybody to have backups at least before installing a new version so anything happen you are able to recover.
- Smesterj1952 closed this on Jan 7, 2021
- DrahtBot locked this on Aug 16, 2022