BitShares Forum

Main => Technical Support => Topic started by: FuLl on September 28, 2014, 02:35:25 pm

Title: How to have separate wallets with 1 account each
Post by: FuLl on September 28, 2014, 02:35:25 pm
Hi,

Being that backups containing more than 1 account don't restore properly, I was thinking I could copy 'wallet a' directory contents to a staging folder, start the client & have a new wallet with zero accounts in to create a new account in 'wallet b'. I wanted to be able to switch back & forth between the 2 to access the different accounts by simply copying the default wallet directory contents in & out of the default wallet folder.

But apparently it doesn't work that way. I emptied the default wallet folder, started the client, & it asks for a password which isn't the original password from 'wallet a', and which I don't know.

How can I set this up the way I'm aiming to? I want more than 1 account, but I don't want to lose the ability to restore from backups.

Thanks,
-F
Title: Re: How to have separate wallets with 1 account each
Post by: FuLl on October 07, 2014, 11:58:26 pm
I got this to work, & for future reference for anyone else who wants to know how, here's how I did it:

-I have the original wallet containing 'Account-A' that I created when I first installed BitSharesX backed up to my hard drive, & I created a staging directory elsewhere where I'll keep a current version of each account's backup under directories titled 'Account-A' & 'Account-B'. This since the actual backups have the same name, & I dare not mess with renaming them in case they wouldn't be restorable without remembering their exact naming originally.

-I uninstalled the BitSharesX application, & afterward deleted the BitSharesX directory from Users/Username/AppData/Roaming.

-Then I ran a registry cleaner app for the sake of completeness in case there were registry settings left over from the uninstaller. I don't think this step was necessary, though.

-I then reinstalled the BitSharesX application fresh, & created the new account following the prompts.

-I backed up the newly created wallet containing the new 'Account-B' to its own directory, then copied that backup to my staging area where I keep current versions of each account's wallet.

-I can now 'Import' each separate wallet, each containing a single account, to effectively switch back & forth between them.


One question remains, however:

During the wallet import process, there's a message saying 'This will backup and replace your current wallet!'.

It's unclear to me where this particular backup gets saved, as the following screens don't ask for a file location to save it at. I checked the timestamps on the backups I already had after I imported back & forth a couple times, & it didn't appear to overwrite my current backups, so it's not using the 'last used' manual export directory.

I wouldn't know how to utilize that particular backup had I needed to, but it doesn't matter in my case since I have manual backups exported to my dedicated backup location.

So no worries about that.



Hope documenting this helps someone else.  :)

-F
Title: Re: How to have separate wallets with 1 account each
Post by: happybit on October 29, 2014, 11:26:45 am
I am trying to understand all this... I wish someone responded!  :o

I thought we don't even need to backup all the 'wallet.dat' or .json files if we have a good passphrase
Title: Re: How to have separate wallets with 1 account each
Post by: xeroc on October 29, 2014, 11:49:16 am
the passphrase has NOT RELATION to your wallet .. it's just used to encrypt the private keys (which are chosen at random)!

PLEASE MAKE A BACKUP OF YOU WALLET-FILE ASAP!

The in-app backup mechanism will give you a text-file (json-formated) .. which contains ALL necessary information (priv keys) requried to access your funs
the keys are ENCRYPTED with your passphrase ...

once, again ... tha passphrase IS NOT YOUR PRIVATE KEY .. as it is used in NXT (what a stupid idea btw)
Title: Re: How to have separate wallets with 1 account each
Post by: happybit on October 30, 2014, 02:16:53 pm
DID IT!!!

THANK YOU, THANK YOU for the clarification!

It would help EVERYBODY who is new to Bitshares to have this spelled out right on the front page of the client!

At this stage "new people" = EVERYBODY! ;)
Title: Re: How to have separate wallets with 1 account each
Post by: xeroc on October 30, 2014, 02:27:31 pm
Agreed

We should force people initially and on a monthly basis to make backup of there wallet
Title: Re: How to have separate wallets with 1 account each
Post by: FuLl on October 30, 2014, 07:58:49 pm
Agreed

We should force people initially and on a monthly basis to make backup of there wallet

I think it might be a good idea to set an option to set a path & automatically save a wallet backup after each transaction, with a radiobox to be able to select between 'monthly' 'weekly' 'daily', & 'after each transaction'. This way one of the automatic backup options would always be enforced, & we could change it if we wish.

In my case, I like to have iterations of each backup, & since the 'wallet.dat' filename doesn't change, I set a separate directory for each backup titled with the date of the backup. It would be nice if this feature were to be implemented, if it would allow a path to be set which would change the wallet.dat's containing directory to be named with the current date, within the base backup directory. This so that in my case I can preserve my iterations without losing the previous copy of the backup each time a new backup is created.
Title: Re: How to have separate wallets with 1 account each
Post by: xeroc on October 30, 2014, 08:41:15 pm
Agreed

We should force people initially and on a monthly basis to make backup of there wallet

I think it might be a good idea to set an option to set a path & automatically save a wallet backup after each transaction, with a radiobox to be able to select between 'monthly' 'weekly' 'daily', & 'after each transaction'. This way one of the automatic backup options would always be enforced, & we could change it if we wish.

In my case, I like to have iterations of each backup, & since the 'wallet.dat' filename doesn't change, I set a separate directory for each backup titled with the date of the backup. It would be nice if this feature were to be implemented, if it would allow a path to be set which would change the wallet.dat's containing directory to be named with the current date, within the base backup directory. This so that in my case I can preserve my iterations without losing the previous copy of the backup each time a new backup is created.

Can you propose it over here:
https://github.com/BitShares/bitshares_toolkit/issues
Title: Re: How to have separate wallets with 1 account each
Post by: happybit on October 30, 2014, 11:46:08 pm
Could PLEASE possibly NOT BE CALLED: wallet.dat!!

and could it please be placed in the DOCUMENTS directory, and not some weird "shared folder" somewhere where people never look to backup their documents

It would even be safer in the PICTURES directory... I have had friends "backup" their computers and then come complain about having lost their bitcoins because they couldn't find the wallet.dat in the backed-up DOCUMENTS directory!

Is there a problem with saving absolutely critical files in a place where EVERYONE looks for important documents for backup purposes?
Title: Re: How to have separate wallets with 1 account each
Post by: FuLl on October 31, 2014, 12:04:17 am
Issue created:
https://github.com/BitShares/bitshares_toolkit/issues/903

Feel free to add your wishlist items here.
Title: Re: How to have separate wallets with 1 account each
Post by: FuLl on October 31, 2014, 12:06:04 am
Issue created:
https://github.com/BitShares/bitshares_toolkit/issues/903

Feel free to add your wishlist items here.

Just saw another similar issue, here:
https://github.com/BitShares/bitshares_toolkit/issues/897

Now I feel bad for being redundant.
Title: Re: How to have separate wallets with 1 account each
Post by: starspirit on October 31, 2014, 02:16:57 am
Being that backups containing more than 1 account don't restore properly, ...
I was curious about this comment. Is there a known problem with running more than 1 account in the client?
Title: Re: How to have separate wallets with 1 account each
Post by: FuLl on October 31, 2014, 03:39:46 am
Being that backups containing more than 1 account don't restore properly, ...
I was curious about this comment. Is there a known problem with running more than 1 account in the client?

See:

https://bitsharestalk.org/index.php?topic=8156.0
Title: Re: How to have separate wallets with 1 account each
Post by: starspirit on October 31, 2014, 03:54:12 am
Being that backups containing more than 1 account don't restore properly, ...
I was curious about this comment. Is there a known problem with running more than 1 account in the client?

See:

https://bitsharestalk.org/index.php?topic=8156.0
wow, thanks. always so much more to know. In that thread, BM follows up on Sep 4 by saying:
"As of 0.4.12 multiple accounts have independent deterministic key sequences so that is less of an issue."
So do you think it is still an issue?
Title: Re: How to have separate wallets with 1 account each
Post by: FuLl on October 31, 2014, 03:56:25 am
Being that backups containing more than 1 account don't restore properly, ...
I was curious about this comment. Is there a known problem with running more than 1 account in the client?

See:

https://bitsharestalk.org/index.php?topic=8156.0
wow, thanks. always so much more to know. In that thread, BM follows up on Sep 4 by saying:
"As of 0.4.12 multiple accounts have independent deterministic key sequences so that is less of an issue."
So do you think it is still an issue?

I haven't seen any of the devs mention explicitly that the issue has been fully resolved, so I lean on the side of caution in the meantime.
Title: Re: How to have separate wallets with 1 account each
Post by: starspirit on November 01, 2014, 04:06:41 am
Being that backups containing more than 1 account don't restore properly, ...
I was curious about this comment. Is there a known problem with running more than 1 account in the client?

See:

https://bitsharestalk.org/index.php?topic=8156.0
wow, thanks. always so much more to know. In that thread, BM follows up on Sep 4 by saying:
"As of 0.4.12 multiple accounts have independent deterministic key sequences so that is less of an issue."
So do you think it is still an issue?

I haven't seen any of the devs mention explicitly that the issue has been fully resolved, so I lean on the side of caution in the meantime.
So I want to set up a second account, but based on this discussion, to be safe I am doing it in a new client on a different machine. Will that preclude me from combining my accounts into a single client down the track should this issue be resolved?
Title: Re: How to have separate wallets with 1 account each
Post by: xeroc on November 01, 2014, 11:33:46 am
Having multiple account in one wallet is not an issue .. if you don't use dump_private_key and use that account somewhere else ..
all private keys used in the system are derived from the account's master key ... the account's key is derived from the wallet master key (which is also stated in the backup file) .. so if you have a backup of your wallet .. in which you created all your account .. you will always be able to regenerate your accounts...

the only issue currently are market transactions which are derived from the WALLET private key .. (github: https://github.com/BitShares/bitshares/issues/814 and https://github.com/BitShares/bitshares/issues/769) ..
this is not an issue unless you dump your account's private key and use it for market transactions in a different client!
That issue seems to be resolved!
Title: Re: How to have separate wallets with 1 account each
Post by: starspirit on November 01, 2014, 09:52:45 pm
Having multiple account in one wallet is not an issue .. if you don't use dump_private_key and use that account somewhere else ..
all private keys used in the system are derived from the account's master key ... the account's key is derived from the wallet master key (which is also stated in the backup file) .. so if you have a backup of your wallet .. in which you created all your account .. you will always be able to regenerate your accounts...

the only issue currently are market transactions which are derived from the WALLET private key .. (github: https://github.com/BitShares/bitshares/issues/814 and https://github.com/BitShares/bitshares/issues/769) ..
this is not an issue unless you dump your account's private key and use it for market transactions in a different client!
That issue seems to be resolved!
Ahh, many thanks.