New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify location for wallet.dat file #68

Closed
kasperhartwich opened this Issue Feb 13, 2011 · 21 comments

Comments

Projects
None yet
@kasperhartwich

kasperhartwich commented Feb 13, 2011

It should be possible to specify a location for the wallet.dat file.

@gavinandresen

This comment has been minimized.

Show comment
Hide comment
@gavinandresen

gavinandresen Feb 19, 2011

Contributor

Need to be very careful about accidentally corrupting the wallet.dat file by pointing two running bitcoins at the same wallet.dat file. Berkeley db doesn't do any automatic multi-process locking.

Right now, a lock file is created in the -datadir Bitcoin is using, but if we allow the wallet to be anywhere in the filesystem that protection wouldn't work.

Contributor

gavinandresen commented Feb 19, 2011

Need to be very careful about accidentally corrupting the wallet.dat file by pointing two running bitcoins at the same wallet.dat file. Berkeley db doesn't do any automatic multi-process locking.

Right now, a lock file is created in the -datadir Bitcoin is using, but if we allow the wallet to be anywhere in the filesystem that protection wouldn't work.

@grebulon

This comment has been minimized.

Show comment
Hide comment
@grebulon

grebulon Mar 6, 2011

I second that. There should be an option to set the location via GUI.
It would also be nice to be able to specify a secondary location, where a mirror of the wallet could be saved, possibly on a network path.

grebulon commented Mar 6, 2011

I second that. There should be an option to set the location via GUI.
It would also be nice to be able to specify a secondary location, where a mirror of the wallet could be saved, possibly on a network path.

@sgornick

This comment has been minimized.

Show comment
Hide comment
@sgornick

sgornick Apr 13, 2011

I had suggested a -walletdir parameter here: http://www.bitcoin.org/smf/index.php?topic=2730.0

Would probably also be necessary to start with a -rescan then when switching between wallets, right?

sgornick commented Apr 13, 2011

I had suggested a -walletdir parameter here: http://www.bitcoin.org/smf/index.php?topic=2730.0

Would probably also be necessary to start with a -rescan then when switching between wallets, right?

@sipa

This comment has been minimized.

Show comment
Hide comment
@sipa

sipa Apr 13, 2011

Member

This is useful, I think. You can create an additional lockfile in the walletdir, to prevent multiple processes from accessing the same wallet. Furthermore, it's relatively easy to detect the "switching back to an earlier wallet" case, by storing the best block index in the wallet as well (suggested by Satoshi somewhere).

Member

sipa commented Apr 13, 2011

This is useful, I think. You can create an additional lockfile in the walletdir, to prevent multiple processes from accessing the same wallet. Furthermore, it's relatively easy to detect the "switching back to an earlier wallet" case, by storing the best block index in the wallet as well (suggested by Satoshi somewhere).

@gavinandresen

This comment has been minimized.

Show comment
Hide comment
@gavinandresen

gavinandresen Apr 13, 2011

Contributor

I wonder if just using wallet.dat as it's own lockfile would/could work...

Contributor

gavinandresen commented Apr 13, 2011

I wonder if just using wallet.dat as it's own lockfile would/could work...

@sipa

This comment has been minimized.

Show comment
Hide comment
@sipa

sipa Apr 13, 2011

Member

Judging from boost::interprocess:file_lock documentation, it should...

Member

sipa commented Apr 13, 2011

Judging from boost::interprocess:file_lock documentation, it should...

@grebulon

This comment has been minimized.

Show comment
Hide comment
@grebulon

grebulon Apr 14, 2011

Will you also give an option to replicate the wallet to a secondary location?

grebulon commented Apr 14, 2011

Will you also give an option to replicate the wallet to a secondary location?

@alexgenaud

This comment has been minimized.

Show comment
Hide comment
@alexgenaud

alexgenaud May 27, 2011

If the wallet were composited of isolated static keys (plain text or as separate files in a wallet directory) then would there be any concern for corruption? Couldn't every address/key be write-once-never-modify?

alexgenaud commented May 27, 2011

If the wallet were composited of isolated static keys (plain text or as separate files in a wallet directory) then would there be any concern for corruption? Couldn't every address/key be write-once-never-modify?

@sipa

This comment has been minimized.

Show comment
Hide comment
@sipa

sipa May 27, 2011

Member

@alexgenaud: the wallet is much more than a collection of keys - it also contains transactions, accounting information, settings, and information about the block chain

Member

sipa commented May 27, 2011

@alexgenaud: the wallet is much more than a collection of keys - it also contains transactions, accounting information, settings, and information about the block chain

@alexgenaud

This comment has been minimized.

Show comment
Hide comment
@alexgenaud

alexgenaud May 27, 2011

Can most of that information be recreated from the network? Presumably we want to specify different wallet locations because we'll have many of them, likely stored on different media, backed up, encrypted, etc. If that's the case, I would think some isolated entities (the keys) should be write-once-never-modify.

alexgenaud commented May 27, 2011

Can most of that information be recreated from the network? Presumably we want to specify different wallet locations because we'll have many of them, likely stored on different media, backed up, encrypted, etc. If that's the case, I would think some isolated entities (the keys) should be write-once-never-modify.

@TheBlueMatt

This comment has been minimized.

Show comment
Hide comment
@TheBlueMatt

TheBlueMatt May 29, 2011

Contributor

Yes, the list of transactions can be easily recomputed (and are fairly sanely). The settings, no...but those are just the things in the preference dialog. Accounts, well that also not, but those are so broken anyway...anyway, those are tied to the list of addresses, so that also shouldn't be a problem

Contributor

TheBlueMatt commented May 29, 2011

Yes, the list of transactions can be easily recomputed (and are fairly sanely). The settings, no...but those are just the things in the preference dialog. Accounts, well that also not, but those are so broken anyway...anyway, those are tied to the list of addresses, so that also shouldn't be a problem

@TheBlueMatt

This comment has been minimized.

Show comment
Hide comment
@TheBlueMatt

TheBlueMatt May 29, 2011

Contributor

Also, this bug should be long closed, we have -datadir=...

Contributor

TheBlueMatt commented May 29, 2011

Also, this bug should be long closed, we have -datadir=...

@sipa

This comment has been minimized.

Show comment
Hide comment
@sipa

sipa May 29, 2011

Member

I believe this is about a the location of the wallet specifically - that's useful, and/or is a step towards general wallet management.

Member

sipa commented May 29, 2011

I believe this is about a the location of the wallet specifically - that's useful, and/or is a step towards general wallet management.

@TheBlueMatt

This comment has been minimized.

Show comment
Hide comment
@TheBlueMatt

TheBlueMatt May 29, 2011

Contributor

Ah, well then yea. Is there also a bug for separate -conffile= location, as that falls under the same category.

Contributor

TheBlueMatt commented May 29, 2011

Ah, well then yea. Is there also a bug for separate -conffile= location, as that falls under the same category.

@alexwaters

This comment has been minimized.

Show comment
Hide comment
@alexwaters

alexwaters Sep 6, 2011

Contributor

#220 wallet import and export should resolve this issue, please contribute to that thread.

Edit: reopened per Sipa's advice

Contributor

alexwaters commented Sep 6, 2011

#220 wallet import and export should resolve this issue, please contribute to that thread.

Edit: reopened per Sipa's advice

@alexwaters alexwaters closed this Sep 6, 2011

@sipa

This comment has been minimized.

Show comment
Hide comment
@sipa

sipa Sep 6, 2011

Member

As the author of pull #220, I'm not convinced this is about the same problem.

Having the client manage different (or even multiple) wallets at once would be a very useful think imho, independent from the ability to import/export them.

Member

sipa commented Sep 6, 2011

As the author of pull #220, I'm not convinced this is about the same problem.

Having the client manage different (or even multiple) wallets at once would be a very useful think imho, independent from the ability to import/export them.

@alexwaters alexwaters reopened this Sep 6, 2011

@alexwaters

This comment has been minimized.

Show comment
Hide comment
@alexwaters

alexwaters Sep 6, 2011

Contributor

I have added the wallet label so that these issues are grouped. Some of them overlap, and it makes more sense to group them than to condense them.

Cheers Sipa, and kudos on the Wallet work =)

Contributor

alexwaters commented Sep 6, 2011

I have added the wallet label so that these issues are grouped. Some of them overlap, and it makes more sense to group them than to condense them.

Cheers Sipa, and kudos on the Wallet work =)

@keystrike

This comment has been minimized.

Show comment
Hide comment
@keystrike

keystrike Apr 1, 2013

Contributor

Any work done on this? I read on the forum that since the blockchain doesn't use BDB it will be easier to add this option now. Thanks!

Contributor

keystrike commented Apr 1, 2013

Any work done on this? I read on the forum that since the blockchain doesn't use BDB it will be easier to add this option now. Thanks!

@gmaxwell

This comment has been minimized.

Show comment
Hide comment
@gmaxwell

gmaxwell Apr 1, 2013

Member

@keystrike it's likely going to get subsumed by the multiple wallet support.

Member

gmaxwell commented Apr 1, 2013

@keystrike it's likely going to get subsumed by the multiple wallet support.

@laanwj

This comment has been minimized.

Show comment
Hide comment
@laanwj

laanwj Apr 29, 2013

Member

Does that mean you're volunteering to do it @APerson241 ? Otherwise, please spare us your judgements as to how easy or difficult something is.

Member

laanwj commented Apr 29, 2013

Does that mean you're volunteering to do it @APerson241 ? Otherwise, please spare us your judgements as to how easy or difficult something is.

@gavinandresen

This comment has been minimized.

Show comment
Hide comment
@gavinandresen

gavinandresen Aug 16, 2013

Contributor

Closing; 0.9 release has a "-wallet=filename.dat" option. It must still be in the -datadir, though.

Contributor

gavinandresen commented Aug 16, 2013

Closing; 0.9 release has a "-wallet=filename.dat" option. It must still be in the -datadir, though.

rdponticelli pushed a commit to Criptomonedas/bitcoin that referenced this issue Nov 26, 2014

Merge pull request bitcoin#68
3fd6253 Better randomization for tests (Pieter Wuille)

dexX7 pushed a commit to dexX7/bitcoin that referenced this issue May 19, 2015

Merge pull request bitcoin#68 from dexX7/oc-0.10-ui-uninitialized-var…
…iables

Update and remove overzealous includes

dexX7 added a commit to dexX7/bitcoin that referenced this issue Jun 1, 2015

Merge pull request bitcoin#68
fddc6fc Rename options to "-omnialertallowsender", "-omnialertignoresender" (dexX7)
90cb49e Only create class C transactions, if they are also accepted (dexX7)
c48cd68 Whitelist dexX7 as source for Omni Core notifications (dexX7)
d60d0ef Add unit tests for Omni Core client notifications (dexX7)
cc50a35 Rename alert functions, provide return values by reference (dexX7)
f6663a8 Add CheckAlertAuthorization(), "-alertallowsender", "-alertignoresender" (dexX7)
e8e5989 Fix height check of CMPTxList::setLastAlert() (dexX7)
a999e29 Add hidden "sendalert_OMNI" command (dexX7)
4a0226e Extend marker check to cover alerts as well (dexX7)
a125b0c Support payload creation for alerts (dexX7)
4b77e41 Wrap alert code into namespace (dexX7)
c1d4d56 Fully enable/support reindexing (dexX7)
8ffccbd Remove wallet LOCK in ClassAgnosticWalletTXBuilder (dexX7)
e568acf Format some of the main functions (dexX7)
60ba692 Remove some old leftovers (dexX7)
aa1e62f Move actual code from header into sp.cpp (dexX7)
e0853f0 Push down xToString functions and friends (dexX7)
996831b Move MAX_SHA256_OBFUSCATION_TIMES to hasher (dexX7)
d815b26 Move alert/notification related code into seperated file (dexX7)
c932248 Move pending transactions related code into pending file (dexX7)
67e77c1 Remove unused code from omnicore.h/.cpp (dexX7)

jtimon pushed a commit to jtimon/bitcoin that referenced this issue Mar 11, 2016

ptschip pushed a commit to ptschip/bitcoin that referenced this issue Aug 12, 2016

Merge pull request bitcoin#68 from ptschip/12.1mingw
Build instructions for Bitcoin on Windows using mingw32 and mysys shell

CryptAxe pushed a commit to CryptAxe/bitcoin that referenced this issue Mar 11, 2018

Merge pull request bitcoin#68 from CryptAxe/master
Add graphing support to Bitcoin Hivemind with qcustomplot. Add example graphs to MarketModel

CryptAxe added a commit to CryptAxe/bitcoin that referenced this issue Mar 11, 2018

Merge pull request #11 from bitcoin-hivemind/master
Merge pull request bitcoin#68 from CryptAxe/master

effectsToCause pushed a commit to vericoin/vericoin that referenced this issue Jun 22, 2018

Merge pull request bitcoin#68 from vericoin/bootstrap_rpc_cmd
Add bootstrap command to daemon
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment