Despite this being quick, I really want to get 0.3.24 out and rolling so that we have us much lead time on 0.4 as possible so that any solution to this problem that is better in 0.3.24 can be in as many hands as possible, and so that the network issues can be resolved. All that needs to happen for that is to agree on either https://github.com/bitcoin/bitcoin/pull/378 or https://github.com/bitcoin/bitcoin/pull/381 thus, I would ask that we get acks on those and then continue this discussion. Frankly, I prefer 378 as it is simpler and means that you dont have to keep track of what features you have or have not used in a wallet, but instead just write and let the keys take care of themselves. However, I'm game for either, I just want to get 0.3.24 out the door ASAP (ie preferably rc2 tomorrow and release by the end of the week). Matt On Mon, 2011-07-04 at 22:39 +0200, Matt Corallo wrote: > For some reason my mail client let me respond off-list here, didnt mean > to... > > On Mon, 2011-07-04 at 14:23 -0400, Gavin Andresen wrote: > > RE: "You have some unencrypted keys, should I encrypt them for you?" > > > > That re-opens an "attacker packs the keypool with keypairs that they > > know about" (if I can read/write wallet.dat, then I can delete > > encrypted keypool keys and insert a bunch of unencrypted keypool keys > > that I know how to spend, and rely on the user to click "OK" because > > users are trained to just click "OK"). > Not strictly true, if the keys are loaded, but not added to > mapAddressBook or setKeyPool, they wont be used for any new > transactions, or shown to the user, but the user is still able to > receive Bitcoins to those keys. > > RE: breaking backup scripts: if they use the backupwallet RPC > > command, then they will Just Work. > Not really, most backupwallet-based scripts will backup wallet.dat, > encrypt wallet.dat, upload wallet.dat. Now it backups up wallet.dat and > the encrypt part fails because there is no wallet.dat, only > wallet_e.dat. If we rename to wallet.dat on output, now the user's > restore might not work... > > > > 0.4 and later could, on wallet encryption, create a wallet_e.dat > > (encrypted wallet). Then truncate wallet.dat and set its > > file-permissions to 000, so if old versions of bitcoin OR any dumb > > wallet backup scripts try to read it they fail. > True, but that is only a solution for Linux and Mac and then you are > back to unreadable error on Windows load and other unforeseeable errors > for odd scripts. > > I suppose I just really dont like the idea of renaming wallet.dat, > everything knows the filename and is used to it. > > > > RE: future-proofing: wallet.dat contains nFileVersion (version of > > bitcoin that last wrote the wallet). Adding a nMinVersion that > > specifies "you must be at least THIS version to read this file" seems > > like a good idea so if you have version 0.4 or later future wallet > > upgrades give you a reasonable message if you try to downgrade after > > an incompatible change. > Yep, just something simple that says, no reading this to old versions is > needed, IMO the older version should freak out if it sees keys that it > doesn't know about (as it could also indicate wallet corruption in some > rare cases), but nMinVersion works just as well, in any case this should > only very rarely be a problem...how often will we change the wallet > format?