Bitcoin Forum
May 13, 2024, 07:46:54 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Mac OS X: Increase Bitcoin keypool  (Read 2066 times)
BitcoinGirl325 (OP)
Full Member
***
Offline Offline

Activity: 126
Merit: 100



View Profile
October 20, 2014, 09:50:37 PM
 #1

Hi there,

I am a complete newbie to command line options, and I was wondering if somebody could help give me step-by-step instructions on how to do this?

I am on the Mac, running OS X 10.9.5, and I am also running Bitcoin-QT 0.9.2.1.

I am trying to increase my keypool size to 1000, but I can't seem to get it to work.

From within Bitcoin-QT, I've pulled down from the "Help'" menu to "Debug window", and then I clicked on the "Console" tab, and then I typed in:

bitcoin-qt -keypool=1000

But it returns an error message to me that says:

Method not found (code -32601)

Can somebody please give me step-by-step instructions on how to increase the keypool to 1000? I couldn't find instructions in the Bitcoin Wiki, either.

Thanks!!

If you enjoyed my post or found it helpful, please feel free to donate BTC to me at: 15UKsghaHeLAtidySEHmPXBWRjBMM1Tw4u
1715586414
Hero Member
*
Offline Offline

Posts: 1715586414

View Profile Personal Message (Offline)

Ignore
1715586414
Reply with quote  #2

1715586414
Report to moderator
1715586414
Hero Member
*
Offline Offline

Posts: 1715586414

View Profile Personal Message (Offline)

Ignore
1715586414
Reply with quote  #2

1715586414
Report to moderator
Each block is stacked on top of the previous one. Adding another block to the top makes all lower blocks more difficult to remove: there is more "weight" above each block. A transaction in a block 6 blocks deep (6 confirmations) will be very difficult to remove.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715586414
Hero Member
*
Offline Offline

Posts: 1715586414

View Profile Personal Message (Offline)

Ignore
1715586414
Reply with quote  #2

1715586414
Report to moderator
1715586414
Hero Member
*
Offline Offline

Posts: 1715586414

View Profile Personal Message (Offline)

Ignore
1715586414
Reply with quote  #2

1715586414
Report to moderator
Balkhole
Member
**
Offline Offline

Activity: 76
Merit: 10


View Profile
October 20, 2014, 11:27:19 PM
 #2

Is there a reason why you need to be using QT specifically? There are a number of other clients that do not "lose" your private keys after the keypool is "used up"

multibit and/or blockchain.info might be good alternatives if you want a larger keypool (the equivalent)
BitcoinGirl325 (OP)
Full Member
***
Offline Offline

Activity: 126
Merit: 100



View Profile
October 21, 2014, 12:01:12 AM
 #3

Is there a reason why you need to be using QT specifically? There are a number of other clients that do not "lose" your private keys after the keypool is "used up"

multibit and/or blockchain.info might be good alternatives if you want a larger keypool (the equivalent)

Thanks. I prefer the functionality of a desktop wallet, and prefer to stick to the original client because it is the most secure & stable & thoroughly tested. It is also fully open source, unlike the other wallets.

Regarding Multibit, I've read about the horror stories of the bugs in Multibit which have caused people to lose all of their Bitcoins, and the lame excuses from the developers as to how these bugs only affect a "small portion" of their users.

If you enjoyed my post or found it helpful, please feel free to donate BTC to me at: 15UKsghaHeLAtidySEHmPXBWRjBMM1Tw4u
cr1776
Legendary
*
Offline Offline

Activity: 4032
Merit: 1301


View Profile
October 21, 2014, 12:03:52 AM
 #4

This command:
bitcoin-qt -keypool=1000

Is if you are running Bitcoin from the command line (e.g. Terminal in OS x, or a shell in Linux).

You can edit the config file to increase it, see:
https://en.bitcoin.it/wiki/Running_Bitcoin

You can see the OS x directory and file you need to edit with the keypool=1000 command.

In the wiki the example shows:
#keypool=100

which means it is commented out. You can edit it to say:
keypool=1000
BitcoinGirl325 (OP)
Full Member
***
Offline Offline

Activity: 126
Merit: 100



View Profile
October 21, 2014, 12:09:29 AM
 #5

This command:
bitcoin-qt -keypool=1000

Is if you are running Bitcoin from the command line (e.g. Terminal in OS x, or a shell in Linux).

You can edit the config file to increase it, see:
https://en.bitcoin.it/wiki/Running_Bitcoin

You can see the OS x directory and file you need to edit with the keypool=1000 command.

In the wiki the example shows:
#keypool=100

which means it is commented out. You can edit it to say:
keypool=1000

Thanks, I went into the OS X Terminal and typed in

bitcoin-qt -keypool=1000

but it returned the error message "command not found".

I don't feel comfortable creating & editing a config file. Would love to be able to just use the terminal command, but there seems to be no instructions anywhere on how to actually use these terminal commands.

(LOL. And we wonder why "normal people" don't use Bitcoin yet. This is so many years away from being easy enough for the mainstream populace! Wink)

If you enjoyed my post or found it helpful, please feel free to donate BTC to me at: 15UKsghaHeLAtidySEHmPXBWRjBMM1Tw4u
The Hacker known as 4chan
Newbie
*
Offline Offline

Activity: 7
Merit: 0


View Profile
October 21, 2014, 12:17:53 AM
 #6

This command:
bitcoin-qt -keypool=1000

Is if you are running Bitcoin from the command line (e.g. Terminal in OS x, or a shell in Linux).

You can edit the config file to increase it, see:
https://en.bitcoin.it/wiki/Running_Bitcoin

You can see the OS x directory and file you need to edit with the keypool=1000 command.

In the wiki the example shows:
#keypool=100

which means it is commented out. You can edit it to say:
keypool=1000

Thanks, I went into the OS X Terminal and typed in

bitcoin-qt -keypool=1000

but it returned the error message "command not found".

I don't feel comfortable creating & editing a config file. Would love to be able to just use the terminal command, but there seems to be no instructions anywhere on how to actually use these terminal commands.

(LOL. And we wonder why "normal people" don't use Bitcoin yet. This is so many years away from being easy enough for the mainstream populace! Wink)

You need to navigate to the directory bitcoin-qt is located in using the terminal before running the command.

More Complicated:
Otherwise for that command to work the moment you open the terminal, you need to edit your .bash_profile to include an EXPORT to the location where bitcoin-qt lives, that is if you want to be able to launch bitcoin-qt wherever you are in the terminal.

Just use 'cd' to get to where Bitcoin-qt lives then run the command
cr1776
Legendary
*
Offline Offline

Activity: 4032
Merit: 1301


View Profile
October 21, 2014, 12:22:19 AM
 #7

This command:
bitcoin-qt -keypool=1000

Is if you are running Bitcoin from the command line (e.g. Terminal in OS x, or a shell in Linux).

You can edit the config file to increase it, see:
https://en.bitcoin.it/wiki/Running_Bitcoin

You can see the OS x directory and file you need to edit with the keypool=1000 command.

In the wiki the example shows:
#keypool=100

which means it is commented out. You can edit it to say:
keypool=1000

Thanks, I went into the OS X Terminal and typed in

bitcoin-qt -keypool=1000

but it returned the error message "command not found".

I don't feel comfortable creating & editing a config file. Would love to be able to just use the terminal command, but there seems to be no instructions anywhere on how to actually use these terminal commands.

(LOL. And we wonder why "normal people" don't use Bitcoin yet. This is so many years away from being easy enough for the mainstream populace! Wink)

I agree about ease of use issues.

Something like this in Terminal (I'll be by a Mac tomorrow but I think I got it):
Code:
./Applications/Bitcoin-Qt.app/Contents/MacOS/Bitcoin-Qt -keypool=1000


This is just the path to the applications folder and then to the binary runtime (the actual program) inside the application bundle.

This will launch Bitcoin, so you want to quit it prior to this command.

BitcoinGirl325 (OP)
Full Member
***
Offline Offline

Activity: 126
Merit: 100



View Profile
October 21, 2014, 12:29:39 AM
 #8

Something like this in Terminal (I'll be by a Mac tomorrow but I think I got it):
Code:
./Applications/Bitcoin-Qt.app/Contents/MacOS/Bitcoin-Qt -keypool=1000

This is just the path to the applications folder and then to the binary runtime (the actual program) inside the application bundle.

This will launch Bitcoin, so you want to quit it prior to this command.


Ah, thanks so much!!! That worked, once I removed the period at the beginning of the path.

So, to summarize, I quit out of Bitcoin-Qt, then I launched OS X Terminal and typed:

/Applications/Bitcoin-Qt.app/Contents/MacOS/Bitcoin-Qt -keypool=1000

And that did the trick!! Thank you so much!! Smiley Smiley Smiley

If you enjoyed my post or found it helpful, please feel free to donate BTC to me at: 15UKsghaHeLAtidySEHmPXBWRjBMM1Tw4u
BitcoinGirl325 (OP)
Full Member
***
Offline Offline

Activity: 126
Merit: 100



View Profile
October 21, 2014, 12:33:47 AM
Last edit: October 21, 2014, 02:07:28 AM by BitcoinGirl325
 #9

Actually, I should say that I THINK it worked. Is there any way for me to tell if I now have 1,000 addresses in my Bitcoin-QT keypool? Is there a different terminal command that I can run, which will list all the public addresses in my keypool??  Huh  If I see a list of 1,000 addresses, then I know for sure that it worked! Smiley

If you enjoyed my post or found it helpful, please feel free to donate BTC to me at: 15UKsghaHeLAtidySEHmPXBWRjBMM1Tw4u
odolvlobo
Legendary
*
Offline Offline

Activity: 4312
Merit: 3214



View Profile
October 21, 2014, 01:37:32 AM
 #10

(LOL. And we wonder why "normal people" don't use Bitcoin yet. This is so many years away from being easy enough for the mainstream populace! Wink)

"normal people" don't need to change the size of the key pool or run their client from a command line.

Join an anti-signature campaign: Click ignore on the members of signature campaigns.
PGP Fingerprint: 6B6BC26599EC24EF7E29A405EAF050539D0B2925 Signing address: 13GAVJo8YaAuenj6keiEykwxWUZ7jMoSLt
grue
Legendary
*
Offline Offline

Activity: 2058
Merit: 1431



View Profile
October 21, 2014, 03:22:51 AM
 #11

Actually, I should say that I THINK it worked. Is there any way for me to tell if I now have 1,000 addresses in my Bitcoin-QT keypool? Is there a different terminal command that I can run, which will list all the public addresses in my keypool??  Huh  If I see a list of 1,000 addresses, then I know for sure that it worked! Smiley
in the debug console:
keypoolrefill

it should list the size of the keypool

It is pitch black. You are likely to be eaten by a grue.

Adblock for annoying signature ads | Enhanced Merit UI
BitcoinGirl325 (OP)
Full Member
***
Offline Offline

Activity: 126
Merit: 100



View Profile
October 21, 2014, 04:13:16 AM
 #12

Actually, I should say that I THINK it worked. Is there any way for me to tell if I now have 1,000 addresses in my Bitcoin-QT keypool? Is there a different terminal command that I can run, which will list all the public addresses in my keypool??  Huh  If I see a list of 1,000 addresses, then I know for sure that it worked! Smiley
in the debug console:
keypoolrefill

it should list the size of the keypool

Thanks. Nope, typing that in just yielded an empty line as the result.

If you enjoyed my post or found it helpful, please feel free to donate BTC to me at: 15UKsghaHeLAtidySEHmPXBWRjBMM1Tw4u
cr1776
Legendary
*
Offline Offline

Activity: 4032
Merit: 1301


View Profile
October 21, 2014, 04:26:42 PM
Last edit: October 22, 2014, 01:58:49 PM by cr1776
 #13

I believe that pywallet should be able to do it with its "--dumpwallet" command.  That should dump the wallet.

If you do a

keypoolrefill 1000

and it returns blank, that indicates it was successful.  To me it should return a success message, perhaps with a count returned, but that is just me.

BitcoinGirl325 (OP)
Full Member
***
Offline Offline

Activity: 126
Merit: 100



View Profile
October 21, 2014, 11:44:34 PM
 #14

Thanks. Hmmm... I guess there's no way for me to tell what the size of my keypool is at the current moment. In the Finder, my wallet.dat file is the same size today that it was last week, so I'm assuming that my keypool never increased in size.  Sad

If you enjoyed my post or found it helpful, please feel free to donate BTC to me at: 15UKsghaHeLAtidySEHmPXBWRjBMM1Tw4u
deepceleron
Legendary
*
Offline Offline

Activity: 1512
Merit: 1032



View Profile WWW
October 22, 2014, 04:20:59 AM
 #15

Bitcoin Core will tell you the size of the keypool through an RPC command, which you can also type in the debug->console window. Here you can see the result of me setting the default higher:


>getwalletinfo

{
"walletversion" : 60000,
"balance" : xx.xxxxxxxx,
"txcount" : xxx,
"keypoololdest" : 1308965703,
"keypoolsize" : 201
}



To have Bitcoin Core maintain a larger keypool size to future-proof wallet backups, you can increase the keypool size as an option in your Bitcoin configuration file. I have written a guide with an example configuration file which includes the keypool option - simply remove the comment "#" and change the setting from the default of 100. The "Bitcoin data directory" link there also takes you to documentation to locate your OS data directory.

If you want to use up the keypool, you can issue the "getrawchangeaddress" command as many times as you have addresses. Encrypting a wallet will also discard the keypool and generate a new one.
BitcoinGirl325 (OP)
Full Member
***
Offline Offline

Activity: 126
Merit: 100



View Profile
October 22, 2014, 05:02:52 AM
 #16

Bitcoin Core will tell you the size of the keypool through an RPC command, which you can also type in the debug->console window. Here you can see the result of me setting the default higher:


>getwalletinfo

{
"walletversion" : 60000,
"balance" : xx.xxxxxxxx,
"txcount" : xxx,
"keypoololdest" : 1308965703,
"keypoolsize" : 201
}



To have Bitcoin Core maintain a larger keypool size to future-proof wallet backups, you can increase the keypool size as an option in your Bitcoin configuration file. I have written a guide with an example configuration file which includes the keypool option - simply remove the comment "#" and change the setting from the default of 100. The "Bitcoin data directory" link there also takes you to documentation to locate your OS data directory.

If you want to use up the keypool, you can issue the "getrawchangeaddress" command as many times as you have addresses. Encrypting a wallet will also discard the keypool and generate a new one.

Thanks so much for your guidance. I ran the "getwalletinfo" command, and sure enough, my keypool size never increased yesterday when I ran the OS X Terminal command "bitcoin-qt -keypool=1000". No idea why it didn't work, but the "getwalletinfo" command confirmed to me that my keypoolsize was still at 101.

Then, I downloaded your sample configuration file -- thank you so much for creating this! I uncommented the keypool line and increased the number to 1000. I quit Bitcoin-QT, put the config file in the proper location (with the proper filename), and relaunched Bitcoin-QT. I created 4 new Receiving Addresses, then checked my keypoolsize with the "getwalletinfo" command, and it had not increased to 1000. Sad  Instead, it simply told me that my keypool size is 97, which was the number of new addresses deducted from the former keypool size of 101.

So I quit Bitcoin-QT, deleted the config file altogether, relaunched Bitcoin-QT, created 2 new receiving addresses, but now my keypool size number is down to 95. It's not refilling my keypool automatically! Isn't Bitcoin-QT always supposed to refill the keypool, and keep this number at 100 or 101? Now I'm losing my keypool altogether, and I don't think I did anything wrong. But now it seems like I don't have a keypool at all. Sad

Oh well, I'm clearly going to have to stop experimenting with all of this now. This is clearly waaay over my head, I can't figure it out, and I'm too nervous about making some change that is going to cause me to inadvertently lose my Bitcoins. It seems like I'm already on some path to destruction, because my keypool is no longer automatically refilling itself. So I'm going to stop now, and just make sure that I make backups every day. Now I don't have a auto-refilling keypool at all. Very sad. Sad  I wonder what will happen when it gets to 0?

If you enjoyed my post or found it helpful, please feel free to donate BTC to me at: 15UKsghaHeLAtidySEHmPXBWRjBMM1Tw4u
BitcoinGirl325 (OP)
Full Member
***
Offline Offline

Activity: 126
Merit: 100



View Profile
October 22, 2014, 05:07:20 AM
 #17

Oh wait, I just read this paragraph from https://en.bitcoin.it/wiki/Wallet_encryption

"When a wallet is encrypted, the passphrase is required to top up the keypool, thus, if the passphrase is rarely entered, it is possible that keypool might run out. In this case, the default key will be used as the target for payouts for mining, and calls to getnewaddress and getaccount address will return an error. In order to prevent such cases, the keypool is automatically refilled when walletpassphrase is called with a correct passphrase and when topupkeypool is called (while the wallet is unlocked). Note that the keypool continues to be topped up on various occasions when a new key from pool is used and the wallet is unlocked (or unencrypted)."

Okay, that seems like what is happening to me. My wallet is encrypted, but I rarely use my passphrase because I am just receiving Bitcoins at this point. So I suppose that I won't be able to really see what's going on until I enter my passphrase. I suppose that this is all the more reason to switch to a HD wallet!  Tongue

If you enjoyed my post or found it helpful, please feel free to donate BTC to me at: 15UKsghaHeLAtidySEHmPXBWRjBMM1Tw4u
BitcoinGirl325 (OP)
Full Member
***
Offline Offline

Activity: 126
Merit: 100



View Profile
October 25, 2015, 02:45:10 PM
 #18

I ended up figuring this out by doing it within Bitcoin Core itself, instead of the OS X Terminal.

These are the 3 steps I took:

1. I pulled down from the "Help" menu to "Debug Window", then clicked on the "Console" tab.

2. I typed in:
Code:
walletpassphrase "my password" 300
to unlock my wallet for 300 seconds.

3. I typed in:
Code:
keypoolrefill 10000
to increase the size of my keypool to 10000 addresses. It took a few minutes for it to complete the process.

Afterwards, to verify:
- I checked the size of my wallet.dat file in the OS X Finder, which had now increased to 4.4 MB.
- In Bitcoin Core's Debug Window, I typed in:
Code:
getwalletinfo
which confirmed my keypool size as 10001 addresses. (Where does it get that extra 1 address from, I wonder?)

Thanks for everyone's help! Smiley

If you enjoyed my post or found it helpful, please feel free to donate BTC to me at: 15UKsghaHeLAtidySEHmPXBWRjBMM1Tw4u
shorena
Copper Member
Legendary
*
Offline Offline

Activity: 1498
Merit: 1520


No I dont escrow anymore.


View Profile WWW
October 25, 2015, 05:58:44 PM
 #19

I ended up figuring this out by doing it within Bitcoin Core itself, instead of the OS X Terminal.

Just took a year Wink

These are the 3 steps I took:

1. I pulled down from the "Help" menu to "Debug Window", then clicked on the "Console" tab.

2. I typed in:
Code:
walletpassphrase "my password" 300
to unlock my wallet for 300 seconds.

3. I typed in:
Code:
keypoolrefill 10000
to increase the size of my keypool to 10000 addresses. It took a few minutes for it to complete the process.

Afterwards, to verify:
- I checked the size of my wallet.dat file in the OS X Finder, which had now increased to 4.4 MB.
- In Bitcoin Core's Debug Window, I typed in:
Code:
getwalletinfo
which confirmed my keypool size as 10001 addresses. (Where does it get that extra 1 address from, I wonder?)

Thanks for everyone's help! Smiley

It seems to go 1 over whenever it has to create new keys. I have noticed the same several times, but I dont know why. My assumption is that it expects a change address to be used with the next transaction and thus creates one more.

Im not really here, its just your imagination.
achow101
Moderator
Legendary
*
Offline Offline

Activity: 3388
Merit: 6635


Just writing some code


View Profile WWW
October 25, 2015, 06:43:58 PM
 #20

It seems to go 1 over whenever it has to create new keys. I have noticed the same several times, but I dont know why. My assumption is that it expects a change address to be used with the next transaction and thus creates one more.
I'm pretty sure it is just bad counting. I think it fills the keypool until the specified index (number you entered) has a key. The problem is that it starts counting from 0, so when you get to say index 10000, the size is actually 10001.

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!