Bitcoin Forum
April 16, 2014, 11:06:54 PM *
News: ♦♦ A bug in OpenSSL, used by Bitcoin-Qt/Bitcoin Core, could allow your bitcoins to be stolen. Immediately updating Bitcoin Core to 0.9.1 is required in some cases, especially if you're using 0.9.0. Download. More info.
The same bug also affected the forum. Changing your forum password is recommended.
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: client command line option -wallet= in addition to -datadir=?  (Read 3624 times)
Stephen Gornick
Hero Member
*****
Offline Offline

Activity: 1232



View Profile WWW

Ignore
January 11, 2011, 01:59:43 AM
 #1

I use TrueCrypt on Linux to create and mount just a small encrypted volume that holds only the wallet.dat.  That wallet.dat is well under 1MB now, but 5MB seems to be a ample yet convenient upper bound as far as size goes.  I'ld like to ensure that the wallet.dat has not and will not ever be stored on a non-encrypted volume.

For me to be able to ensure that a new wallet is created on an encrypted volume, I created a much larger encrypted volume (e.g, 300MB or larger, depending on volume of logging kepts) and launch the Bitcoin client there.  Once I have the wallet.dat, I then move it to the smaller 5MB encrypted volume.

The protected 5MB volume is not normally mounted and is only used sporadically.   When I do wish to use it, I mount the volume and then create a symlink to its wallet.dat before launching bitcoin.

It would be more convenient if, instead of having to create a symlink, I was able to specify which directory to use just for the wallet.dat.  e.g.,
  $ bitcoin -walletdir=/media/truecrypt1 -datadir=/usr/local/bitcoin/data

Something like a -walletdir option would allow me to create the wallet in a separate directory as well.  An added benefit for that would be that I could then skip having the 300MB encrypted volume as well.

Does anyone have a better solution, or other thoughts on this suggestion?

The grue lurks in the darkest places of the earth. Its favorite diet is adventurers, but its insatiable appetite is tempered by its fear of light. No grue has ever been seen by the light of day, and few have survived its fearsome jaws to tell the tale.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1397689614
Hero Member
*
Offline Offline

Posts: 1397689614

View Profile Personal Message (Offline)

Ignore
1397689614
Reply with quote  #2

1397689614
Report to moderator
1397689614
Hero Member
*
Offline Offline

Posts: 1397689614

View Profile Personal Message (Offline)

Ignore
1397689614
Reply with quote  #2

1397689614
Report to moderator
grondilu
Hero Member
*****
Offline Offline

Activity: 1134


View Profile

Ignore
January 11, 2011, 02:10:16 AM
 #2

What do you have against symlinks ?
Hal
VIP
Sr. Member
*
expert
Offline Offline

Activity: 314



View Profile

Ignore
January 11, 2011, 09:57:48 PM
 #3

Would it work, on a new machine with no wallet, to create the .bitcoin directory, with wallet.dat a symlink to an empty file on your 5MB volume? Then when you launch the client for the first time, would it create the wallet on the encrypted volume? Or would it just overwrite the symlink file with wallet data?

Hal Finney
marcusaurelius
Jr. Member
*
Offline Offline

Activity: 37



View Profile

Ignore
January 11, 2011, 10:24:15 PM
 #4

Wallet size depends on the amount of bitcoin-chunks, right? So if I have used the faucet 1000 times (gavin don't hit me :-) the wallet is ~1000 times larger than when I just mine a single block, even though in both cases the wallet holds 50btc.
Can s/1 tell me? Not motivated to search the code...
If so, can you recombine chunks that have been broken down?

Thanks in advance.

--
1Bo3Nqu1rKWvDzHmZJ7GD2BGnsg6YoqzPr
Stephen Gornick
Hero Member
*****
Offline Offline

Activity: 1232



View Profile WWW

Ignore
January 11, 2011, 10:59:31 PM
 #5

What do you have against symlinks ?

Without having to create a symlink, I can have a "launcher" on the desktop to launch bitcoin with a specific wallet.  (though that could be a script that creates the symlink, but not having to do that step is a usability improvement.  Even so, a symlink doesn't help when creating the wallet.dat -- see below.

Or would it just overwrite the symlink file with wallet data?

It overwrites the symlink.

matt.collier
Member
**
Offline Offline

Activity: 105



View Profile

Ignore
May 26, 2011, 10:38:09 PM
 #6

+1
Denmarx
Newbie
*
Offline Offline

Activity: 8


View Profile

Ignore
May 28, 2011, 12:38:19 AM
 #7

Is this an appropriate forum to make feature requests?

If so, I heartily support the ability to configure the wallet's location apart from the rest of the data. I was just setting up my own Truecrypt file to store my wallet and was looking to configure the wallet's location when, lo and behold, the whole data directory has to stick together.

The symbolic link is fine and dandy, but I'm using my Windows machine at work, and symbolic links on Windows are . . . not friendly.

Even better: let the wallet location be configured in the config file.
MoonShadow
Hero Member
*****
Offline Offline

Activity: 1358



View Profile

Ignore
May 28, 2011, 12:45:01 AM
 #8

Wallet size depends on the amount of bitcoin-chunks, right? So if I have used the faucet 1000 times (gavin don't hit me :-) the wallet is ~1000 times larger than when I just mine a single block, even though in both cases the wallet holds 50btc.
Can s/1 tell me? Not motivated to search the code...
If so, can you recombine chunks that have been broken down?

Thanks in advance.

You can recombine coins that have been broken down across many transactions, but this has little affect on the wallet.dat file.  The bitcoins don't actually reside in any form in the wallet.dat file, your public/private keypairs and references to your transactions do.  In truth, the bitcoins don't actually exist even as a digital object.  Everything is in the transactions.

"The powers of financial capitalism had another far-reaching aim, nothing less than to create a world system of financial control in private hands able to dominate the political system of each country and the economy of the world as a whole. This system was to be controlled in a feudalist fashion by the central banks of the world acting in concert, by secret agreements arrived at in frequent meetings and conferences. The apex of the systems was to be the Bank for International Settlements in Basel, Switzerland, a private bank owned and controlled by the world's central banks which were themselves private corporations. Each central bank...sought to dominate its government by its ability to control Treasury loans, to manipulate foreign exchanges, to influence the level of economic activity in the country, and to influence cooperative politicians by subsequent economic rewards in the business world."

- Carroll Quigley, CFR member, mentor to Bill Clinton, from 'Tragedy And Hope'
XIU
Member
**
Offline Offline

Activity: 84


View Profile

Ignore
June 30, 2011, 11:12:11 AM
 #9

Is this an appropriate forum to make feature requests?

If so, I heartily support the ability to configure the wallet's location apart from the rest of the data. I was just setting up my own Truecrypt file to store my wallet and was looking to configure the wallet's location when, lo and behold, the whole data directory has to stick together.

The symbolic link is fine and dandy, but I'm using my Windows machine at work, and symbolic links on Windows are . . . not friendly.

Even better: let the wallet location be configured in the config file.

The link shell extension (http://schinagl.priv.at/nt/hardlinkshellext/hardlinkshellext.html) makes it a lot easier to work with symbolic links/junctions points on Windows.

1xiuHwHk81j4TRnLuLBMvH2ctqtTsubT6
prof7bit
Sr. Member
****
Offline Offline

Activity: 476



View Profile WWW

Ignore
July 02, 2011, 01:47:14 PM
 #10

The link shell extension (http://schinagl.priv.at/nt/hardlinkshellext/hardlinkshellext.html) makes it a lot easier to work with symbolic links/junctions points on Windows.

Using a symlink is only a complicated workaround for the current lack of this feature, a very basic and very essential feature which is missing only accidentally (its absence is a non-critical bug and other bugs were more critical) and that will be fixed as soon as one of the devs has the needed 3 minutes extra time available (which I hope will happen soon).

I would love to help out myself and would have done so for exactly this very bug already weeks ago but unfortunately I can't do it for technical reasons (temporary lack of suitable hardware to develop and test) at the moment.

The question "what's the problem with symlinks?" that was asked at the beginning of this thread can only be interpreted as some form of bitter sarcasm, there is no doubt that this *CAN* not be the serious opinion of anyone.

Imagine one would for example have to create a symlink

%APPDATA%/Word/TheWordFile.doc -> ~/Documents/whatever.doc
every time before one wants to open a different file. And the MS hotline would ask "Whats the problem with symlinks?"

This would be hilarious. I am 100% sure everybody will agree with me on this.

I hope somebody who has (unlike me) no problems setting up the needed environment to compile and test on all supported platforms will supply a patch or maybe (more likely) this patch already exists and will (no doubt) be part of the next release.

Old Bitcoins recycling and disposal: 1N7ZcHoe77JncRYAg27RVqJZbrjqUQ77WE
MtGox trading client and bot experimentation framework: http://prof7bit.github.com/goxtool/
deepceleron
Hero Member
*****
Offline Offline

Activity: 1022



View Profile WWW

Ignore
July 14, 2011, 11:31:26 PM
 #11

Mini-bump. This would be a good option to implement, especially for simple obfuscation of the wallet.dat location from trojan wallet stealers. If only I know that my wallet is --walletfile=C:\Users\deepceleron\AppData\Roaming\SecuROM\UserData\voeF5h3x.bin, it's a bit harder for a virus to find, grab, and ftp it. Bitcoin client should also have a prompt "wallet file not found, create a new one?" on new installation or upon specifying a wallet file that does not exist, to go along with this.

http://we.lovebitco.in/how-bitcoin-works/
1DCeLERonUTsTERdpUNqxKTVMmnwU6reu5
"A Part of Us Remains Wherever We Have Been" - fortune cookie
GlenBot
Jr. Member
*
Offline Offline

Activity: 38



View Profile

Ignore
July 21, 2011, 08:05:02 AM
 #12

I'd love to see this implemented as well.

Binary Finery
Jr. Member
*
Offline Offline

Activity: 44


View Profile

Ignore
August 30, 2012, 09:54:16 AM
 #13

I use TrueCrypt on Linux to create and mount just a small encrypted volume that holds only the wallet.dat.  That wallet.dat is well under 1MB now, but 5MB seems to be a ample yet convenient upper bound as far as size goes.  I'ld like to ensure that the wallet.dat has not and will not ever be stored on a non-encrypted volume.

For me to be able to ensure that a new wallet is created on an encrypted volume, I created a much larger encrypted volume (e.g, 300MB or larger, depending on volume of logging kepts) and launch the Bitcoin client there.  Once I have the wallet.dat, I then move it to the smaller 5MB encrypted volume.

The protected 5MB volume is not normally mounted and is only used sporadically.   When I do wish to use it, I mount the volume and then create a symlink to its wallet.dat before launching bitcoin.

It would be more convenient if, instead of having to create a symlink, I was able to specify which directory to use just for the wallet.dat.  e.g.,
  $ bitcoin -walletdir=/media/truecrypt1 -datadir=/usr/local/bitcoin/data

Something like a -walletdir option would allow me to create the wallet in a separate directory as well.  An added benefit for that would be that I could then skip having the 300MB encrypted volume as well.

Does anyone have a better solution, or other thoughts on this suggestion?


I can't believe this feature has not yet been added or am I missing something?

This makes basic security common sense - a lack of a -walletdir option is a major bug.

If basic security goes that you maintain a hot-wallet for day to day transactions and a secure offline wallet for your bank account then surely you need the ability to secure and hide your account wallet.

The obvious way to do this is in a Truecrypt hidden volume - that way you're secure (with reasonable precautions) against trojans, hackers etc AND (and this is what no-one seems to be addressing if this experiment ever goes mainstream) against physical attacks where some guy threatens to break your legs if you don't reveal you truecrypt password to your off-shore account wallet.

Hiding a small wallet.dat file in a truecrypt hidden volume within a gb volume is impossible to detect, however having to haul the entire blockchain in there as well, kinda makes it obvious there's a hidden volume there.

I'm no coder but this must be two lines of code at most: if walletdir=NULL then walletdir="%data%\bitcoin" else walletdir=<-walletdir>

Please sort this out or show me a version of bitcoind that uses it already, but not electrum - I like bitcoind, I'm comfortable with it. I've no problem with downloading the complete blockchain, but a copy with each wallet is too much, especially if I need to encrypt public data just to secure my 1mb of private data.

This option makes so much sense, it would reduce this page : https://en.bitcoin.it/wiki/Securing_your_wallet to:
Download TrueCrypt;
create hidden volume;
stick hot wallet in the outer volume;
stick account wallet in hidden volume;
make several back ups;
set bitcoind -walletdir=TrueCryptvol:\MyWallet;
mount whichever wallet you wish to use;
boot bitcoind;
make sure no trojan steal your mounted wallet, which is encrpted on bitcoin-qt anyway.

tcatm
Sr. Member
****
qt
Offline Offline

Activity: 337


View Profile

Ignore
September 02, 2012, 09:36:33 AM
 #14

Patch here: https://github.com/tcatm/bitcoin/commit/126fdaef110aca47acf888a2e599167554280fe7
Branch multi-wallet: https://github.com/tcatm/bitcoin/tree/multi-wallet

It allows to select between multiple wallets within the datadir. e.g. bitcoin -wallet=foo.dat will load $DATADIR/foo.dat (or create it if it doesn't exist). Don't use it to access wallets outside the datadir.
gmaxwell
Moderator
Hero Member
*
qt
Online Online

Activity: 1078


View Profile

Ignore
September 04, 2012, 07:01:33 AM
 #15

It allows to select between multiple wallets within the datadir. e.g. bitcoin -wallet=foo.dat will load $DATADIR/foo.dat (or create it if it doesn't exist). Don't use it to access wallets outside the datadir.
Er. This doesn't split the database environment, so if its used as this thread is requesting it will almost certainly result in wallet corruption. (and leak wallet information as well).
PrintCoins
Hero Member
*****
Offline Offline

Activity: 523



View Profile WWW

Ignore
November 17, 2013, 03:16:18 PM
 #16

It allows to select between multiple wallets within the datadir. e.g. bitcoin -wallet=foo.dat will load $DATADIR/foo.dat (or create it if it doesn't exist). Don't use it to access wallets outside the datadir.
Er. This doesn't split the database environment, so if its used as this thread is requesting it will almost certainly result in wallet corruption. (and leak wallet information as well).


Any update to whether this feature was incorporated into the main client? Last update to the thread was nearly a year ago, and it looks like tcatm did a patch for it.

I am considering using the symlink option, but it seems a little dangerous.

Bitmessage.org: BM-2cT3oFVj68gugBD5JFvP3qmoBHWXJQ6ZkT
BTC Addr:18AA1hq6DVHn5WuK1fQhr5CdkqeG5Mj2ZL <--did you like my post? Send some encouragement here.
Print bitcoin bills: http://print.printcoins.com/
JackH
Sr. Member
****
Offline Offline

Activity: 247


View Profile WWW

Ignore
January 20, 2014, 04:26:02 PM
 #17

Any news on this? I noticed Gavin closed the thread here: https://github.com/bitcoin/bitcoin/issues/68

But it still does not allow us to store the wallet.dat separately from the data directory. This is a MUCH needed feature as it would allow us to use the wallet.dat file inside a TrueCrypt folder. Gavin? Anything?

Want to list your bitcoin related website and get more traffic? Go to http://www.findabitcoin.com

Visit our Web Design company on http://www.thinlinedata.com

-----------------------------------------
Cyprus Central Bank has warned that using the virtual currency Bitcoin is dangerous!

Bacteria has warned that using Penicillin is dangerous.
TierNolan
Sr. Member
****
Offline Offline

Activity: 434


View Profile

Ignore
January 20, 2014, 05:37:10 PM
 #18

But it still does not allow us to store the wallet.dat separately from the data directory. This is a MUCH needed feature as it would allow us to use the wallet.dat file inside a TrueCrypt folder. Gavin? Anything?

It would be useful.  Another use case is disk backups.  I have a hard-drive that I don't bother to backup.  Ideally, I could store the blockchain there, but still have the wallet included in the backups.

1LxbG5cKXzTwZg9mjL3gaRE835uNQEteWF
JackH
Sr. Member
****
Offline Offline

Activity: 247


View Profile WWW

Ignore
January 22, 2014, 12:26:19 PM
 #19

The blockchain should have nothing to do with the wallet file. One is the database, the other is the keys to access Bitcoins. Why on earth is it not possible to put the wallet file in its own location?

Want to list your bitcoin related website and get more traffic? Go to http://www.findabitcoin.com

Visit our Web Design company on http://www.thinlinedata.com

-----------------------------------------
Cyprus Central Bank has warned that using the virtual currency Bitcoin is dangerous!

Bacteria has warned that using Penicillin is dangerous.
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!