Bitcoin Forum
April 26, 2024, 11:00:43 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Limit of recieving addresses  (Read 387 times)
AtheistAKASaneBrain (OP)
Hero Member
*****
Offline Offline

Activity: 770
Merit: 509


View Profile
October 16, 2017, 06:27:46 PM
Merited by ABCbits (1)
 #1

Im still using the pre-HD wallet format with Bitcoin Core, and I've just realized I have a ton of receiving addresses, im not sure how many. My questions are:

1- What is the limit of receiving per wallet? (I think it was 100)
2- Once you generate 100 addresses, does the program prompt you that if you generate more than 100, the oldest one will be replaced with the new one?
Because if this is not the case, it's pretty insane since you could lose receiving addresses that you generated years ago and are still used by people to send you money.
3- How do I check how many addresses I have generated thus far to know how many do I have left?
1714129243
Hero Member
*
Offline Offline

Posts: 1714129243

View Profile Personal Message (Offline)

Ignore
1714129243
Reply with quote  #2

1714129243
Report to moderator
1714129243
Hero Member
*
Offline Offline

Posts: 1714129243

View Profile Personal Message (Offline)

Ignore
1714129243
Reply with quote  #2

1714129243
Report to moderator
"The nature of Bitcoin is such that once version 0.1 was released, the core design was set in stone for the rest of its lifetime." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
achow101
Moderator
Legendary
*
expert
Offline Offline

Activity: 3374
Merit: 6535


Just writing some code


View Profile WWW
October 16, 2017, 06:41:44 PM
Merited by ABCbits (2)
 #2

1- What is the limit of receiving per wallet? (I think it was 100)
None. You can have a basically infinite number of addresses.

2- Once you generate 100 addresses, does the program prompt you that if you generate more than 100, the oldest one will be replaced with the new one?
Because if this is not the case, it's pretty insane since you could lose receiving addresses that you generated years ago and are still used by people to send you money.
No, old addresses are not deleted or replaced. You just keep generating more and more.

The 100 addresses thing is actually a lookahead keypool, mostly useful for backups. Basically, 100 keys are generated, and when want a new receiving address, it gives you one of those 100 keys and generates another one to replace it in the keypool. The one given to you is removed from the keypool and held onto elsewhere as a "used" key. Keys are never deleted or replaced so you can have hundreds or thousands of keys used in your wallet.

3- How do I check how many addresses I have generated thus far to know how many do I have left?
Go to the debug console and use the getwalletinfo command. That will tell you how many keys are remaining in your keypool. The keypool is refilled every time you unlock your wallet, so it should be 100 keys (it may be 1000 if you are using Bitcoin Core 0.15+). I don't think there is any way to see how many keys have been used, but that shouldn't be hard to implement.

xhomerx10
Legendary
*
Offline Offline

Activity: 3822
Merit: 7968



View Profile
October 16, 2017, 10:41:50 PM
 #3

Come on now

115792089237316195423570985008687907853269984665640564039457584007913129639935 is not that close to infinity.  Smiley
AtheistAKASaneBrain (OP)
Hero Member
*****
Offline Offline

Activity: 770
Merit: 509


View Profile
October 17, 2017, 02:47:01 PM
 #4

1- What is the limit of receiving per wallet? (I think it was 100)
None. You can have a basically infinite number of addresses.

2- Once you generate 100 addresses, does the program prompt you that if you generate more than 100, the oldest one will be replaced with the new one?
Because if this is not the case, it's pretty insane since you could lose receiving addresses that you generated years ago and are still used by people to send you money.
No, old addresses are not deleted or replaced. You just keep generating more and more.

The 100 addresses thing is actually a lookahead keypool, mostly useful for backups. Basically, 100 keys are generated, and when want a new receiving address, it gives you one of those 100 keys and generates another one to replace it in the keypool. The one given to you is removed from the keypool and held onto elsewhere as a "used" key. Keys are never deleted or replaced so you can have hundreds or thousands of keys used in your wallet.

3- How do I check how many addresses I have generated thus far to know how many do I have left?
Go to the debug console and use the getwalletinfo command. That will tell you how many keys are remaining in your keypool. The keypool is refilled every time you unlock your wallet, so it should be 100 keys (it may be 1000 if you are using Bitcoin Core 0.15+). I don't think there is any way to see how many keys have been used, but that shouldn't be hard to implement.

I see. I was getting paranoid now about the old format. I haven't found the time yet to update it to the new format, and honestly im not sure if I want to, since some clients don't support the new format I think.

So if I never update to the new HD format, I can be safe and keep generating any amount of addresses I want without overlapping existing addresses, what are the benefits of the HD format? I was wondering if it's really worth it, since I would need to move my coins and pay fees. I guess I would do it when I can be arsed to access coins in forked chains (I still didn't access my BCash etc).
achow101
Moderator
Legendary
*
expert
Offline Offline

Activity: 3374
Merit: 6535


Just writing some code


View Profile WWW
October 17, 2017, 03:07:25 PM
 #5

I see. I was getting paranoid now about the old format. I haven't found the time yet to update it to the new format, and honestly im not sure if I want to, since some clients don't support the new format I think.
The latest wallet format is compatible with Bitcoin Core 0.14.0+.

So if I never update to the new HD format, I can be safe and keep generating any amount of addresses I want without overlapping existing addresses, what are the benefits of the HD format? I was wondering if it's really worth it, since I would need to move my coins and pay fees. I guess I would do it when I can be arsed to access coins in forked chains (I still didn't access my BCash etc).
The benefit of the HD wallet is that you can make multiple backups and still have your old backups be relevant and useful. With non-HD wallets, a backup will become useless when you use more addresses than what was in the keypool of that backup. With HD wallets, that is no longer the case. Although the keypool might run out at first, you can extend the keypool to be thousands of keys so that an older backup can still be used to restore all of your keys.

Also, Bitcoin Core will soon have the option to upgrade a non-HD wallet to an HD wallet (soon being hopefully 0.16). This will mean that once you upgrade your wallet to be an HD wallet, all new keys will be HD and you will still have your non-HD keys in the wallet so you can continue to use your wallet normally. It does mean that your old coins are not protected by the HD functionality, but your new coins will be, and as you transact and make change, your old coins will transition to the HD keys as well.

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!