Author

Topic: move wallet.dat from windows to linux (Read 324 times)

staff
Activity: 3458
Merit: 6793
Just writing some code
February 15, 2018, 08:21:55 PM
#12
If you created your wallet in an old version (< 0.13, i think) and upgraded it, yes.
No, there is currently no way to upgrade a non-HD wallet to a HD wallet. Upgrading requires generating a completely new wallet and moving your coins there or importing all of your private keys.

So, first, when my keypool empty - I cannot generate new bitcoin addresses =  Payment system  not working
Second - I have to enter password for wallet. On online computer. It's bad.
That is correct, you cannot generate new addresses to refill the keypool without unlocking your wallet. This is for security reasons. The private key needs to be stored somewhere once it has been generated. It cannot be stored unencrypted as that would be a security violation. The only way to store it encrypted is to provide the password so that the private key can be encrypted.
jr. member
Activity: 39
Merit: 6
February 15, 2018, 06:59:48 AM
#11
i'm already have HD wallet by default, with Bitcoin Core 0.15 - right?

If you created your wallet in 0.15, yes.
If you created your wallet in an old version (< 0.13, i think) and upgraded it, yes.
If you created your wallet before 0.13 and didn't upgrade the wallet with the startup command -upgradewallet, then no.



Are you sure I dont have to enter password and decrypt wallet  to refill my keypool? Because I dont think so. And I dont want to enter password for this wallet on online computer.

You don't have to "refill your keypool".
You can simply generate addresses on demand, without having to worry about inconsistency.
The first 100 generated addresses on your linux machine will be equivalent to the first 100 generated addresses on your windows machine.
The next 1000 (created on linux) will match those 1000 (created on windows), and so on.


So I made a tests:

bitcoin-cli  getwalletinfo
{
  "walletname": "wallet.dat",
  "walletversion": 139900,
  "balance": 0.00000000,
  "unconfirmed_balance": 0.00000000,
  "immature_balance": 0.00000000,
  "txcount": 0,
  "keypoololdest": 1518648916,
  "keypoolsize": 944,
  "keypoolsize_hd_internal": 1000,
  "unlocked_until": 0,
  "paytxfee": 0.00000000,


I have 1000 keys in pool  by default.

Then I  run: while true; do bitcoin-cli  getnewaddress;done

And now:
  "keypoolsize": 0,
  "keypoolsize_hd_internal": 1000,

and

bitcoin-cli  getnewaddress
error code: -12
error message:
Error: Keypool ran out, please call keypoolrefill first


and

bitcoin-cli  keypoolrefill 1000
error code: -13
error message:
Error: Please enter the wallet passphrase with walletpassphrase first.


So, first, when my keypool empty - I cannot generate new bitcoin addresses =  Payment system  not working
Second - I have to enter password for wallet. On online computer. It's bad.
legendary
Activity: 3290
Merit: 16489
Thick-Skinned Gang Leader and Golden Feather 2021
February 15, 2018, 05:06:28 AM
#10
i'm already have HD wallet by default, with Bitcoin Core 0.15 - right?
Check the icon on the bottom-right corner.

Are you sure I dont have to enter password and decrypt wallet  to refill my keypool? Because I dont think so. And I dont want to enter password for this wallet on online computer.
You don't have to "refill your keypool".
You can simply generate addresses on demand, without having to worry about inconsistency.
@bob123: I think you're wrong here: as far as I know, you need to enter your password to refill keypool.

Click Help > Debug window > Console, and enter getwalletinfo. It tells you the keypool size:
Code:
"keypoolsize": 1000,

Suggestion: if you copy your wallet.dat from the offline to the online computer before your keypool runs out, you don't have to enter your password on the online computer. Unless you use a lot of new addresses, this will work. I would last years with 1000 addresses.
legendary
Activity: 1624
Merit: 2481
February 15, 2018, 02:54:03 AM
#9
i'm already have HD wallet by default, with Bitcoin Core 0.15 - right?

If you created your wallet in 0.15, yes.
If you created your wallet in an old version (< 0.13, i think) and upgraded it, yes.
If you created your wallet before 0.13 and didn't upgrade the wallet with the startup command -upgradewallet, then no.



Are you sure I dont have to enter password and decrypt wallet  to refill my keypool? Because I dont think so. And I dont want to enter password for this wallet on online computer.

You don't have to "refill your keypool".
You can simply generate addresses on demand, without having to worry about inconsistency.
The first 100 generated addresses on your linux machine will be equivalent to the first 100 generated addresses on your windows machine.
The next 1000 (created on linux) will match those 1000 (created on windows), and so on.
jr. member
Activity: 39
Merit: 6
February 14, 2018, 06:59:20 PM
#8
Can you please remember, maybe you update your Bitcoin Core and after you got just 1000 keys in keypool

If you create a new (Hierarchical Deterministic [1]) wallet and send your funds to this new wallet,
you won't have to fill any keypool. You will be able to generate an 'infinite' amount of addresses.

The addresses will be created in the same order in both of your wallets.

You can think of it as a mathemtical equation to derive a private key from the seed (plus a counter).


[1] HD wallet: https://en.bitcoin.it/wiki/Deterministic_wallet

i'm already have HD wallet by default, with Bitcoin Core 0.15 - right?

Are you sure I dont have to enter password and decrypt wallet  to refill my keypool? Because I dont think so. And I dont want to enter password for this wallet on online computer.
legendary
Activity: 1624
Merit: 2481
February 14, 2018, 03:28:44 PM
#7
Can you please remember, maybe you update your Bitcoin Core and after you got just 1000 keys in keypool

If you create a new (Hierarchical Deterministic [1]) wallet and send your funds to this new wallet,
you won't have to fill any keypool. You will be able to generate an 'infinite' amount of addresses.

The addresses will be created in the same order in both of your wallets.

You can think of it as a mathemtical equation to derive a private key from the seed (plus a counter).


[1] HD wallet: https://en.bitcoin.it/wiki/Deterministic_wallet
jr. member
Activity: 39
Merit: 6
February 14, 2018, 02:44:21 PM
#6
Do you want to move it, or copy it and keep using both?

When the default keypool was only 100, I once set it to 10,000. Now it's back to the default value (1000), I'm not sure at what point it got lower again, but it did. Keep this in mind!
If at all possible, can you move to a new HD wallet? With a HD wallet you don't have to worry about keypools again (unless you change the password).

One last thought: although it works fine to use the same wallet on two computers, your address book entries will only show up on the computer that created them.


Thats why i'm asking. I dont want to loose all new keys after keypoolrefill.

Can you please remember, maybe you update your Bitcoin Core and after you got just 1000 keys in keypool?

legendary
Activity: 3290
Merit: 3092
February 14, 2018, 02:03:47 PM
#5
Hello,

I have password-encrypted wallet.dat on windows computer.
On windows, I want to refill keypool with 5000 addresses (keypoolrefill )
And I want to move this wallet to linux.
Bitcoin Core 0.15 on both computers.

Is that works? Any future problems with wallet encryption or keypool refill?

Thanks

Do you have the original password you generated when you created the wallet.dat? if you have it then there shouldn't be a problem for the import.
 
But what i recommend is to get a backup of your privatekeys, that way you will be able to import your addys to any wallet in the future, no matter the operative system or the wallet by it self, at end all of them support importing a private key.  Wink
newbie
Activity: 32
Merit: 0
February 13, 2018, 07:19:56 PM
#4
Btw You can create a newly backup wallet with the command "backupwallet" in "Tools" -> "Debug console".
staff
Activity: 3290
Merit: 4114
February 13, 2018, 06:58:03 PM
#3
You should be able to just move it without any issues as long as the backup was made correctly and isn't missing anything, and isn't corrupted. You should check that it works first before moving it over.

It should be fine to just move it into the Linux machine, but I would suggest you keep a backup on a USB or something anyway just to be safe.
legendary
Activity: 3290
Merit: 16489
Thick-Skinned Gang Leader and Golden Feather 2021
February 13, 2018, 02:24:16 PM
#2
Do you want to move it, or copy it and keep using both?

When the default keypool was only 100, I once set it to 10,000. Now it's back to the default value (1000), I'm not sure at what point it got lower again, but it did. Keep this in mind!
If at all possible, can you move to a new HD wallet? With a HD wallet you don't have to worry about keypools again (unless you change the password).

One last thought: although it works fine to use the same wallet on two computers, your address book entries will only show up on the computer that created them.
jr. member
Activity: 39
Merit: 6
February 13, 2018, 02:11:09 PM
#1
Hello,

I have password-encrypted wallet.dat on windows computer.
On windows, I want to refill keypool with 5000 addresses (keypoolrefill )
And I want to move this wallet to linux.
Bitcoin Core 0.15 on both computers.

Is that works? Any future problems with wallet encryption or keypool refill?

Thanks
Jump to: