old c coder (OP)
|
|
June 21, 2013, 09:07:02 PM |
|
Hello
I have submitted a small change to the GitHub Bitcoin Project that modifies 3 files.
bitcoind & bitcoin-qt will have wallet.dat behave exactly as before, or optionally the wallet file (wallet.dat) can now be any legal file name in your operating system, and it can be in any directory on any fixed or removable drive. This is done with an optional configuration argument:
walletpath=<full wallet file name>
This is in the same spirit as the conf option, which allows for a bitcoin.conf file anywhere and with any name.
Add a command line argument -walletpath=a:/b.c/d.e/f.g or, in your bitcoin.conf file, add the line walletpath=a:/b.c/d.e/f.g
In either case, the wallet.dat file is now f.g in the d.e directory, etc.
This allows one to have various separate wallets for a single bitcoin program, as determined by the configuration --OR-- one can have multiple versions of bitcoind and/or bitcoin-qt such that when each program runs, it uses the same wallet.
With this change, ONE block chain in the datadir directory can service multiple wallets.
Finally, walletpath can be just a file name, a partial path name or a full path name. And these can have spaces (blanks) in them if the whole argument is enclosed in quotes ("path name").
To summarize this allows wallet.dat to be named anything and located anywhere as determined by the user and separated from all blockchain data.
Ron
|
LTC: LUYiMVsrFQewUSPDasSKGzhyTPAkiTeSov BTC: 1DPvP6WoZzaNQ9Nxzd64hjYad1kyQzTTbx YAC: Y3ZggXDvnRJaRwtVGyGJwt6DMLN3EPQpQf The day is coming when a single carrot, freshly observed, will set off a revolution. Paul Cezanne
|
|
|
Remember remember the 5th of November
Legendary
Offline
Activity: 1862
Merit: 1011
Reverse engineer from time to time
|
|
June 22, 2013, 12:12:28 AM |
|
Great patch!. While I cannot do it now, I will definitely send you a small donation.
|
BTC:1AiCRMxgf1ptVQwx6hDuKMu4f7F27QmJC2
|
|
|
gweedo
Legendary
Offline
Activity: 1498
Merit: 1000
|
|
June 22, 2013, 12:23:37 AM |
|
This is nice. Some questions, and test you could do, so if I have two wallets, one is in /wallet1/wallet.dat and /wallet2/wallet.dat (unix paths) what are the startup times? Do I have to add a -rescan command when i am switch between wallets or will this do it automatically? Or can you just add maybe a checkpoint to the wallet, so it knows the blockchain it was scanned up until and then just scan from there on?
Also a link to the pull request would be nice.
|
|
|
|
old c coder (OP)
|
|
June 22, 2013, 01:10:53 AM |
|
This is nice. Some questions, and test you could do, so if I have two wallets, one is in /wallet1/wallet.dat and /wallet2/wallet.dat (unix paths) what are the startup times? Do I have to add a -rescan command when i am switch between wallets or will this do it automatically? Or can you just add maybe a checkpoint to the wallet, so it knows the blockchain it was scanned up until and then just scan from there on?
Also a link to the pull request would be nice.
I don't do anything special? I just run a bitcoind or bitcoin-qt with a bitcoin.conf that points to a wallet file at some location. Then after that bitcoin ends I run it again or another with a bitcoin.conf that points at a different wallet. But both programs can use the same block chain. The wallets aren't meant to be switched while the program is running, if that is what you asked. I did a 'github commit' but it seems to be 'invisible'!? I may have done something wrong in the process? I appear to have an 'unsynced commit' a2f59a3e58f83a6688b54fedacd25034842c6061, whatever that is:) I am using a 'github for windows', see http://windows.github.com/ and so am well 'insulated' from 'trouble', I hope! I can't seem to do a 'pull request' that is 'satisfying', in that it looks like 0.8.1 or 0.8.2 O.8.2 seems to be a great improvement over 0.8.1 in being able to 'catch up' after being in computer standby, and staying 'current' with only 8 connections. Ron
|
LTC: LUYiMVsrFQewUSPDasSKGzhyTPAkiTeSov BTC: 1DPvP6WoZzaNQ9Nxzd64hjYad1kyQzTTbx YAC: Y3ZggXDvnRJaRwtVGyGJwt6DMLN3EPQpQf The day is coming when a single carrot, freshly observed, will set off a revolution. Paul Cezanne
|
|
|
btceic
|
|
June 22, 2013, 01:21:58 AM |
|
Hello
I have submitted a small change to the GitHub Bitcoin Project that modifies 3 files.
bitcoind & bitcoin-qt will have wallet.dat behave exactly as before, or optionally the wallet file (wallet.dat) can now be any legal file name in your operating system, and it can be in any directory on any fixed or removable drive. This is done with an optional configuration argument:
walletpath=<full wallet file name>
This is in the same spirit as the conf option, which allows for a bitcoin.conf file anywhere and with any name.
Add a command line argument -walletpath=a:/b.c/d.e/f.g or, in your bitcoin.conf file, add the line walletpath=a:/b.c/d.e/f.g
In either case, the wallet.dat file is now f.g in the d.e directory, etc.
This allows one to have various separate wallets for a single bitcoin program, as determined by the configuration --OR-- one can have multiple versions of bitcoind and/or bitcoin-qt such that when each program runs, it uses the same wallet.
With this change, ONE block chain in the datadir directory can service multiple wallets.
Finally, walletpath can be just a file name, a partial path name or a full path name. And these can have spaces (blanks) in them if the whole argument is enclosed in quotes ("path name").
To summarize this allows wallet.dat to be named anything and located anywhere as determined by the user and separated from all blockchain data.
Ron
Wouldn't this open a vector to allow attackers to modify wallet.dat at any time? I suggest that this command line arg require the password to be passed in for confirmation reasons, unless of course it already does, if so then forgive my ignorance.
|
|
|
|
grue
Legendary
Offline
Activity: 2058
Merit: 1462
|
|
June 22, 2013, 02:43:32 PM |
|
bitcoind & bitcoin-qt will have wallet.dat behave exactly as before, or optionally the wallet file (wallet.dat) can now be any legal file name in your operating system, and it can be in any directory on any fixed or removable drive. This is done with an optional configuration argument:
walletpath=<full wallet file name>
This is in the same spirit as the conf option, which allows for a bitcoin.conf file anywhere and with any name.
Just to be clear, this doesn't make the client any more secure. A virus can just scan bitcoin.conf for the real location of the wallet file. If walletpath is included in a shortcut/command line, a quick search of start menu + desktop will likely reveal the wallet location as well.
|
|
|
|
old c coder (OP)
|
|
June 22, 2013, 02:46:16 PM |
|
Wouldn't this open a vector to allow attackers to modify wallet.dat at any time? I suggest that this command line arg require the password to be passed in for confirmation reasons, unless of course it already does, if so then forgive my ignorance.
Hello My response seems to have vanished (?) so here goes again. This change was done in the spirit of the -conf argument code and since neither -conf nor -walletpath are in the vRPCCommands[] in bitcoinrpc.cpp I don't see the 'vector'. Actually, the only additions to the code are in AppInit2(), step 5 in init.cpp I am still trying to get my 'patch' visible, but I don't 'speak' or 'understand' github-ese yet Things like is 'clone in windows' the same as a 'pull request'? Ron
|
LTC: LUYiMVsrFQewUSPDasSKGzhyTPAkiTeSov BTC: 1DPvP6WoZzaNQ9Nxzd64hjYad1kyQzTTbx YAC: Y3ZggXDvnRJaRwtVGyGJwt6DMLN3EPQpQf The day is coming when a single carrot, freshly observed, will set off a revolution. Paul Cezanne
|
|
|
old c coder (OP)
|
|
June 22, 2013, 03:12:22 PM |
|
bitcoind & bitcoin-qt will have wallet.dat behave exactly as before, or optionally the wallet file (wallet.dat) can now be any legal file name in your operating system, and it can be in any directory on any fixed or removable drive. This is done with an optional configuration argument:
walletpath=<full wallet file name>
This is in the same spirit as the conf option, which allows for a bitcoin.conf file anywhere and with any name.
Just to be clear, this doesn't make the client any more secure. A virus can just scan bitcoin.conf for the real location of the wallet file. If walletpath is included in a shortcut/command line, a quick search of start menu + desktop will likely reveal the wallet location as well. Hello I didn't say anywhere that this would make bitcoin's wallet more secure. The wallet encryption still works! The purpose of this 'patch' is to separate the wallet file from the large amount of block chain data in the -datadir directory and optionally rename it too. For security, I propose only having the wallet.dat (or whatever you now choose to call it) on the computer when you choose to run bitcoin with the purpose of using it to spend BTCs, say on a USB thumb drive. Further, compile your own version of bitcoind & bitcoin-qt and 'find & replace' walletpath in the file init.cpp with any obscure word of your choice! It is in only 2 places! Then for good measure add many more arguments to your invocation of bitcoin, all similar but meaningless. One could also make the file hidden, or 'system' etc. but this would require a little more code I presume in order to read and write to the file. All of these would only slow down a 'pro' or prism (sounds like prison) if he/she/it were to compromise your system. The intent of this change was to make the wallet file more accessible to the average user and developers, like me! Ron
|
LTC: LUYiMVsrFQewUSPDasSKGzhyTPAkiTeSov BTC: 1DPvP6WoZzaNQ9Nxzd64hjYad1kyQzTTbx YAC: Y3ZggXDvnRJaRwtVGyGJwt6DMLN3EPQpQf The day is coming when a single carrot, freshly observed, will set off a revolution. Paul Cezanne
|
|
|
old c coder (OP)
|
|
June 27, 2013, 10:32:53 PM |
|
Hello all Boy, have I been having trouble with 0.8.2.x & 0.8.3 I can't get a github fork->clone to work anything like the release 0.8.2 or 0.8.3 (which is very close to 0.8.2.2) At the moment I am running daemon release 0.8.3 which insists it must reindex. Which I have never seen before? Whenever I create my own bitcoind.exe, I get random file errors of the following nature, LevelDB read failure: IO error: H:\xx\datadir\chainstate\002128.sst: Could not create random access file. Where the file 00xxxx.sst can vary. These files are fine as I can view and change them (using Ztree or other similar programs). It seems that the bitcoin-qt versions work OK though? Has anybody had any problems like this, or am I alone? This has been holding me back from contributing the moveable wallet code. Ron
|
LTC: LUYiMVsrFQewUSPDasSKGzhyTPAkiTeSov BTC: 1DPvP6WoZzaNQ9Nxzd64hjYad1kyQzTTbx YAC: Y3ZggXDvnRJaRwtVGyGJwt6DMLN3EPQpQf The day is coming when a single carrot, freshly observed, will set off a revolution. Paul Cezanne
|
|
|
old c coder (OP)
|
|
July 03, 2013, 12:10:50 PM |
|
|
LTC: LUYiMVsrFQewUSPDasSKGzhyTPAkiTeSov BTC: 1DPvP6WoZzaNQ9Nxzd64hjYad1kyQzTTbx YAC: Y3ZggXDvnRJaRwtVGyGJwt6DMLN3EPQpQf The day is coming when a single carrot, freshly observed, will set off a revolution. Paul Cezanne
|
|
|
|