Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: codler on July 05, 2011, 10:29:56 PM



Title: Key pool?
Post by: codler on July 05, 2011, 10:29:56 PM
What is key pool? I do not understand this. https://en.bitcoin.it/wiki/Key_pool Could someone explain? Do it affect number of addresses you can have in wallet?


Title: Re: Key pool?
Post by: drawoc on July 06, 2011, 12:01:30 AM
That just means that when you first get a new wallet, it generates 100 new addresses, and puts them in your wallet. From then on, whenever you hit the "New address" button, you get one of those 100 addresses that was already in your wallet, but hidden from you. If you run out of those 100 addresses, another 100 are placed in your wallet.


Title: Re: Key pool?
Post by: koin on July 06, 2011, 12:40:45 AM
If you run out of those 100 addresses, another 100 are placed in your wallet.

i believe how it works is that as you use addresses from the pool, the pool is replenished so that it has 100 (by default, or whatever level is specified for the keypool size)


Title: Re: Key pool?
Post by: drawoc on July 06, 2011, 01:10:31 AM
i believe how it works is that as you use addresses from the pool, the pool is replenished so that it has 100 (by default, or whatever level is specified for the keypool size)

Read up on it more, and he's right. I stand corrected.


Title: Re: Key pool?
Post by: codler on July 06, 2011, 07:20:09 AM
If you run out of those 100 addresses, another 100 are placed in your wallet.

i believe how it works is that as you use addresses from the pool, the pool is replenished so that it has 100 (by default, or whatever level is specified for the keypool size)

So if I use 1 of 100 reserved addresses it will reserve 1 more address from pool so it has 100 addresses again?


Title: Re: Key pool?
Post by: Pieter Wuille on July 06, 2011, 09:41:34 AM
So if I use 1 of 100 reserved addresses it will reserve 1 more address from pool so it has 100 addresses again?

Exactly.

The reason for this is backups: if you have not used 100 extra addresses since your last backup, the backup will still have all necessary private keys.


Title: Re: Key pool?
Post by: codler on July 06, 2011, 10:23:37 AM
Thanks for the answers!

One more question. Are the reserved addresses stored locally or online?


Title: Re: Key pool?
Post by: kokjo on July 06, 2011, 12:13:48 PM
Thanks for the answers!

One more question. Are the reserved addresses stored locally or online?
in wallet.dat. very locally.


Title: Re: Key pool?
Post by: codler on July 07, 2011, 07:25:51 AM
Thanks for the answers!

One more question. Are the reserved addresses stored locally or online?
in wallet.dat. very locally.

In that case. If you have two computers with same wallet and then make 100transations on each computer, they will have different reserved addresses, right? Will that be a problem?


Title: Re: Key pool?
Post by: kokjo on July 07, 2011, 08:06:16 AM
Thanks for the answers!

One more question. Are the reserved addresses stored locally or online?
in wallet.dat. very locally.

In that case. If you have two computers with same wallet and then make 100transations on each computer, they will have different reserved addresses, right? Will that be a problem?
no. i don't think so. but the current client haves a few bug, so if something from the wallet gets transfered, the other client gets confused. but a bitcoin -rescan will fix it.