Bitcoin Forum
April 18, 2024, 05:24:33 PM *
News: Latest Bitcoin Core release: 26.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: client command line option -wallet= in addition to -datadir=?  (Read 6944 times)
Stephen Gornick (OP)
Legendary
*
Offline Offline

Activity: 2506
Merit: 1010


View Profile
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?

Unichange.me

            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █


"With e-currency based on cryptographic proof, without the need to trust a third party middleman, money can be secure and transactions effortless." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1713461073
Hero Member
*
Offline Offline

Posts: 1713461073

View Profile Personal Message (Offline)

Ignore
1713461073
Reply with quote  #2

1713461073
Report to moderator
1713461073
Hero Member
*
Offline Offline

Posts: 1713461073

View Profile Personal Message (Offline)

Ignore
1713461073
Reply with quote  #2

1713461073
Report to moderator
grondilu
Legendary
*
Offline Offline

Activity: 1288
Merit: 1076


View Profile
January 11, 2011, 02:10:16 AM
 #2

What do you have against symlinks ?

Hal
VIP
Sr. Member
*
expert
Offline Offline

Activity: 314
Merit: 3853



View Profile
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
Newbie
*
Offline Offline

Activity: 37
Merit: 0



View Profile
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.
Stephen Gornick (OP)
Legendary
*
Offline Offline

Activity: 2506
Merit: 1010


View Profile
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.

Unichange.me

            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █


matt.collier
Member
**
Offline Offline

Activity: 105
Merit: 10



View Profile
May 26, 2011, 10:38:09 PM
 #6

+1
Denmarx
Newbie
*
Offline Offline

Activity: 8
Merit: 0


View Profile
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
Legendary
*
Offline Offline

Activity: 1708
Merit: 1007



View Profile
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
Merit: 10


View Profile WWW
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.
prof7bit
Hero Member
*****
Offline Offline

Activity: 938
Merit: 500


https://youengine.io/


View Profile WWW
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.

deepceleron
Legendary
*
Offline Offline

Activity: 1512
Merit: 1025



View Profile WWW
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.
GlenBot
Newbie
*
Offline Offline

Activity: 46
Merit: 0



View Profile WWW
July 21, 2011, 08:05:02 AM
 #12

I'd love to see this implemented as well.

Binary Finery
Newbie
*
Offline Offline

Activity: 44
Merit: 0


View Profile
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
Merit: 265


View Profile
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
Legendary
*
expert
Offline Offline

Activity: 4158
Merit: 8382



View Profile WWW
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: 533
Merit: 501


View Profile
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.

JackH
Sr. Member
****
Offline Offline

Activity: 381
Merit: 255


View Profile
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?

<helo> funny that this proposal grows the maximum block size to 8GB, and is seen as a compromise
<helo> oh, you don't like a 20x increase? well how about 8192x increase?
<JackH> lmao
TierNolan
Legendary
*
Offline Offline

Activity: 1232
Merit: 1083


View Profile
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: 381
Merit: 255


View Profile
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?

<helo> funny that this proposal grows the maximum block size to 8GB, and is seen as a compromise
<helo> oh, you don't like a 20x increase? well how about 8192x increase?
<JackH> lmao
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!