Bitcoin Forum
May 09, 2024, 07:33:53 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1] 2 »  All
  Print  
Author Topic: Show Message/Counter when address pool since last backup has been depleted.  (Read 3659 times)
Mushoz (OP)
Hero Member
*****
Offline Offline

Activity: 686
Merit: 500


Bitbuy


View Profile WWW
July 11, 2012, 11:33:32 PM
 #1

Currently there's no easy way to see if the address pool of 100 new addresses since your last backup has been used up. Bitcoin-qt currently has a backup feature build in, so wouldn't it be quite easy to implement either a counter or message that notifies the user when a new backup is needed to keep his/her funds safe? This counter could be reset each time a new backup is created inside Bitcoin-qt. Now I know some people use different/automatic backup procedures, but a simple command in the config file could disable this feature.

Thoughts/suggestions?

www.bitbuy.nl - Koop eenvoudig, snel en goedkoop bitcoins bij Bitbuy!
1715283233
Hero Member
*
Offline Offline

Posts: 1715283233

View Profile Personal Message (Offline)

Ignore
1715283233
Reply with quote  #2

1715283233
Report to moderator
1715283233
Hero Member
*
Offline Offline

Posts: 1715283233

View Profile Personal Message (Offline)

Ignore
1715283233
Reply with quote  #2

1715283233
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.
1715283233
Hero Member
*
Offline Offline

Posts: 1715283233

View Profile Personal Message (Offline)

Ignore
1715283233
Reply with quote  #2

1715283233
Report to moderator
casascius
Mike Caldwell
VIP
Legendary
*
Offline Offline

Activity: 1386
Merit: 1136


The Casascius 1oz 10BTC Silver Round (w/ Gold B)


View Profile WWW
July 12, 2012, 12:26:16 AM
 #2

One could just as easily increase the key pool to 2000 or 5000 addresses and know that the average user will probably die before they run out of addresses.  Then such a feature reminding them they're low on pool addresses wouldn't be needed.

Companies claiming they got hacked and lost your coins sounds like fraud so perfect it could be called fashionable.  I never believe them.  If I ever experience the misfortune of a real intrusion, I declare I have been honest about the way I have managed the keys in Casascius Coins.  I maintain no ability to recover or reproduce the keys, not even under limitless duress or total intrusion.  Remember that trusting strangers with your coins without any recourse is, as a matter of principle, not a best practice.  Don't keep coins online. Use paper or hardware wallets instead.
Diapolo
Hero Member
*****
Offline Offline

Activity: 769
Merit: 500



View Profile WWW
July 12, 2012, 07:14:05 AM
Last edit: July 12, 2012, 07:33:56 AM by Diapolo
 #3

Is there an RPC command to see how many keys are used / free?

RPC getinfo shows the keypoolsize!

Dia

Liked my former work for Bitcoin Core? Drop me a donation via:
1PwnvixzVAKnAqp8LCV8iuv7ohzX2pbn5x
bitcoin:1PwnvixzVAKnAqp8LCV8iuv7ohzX2pbn5x?label=Diapolo
flower1024
Legendary
*
Offline Offline

Activity: 1428
Merit: 1000


View Profile
July 12, 2012, 12:54:53 PM
 #4

i would love this feature
even better: show a warning message if there is a privkey going to be used which is not contained in the last backup.
DeathAndTaxes
Donator
Legendary
*
Offline Offline

Activity: 1218
Merit: 1079


Gerald Davis


View Profile
July 12, 2012, 01:02:06 PM
Last edit: July 12, 2012, 01:42:52 PM by DeathAndTaxes
 #5

i would love this feature
even better: show a warning message if there is a privkey going to be used which is not contained in the last backup.

This.  From a usability standpoint having a counter is just another stats, number, widget which adds screen clutter and confusion.  However storing the last key included in the backup and then warning the user when trying to use (either by change address or new address button) a key not included in the last backup would be useful.

Quote
This operation will send bitcoins to a key not included in your last backup.  Funds may be lost if wallet is lost or corrupted.  
                It is strongly recommended you create a backup of your wallet before making this transaction.   Do you want to backup your wallet now?

[Yes] [No (Loss of funds possible)] [Backup after this transaction is completed]
[ ] Do not warn me about the potential for key loss again

Hell maybe in "noob mode" the wallet simply wouldn't allow you to do anything until you make a backup.  
Quote
The backup of your wallet is out of date.  This transaction can not be recovered from your existing backup.  Funds may be lost if the wallet becomes lost or corrupt.
You must make a backup of your wallet before continuing with this transaction.

[Make Backup Now]

If the second method is used I would include a "nag screen" (can be disabled in options) which starts when there are 10 or less backed up keys in the keypool.  Granted it isn't "foolproof"; a user can click make backup and then not safely store it.  User can make backups outside the GUI and get false warnings but it would provide "pretty good protection".

Another easy precaution would be to simply increase the default size of the keypool.  The default is currently 100. Even a casual user may use 1 or 2 addresses per day.  That means a backup is only good for roughly 60 days worth of addresses.   More active users (satoshi dice) could obsolete their backup in a matter of days.  Pretty easy for an inexperienced user to be running on a wallet no longer protected by a backup and not know it.  Given how tiny keys are I think making the default size 500 or even 1000 keys would be very useful.  Even 1,000 keys in a keypool makes the initially wallet only ~300KB.   Compared to a block chain in GB trying to save a couple hundred KB and putting funds at risk seems silly.

Advanced users who need ultra-small wallet sizes can modify the keypool to be smaller (even a keypool of zero) just like they could disable the backup warnings.
DeathAndTaxes
Donator
Legendary
*
Offline Offline

Activity: 1218
Merit: 1079


Gerald Davis


View Profile
July 12, 2012, 01:03:31 PM
 #6

Is there an RPC command to see how many keys are used / free?

RPC getinfo shows the keypoolsize!

Dia

No such concept.  The keypool is continually refilled.

If you have a keypool of 100 keys and use a key the oldest key in the keypool is added to the active key portion of the wallet and the a new key created and added to the keypool.  The keypool will always be 100 keys.  The question is are there any keys in the keypool which aren't in your last backup.
Diapolo
Hero Member
*****
Offline Offline

Activity: 769
Merit: 500



View Profile WWW
July 12, 2012, 01:08:33 PM
 #7

Is there an RPC command to see how many keys are used / free?

RPC getinfo shows the keypoolsize!

Dia

No such concept.  The keypool is continually refilled.

If you have a keypool of 100 keys and use a key the oldest key in the keypool is added to the active key portion of the wallet and the a new key created and added to the keypool.  The keypool will always be 100 keys.  The question is are there any keys in the keypool which aren't in your last backup.

Strange that I have 103 in my testnet-wallet ... but thanks for your explanation anyway Smiley. I also like the suggested feature!

Dia

Liked my former work for Bitcoin Core? Drop me a donation via:
1PwnvixzVAKnAqp8LCV8iuv7ohzX2pbn5x
bitcoin:1PwnvixzVAKnAqp8LCV8iuv7ohzX2pbn5x?label=Diapolo
flower1024
Legendary
*
Offline Offline

Activity: 1428
Merit: 1000


View Profile
July 12, 2012, 01:12:27 PM
 #8

if nobody is faster i'll try to implement it this weekend.
Diapolo
Hero Member
*****
Offline Offline

Activity: 769
Merit: 500



View Profile WWW
July 12, 2012, 01:29:30 PM
 #9

if nobody is faster i'll try to implement it this weekend.

That would be a very good thing Smiley.

Dia

Liked my former work for Bitcoin Core? Drop me a donation via:
1PwnvixzVAKnAqp8LCV8iuv7ohzX2pbn5x
bitcoin:1PwnvixzVAKnAqp8LCV8iuv7ohzX2pbn5x?label=Diapolo
DeathAndTaxes
Donator
Legendary
*
Offline Offline

Activity: 1218
Merit: 1079


Gerald Davis


View Profile
July 12, 2012, 01:44:54 PM
 #10

Strange that I have 103 in my testnet-wallet ... but thanks for your explanation anyway Smiley.

Well you made me check and "getinfo" from PRC on our company cold wallet shows keypool 4630.  I know altered that to 5,000 before using the wallet (although wallet was already created before keypool was raised).

So that makes me unsure of the meaning and/or accurate of the "keypool" line in RPC call "getinfo".
Or maybe my understanding of keypool is flawed.  <- this would be bad because a lot of our wallet protection procedures are based on it. Sad

I think I will start a new thread unless someone knows.
Diapolo
Hero Member
*****
Offline Offline

Activity: 769
Merit: 500



View Profile WWW
July 12, 2012, 01:47:25 PM
 #11

Strange that I have 103 in my testnet-wallet ... but thanks for your explanation anyway Smiley.

Well you made me check and "getinfo" from PRC on my wallet shows keypool 4630 however I know I set it to 5,000 even when I created this wallet.  I am not sure if keypool line in "getinfo" is showing the size of the keypool or is inaccurate?

Or maybe my understanding of keypool is flawed.  <- this would be bad because a lot of our wallet protection procedures are based on it. Sad

Afaik getinfo should show the unused keys, which is strange for my number of 103 ^^.

Dia

Liked my former work for Bitcoin Core? Drop me a donation via:
1PwnvixzVAKnAqp8LCV8iuv7ohzX2pbn5x
bitcoin:1PwnvixzVAKnAqp8LCV8iuv7ohzX2pbn5x?label=Diapolo
DeathAndTaxes
Donator
Legendary
*
Offline Offline

Activity: 1218
Merit: 1079


Gerald Davis


View Profile
July 12, 2012, 01:50:13 PM
 #12

Afaik getinfo should show the unused keys, which is strange for my number of 103 ^^.

Yeah very strange.
Diapolo
Hero Member
*****
Offline Offline

Activity: 769
Merit: 500



View Profile WWW
July 12, 2012, 02:07:34 PM
 #13

Afaik getinfo should show the unused keys, which is strange for my number of 103 ^^.

Yeah very strange.

Another wallet I use (mainnet) shows 101 ...

Dia

Liked my former work for Bitcoin Core? Drop me a donation via:
1PwnvixzVAKnAqp8LCV8iuv7ohzX2pbn5x
bitcoin:1PwnvixzVAKnAqp8LCV8iuv7ohzX2pbn5x?label=Diapolo
Mushoz (OP)
Hero Member
*****
Offline Offline

Activity: 686
Merit: 500


Bitbuy


View Profile WWW
July 12, 2012, 04:50:22 PM
 #14

Great ideas guys! Looking forward to seeing something get implemented.
Personally I think DeathAndTaxes ideas are really good. No matter how annoying those messages are, proper backups are really needed to get Bitcoin to the masses. Losing coins due to computer crashes will turn people off, even if it's their own fault, so forcing backups is a good thing in my opinion. I also agree that the default pool size should be increased. Two more things come to mind though:

-Do you guys think a warning message should be displayed if someone is backing up a non-encrypted wallet.dat? People could lose their coins if they backup their unencrypted wallet to an insecure place.
-Do you guys think there should be a message of some kind that explains to backup the wallet to separate locations? It won't surprise me to see lots of people backing their wallet up to C:\Backups\  Tongue

www.bitbuy.nl - Koop eenvoudig, snel en goedkoop bitcoins bij Bitbuy!
Gavin Andresen
Legendary
*
qt
Offline Offline

Activity: 1652
Merit: 2216


Chief Scientist


View Profile WWW
July 13, 2012, 12:54:41 AM
 #15

RE: 101 or 103 unused keys in the keypool:  That's normal.  Here's the sequence of events that causes it:

+ You do something that requests a new key from the keypool. Several things do that (including the 'getinfo' RPC call -- it requests a key from the keypool so it can report the keypoololdest time).
+ The keypool automatically adds new keys so there are always at least 100 (by default)
+ The something you did returns the key back to the keypool, so now there are 100+1

I tend to have 104 keys in my keypools, because I do a lot of 4-core CPU mining on testnet-in-a-box setups, and the 4 miner threads each grab a keypool key that is released when bitcoind quits.

RE: better backup:  good idea. However, the keypool might not survive for much longer; they're likely to be replaced by Hierarchical Deterministic Wallets (see https://en.bitcoin.it/wiki/BIP_0032 ).

How often do you get the chance to work on a potentially world-changing project?
Mushoz (OP)
Hero Member
*****
Offline Offline

Activity: 686
Merit: 500


Bitbuy


View Profile WWW
July 13, 2012, 12:58:32 AM
 #16

RE: 101 or 103 unused keys in the keypool:  That's normal.  Here's the sequence of events that causes it:

+ You do something that requests a new key from the keypool. Several things do that (including the 'getinfo' RPC call -- it requests a key from the keypool so it can report the keypoololdest time).
+ The keypool automatically adds new keys so there are always at least 100 (by default)
+ The something you did returns the key back to the keypool, so now there are 100+1

I tend to have 104 keys in my keypools, because I do a lot of 4-core CPU mining on testnet-in-a-box setups, and the 4 miner threads each grab a keypool key that is released when bitcoind quits.

RE: better backup:  good idea. However, the keypool might not survive for much longer; they're likely to be replaced by Hierarchical Deterministic Wallets (see https://en.bitcoin.it/wiki/BIP_0032 ).

Wow, that sounds even better. This means a single backup is sufficient to never lose any coins, correct? Ofcourse backups are still required to keep labels intact, but this would be way better than thread number 132497 with a person complaining he lost private keys to his funds. Awesome job, Gavin!

www.bitbuy.nl - Koop eenvoudig, snel en goedkoop bitcoins bij Bitbuy!
TangibleCryptography
Sr. Member
****
Offline Offline

Activity: 476
Merit: 250


Tangible Cryptography LLC


View Profile WWW
July 13, 2012, 01:08:43 AM
 #17

RE: 101 or 103 unused keys in the keypool:  That's normal.  Here's the sequence of events that causes it:

+ You do something that requests a new key from the keypool. Several things do that (including the 'getinfo' RPC call -- it requests a key from the keypool so it can report the keypoololdest time).
+ The keypool automatically adds new keys so there are always at least 100 (by default)
+ The something you did returns the key back to the keypool, so now there are 100+1

I tend to have 104 keys in my keypools, because I do a lot of 4-core CPU mining on testnet-in-a-box setups, and the 4 miner threads each grab a keypool key that is released when bitcoind quits.

Excellent explanation and now it won't keep bugging me.

Quote
RE: better backup:  good idea. However, the keypool might not survive for much longer; they're likely to be replaced by Hierarchical Deterministic Wallets (see https://en.bitcoin.it/wiki/BIP_0032 ).

All I can say is .... YES PLEASE!
etotheipi
Legendary
*
expert
Offline Offline

Activity: 1428
Merit: 1093


Core Armory Developer


View Profile WWW
July 13, 2012, 02:56:46 AM
Last edit: July 13, 2012, 05:46:00 AM by etotheipi
 #18

This is what deterministic wallets are for.  I hope the main devs are putting some priority on that.  (on a side note, I also want to upgrade my own wallet format in Armory and want to match the new Satoshi client wallets... if they ever get upgraded)

I am of the opinion that anything that requires persistent actions from the user will lead to failure.  Even fairly diligent users make mistakes -- they set up their backup drive once, but drive lettering gets switched for some reason and backups stop working, and the user is too lazy or doesn't even realize it needs to be corrected.  "Oh what's this error?  Eh, I'll deal with it later.".  Alternatively, for fear of losing your wallet, you backup to tons of different places, all the time, to be totally sure you got it, and now your wallets are scattered all over the place, and who knows if you can even find the latest one when you need it.  That can be a mess to sort out.  Not to mention a security issue to have your wallets everywhere...

I bet improper backups of non-deterministic wallets will lead to many more users losing coins than any online hacking/theft.  Yet, it's completely avoidable.  Use a deterministic wallet.  Back it up once, forever.  Never worry again.

On that note... @Gavin, any idea for when this might be implemented in Bitcoin-Qt?

Founder and CEO of Armory Technologies, Inc.
Armory Bitcoin Wallet: Bringing cold storage to the average user!
Only use Armory software signed by the Armory Offline Signing Key (0x98832223)

Please donate to the Armory project by clicking here!    (or donate directly via 1QBDLYTDFHHZAABYSKGKPWKLSXZWCCJQBX -- yes, it's a real address!)
flower1024
Legendary
*
Offline Offline

Activity: 1428
Merit: 1000


View Profile
July 13, 2012, 05:44:56 AM
 #19

@Gavin: deterministic wallets sounds way better.

should i give the backup implementation a try? would be my first contact to bitcoind.
i've planned to attach an "IsBackuped"-Attribute to every address inside the keypool and to show a warning as there are now more (or only a few) "backuped" addresses left.

^^ do you think this is still a good idea? how fast is this bip going to be implemented?
Diapolo
Hero Member
*****
Offline Offline

Activity: 769
Merit: 500



View Profile WWW
July 13, 2012, 06:05:18 AM
 #20

@Gavin: deterministic wallets sounds way better.

should i give the backup implementation a try? would be my first contact to bitcoind.
i've planned to attach an "IsBackuped"-Attribute to every address inside the keypool and to show a warning as there are now more (or only a few) "backuped" addresses left.

^^ do you think this is still a good idea? how fast is this bip going to be implemented?

A quick and small patch doesn't hurt if it's a good one Smiley IMHO. Btw. IsInBackup sounds less weird!?

Dia

Liked my former work for Bitcoin Core? Drop me a donation via:
1PwnvixzVAKnAqp8LCV8iuv7ohzX2pbn5x
bitcoin:1PwnvixzVAKnAqp8LCV8iuv7ohzX2pbn5x?label=Diapolo
Pages: [1] 2 »  All
  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!