Bitcoin Forum
July 26, 2024, 05:29:32 AM *
News: Help 1Dq create 15th anniversary forum artwork.
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Public Keys & Wallet Backup  (Read 476 times)
hayek (OP)
Sr. Member
****
Offline Offline

Activity: 370
Merit: 250


View Profile
November 13, 2013, 06:58:22 PM
 #1

Weird question

1.) I backup my wallet.
2.) I generate a new address
3.) Send BTC to the new address
4.) Delete current wallet
5.) Restore from backup

Will I lose the BTC I sent in step 3? Even if I generate a new address it won't be the same public key since a new address generates a new keypair. Or does the keypool address this problem? So I would have to generate enough new addresses to get a new key pair from a new keypool not in my backup wallet?
panck4beer
Full Member
***
Offline Offline

Activity: 140
Merit: 100



View Profile
November 13, 2013, 07:00:27 PM
 #2

Will I lose the BTC I sent in step 3?


No, 100 addresses are always pregenerated in wallet.dat

panck4beer
Full Member
***
Offline Offline

Activity: 140
Merit: 100



View Profile
November 13, 2013, 07:03:18 PM
 #3

So I would have to generate enough new addresses to get a new key pair from a new keypool not in my backup wallet?


Yes, over 100, including using change addresses when you send BTC

odolvlobo
Legendary
*
Offline Offline

Activity: 4382
Merit: 3299



View Profile
November 13, 2013, 07:06:56 PM
 #4

Will I lose the BTC I sent in step 3?
No, 100 addresses are always pregenerated in wallet.dat

That is how Bitcoin-QT works, but other wallet software works differently.

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

Activity: 3472
Merit: 4755



View Profile
November 13, 2013, 07:17:23 PM
 #5

does the keypool address this problem? So I would have to generate enough new addresses to get a new key pair from a new keypool not in my backup wallet?

It depends on the wallet (Bitcoin-Qt? Electrum? MultiBit?).  Different wallets result in different behavior.

In the case of Bitcoin-Qt you are correct, the keypool addresses this problem, and you'd have to generate enough new addresses to get a new key pair that is not in the keypool of your backup wallet.

Keep in mind that Bitcoin-Qt uses a new address from the keypool every time you send a transaction.  Therefore, you need to count not only the times you click the "New Address" button, but also how many transactions you've sent since your last backup.  When the sum of both those things together exceeds 100, you will then have addresses in your wallet that are not stored in the backup.
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!