BitShares Forum

Main => General Discussion => Topic started by: bytemaster on July 20, 2014, 07:26:13 pm

Title: How & When to Backup Your Wallet
Post by: bytemaster on July 20, 2014, 07:26:13 pm
We will create a more formal instruction set for this, but for now here is what you need to know:

1) The wallet can regenerate all private keys from the wallet root key.  So as long as you backup your wallet after you create it your balance is safe (in theory).
2) You should backup the PUBLIC KEY of all unregistered accounts otherwise you will have to scan all transactions with all keys which could take a VERY LONG TIME when the network transaction volume picks up (or if you had a lot of transactions). 


For this reason I recommend registering all accounts on the blockchain *or* backing up all public keys for the unregistered accounts you do create.

You can backup by going to File -> Export Wallet which will save a .json file with your wallet contents.  The private keys are encrypted with your password.   Save this file on a separate disk.   If your password is not very strong then do not store it where anyone else can get to it.

Strong wallet passwords are recommended.
Title: Re: How & When to Backup Your Wallet
Post by: xeroc on July 20, 2014, 08:18:21 pm
+5% .. need to add this to the wiki .. best practice ..
Title: Re: How & When to Backup Your Wallet
Post by: xeroc on July 20, 2014, 08:20:48 pm
Whats the wallet root key .. do you mean account root key?
Title: Re: How & When to Backup Your Wallet
Post by: bytemaster on July 20, 2014, 08:22:02 pm
Whats the wallet root key .. do you mean account root key?

All account keys are child of the wallet root key.   
Title: Re: How & When to Backup Your Wallet
Post by: xeroc on July 20, 2014, 08:23:05 pm
Can I export that key somehow?
Title: Re: How & When to Backup Your Wallet
Post by: bytemaster on July 20, 2014, 08:24:46 pm
Can I export that key somehow?

It is in the .json file that is exported with the wallet.  We don't have a way of dumping that key in unencrypted form at the moment.
Title: Re: How & When to Backup Your Wallet
Post by: xeroc on July 20, 2014, 08:26:00 pm
Kk .. thx
Title: Re: How & When to Backup Your Wallet
Post by: liondani on July 20, 2014, 10:02:28 pm
is it safe to change the password from the win gui console from time to time ?
Title: Re: How & When to Backup Your Wallet
Post by: bytemaster on July 20, 2014, 10:49:04 pm
is it safe to change the password from the win gui console from time to time ?

Should be safe.  Your backup will still use the old password.
Title: Re: How & When to Backup Your Wallet
Post by: alt on July 20, 2014, 11:54:41 pm
Whats the wallet root key .. do you mean account root key?

All account keys are child of the wallet root key.
maybe not include the key import from other wallet?
Title: Re: How & When to Backup Your Wallet
Post by: Riverhead on July 21, 2014, 12:51:36 am
How deterministic are we talking here?  I created two wallets on two machines (one to use and one delegate server) with the same pass phrase (strong).  Are these two machines effectively running the same wallet?

Title: Re: How & When to Backup Your Wallet
Post by: ninja on July 21, 2014, 02:10:59 am
@BM

Correct me if I was wrong. I am using the Windows package. When I was tried to move the wallet from one PC to another PC. I go to roaming folder and copy the wallet folder inside the BitShares X folder along. I saw that it works fine. Is it a good way to move/backup/restore the wallet?

I see that we have the backup option to export the .json file. I think it is used for backup at this point of time. The import function doesnt work yet?
Title: Re: How & When to Backup Your Wallet
Post by: bytemaster on July 21, 2014, 03:56:17 am
How deterministic are we talking here?  I created two wallets on two machines (one to use and one delegate server) with the same pass phrase (strong).  Are these two machines effectively running the same wallet?

They are deterministic from a random seed data, not from your password.
Title: Re: How & When to Backup Your Wallet
Post by: bytemaster on July 21, 2014, 03:57:07 am
@BM

Correct me if I was wrong. I am using the Windows package. When I was tried to move the wallet from one PC to another PC. I go to roaming folder and copy the wallet folder inside the BitShares X folder along. I saw that it works fine. Is it a good way to move/backup/restore the wallet?

I see that we have the backup option to export the .json file. I think it is used for backup at this point of time. The import function doesnt work yet?

Import works, it is just not user-friendly.  Your approach also works.
Title: Re: How & When to Backup Your Wallet
Post by: liondani on July 21, 2014, 01:17:28 pm
is it safe to change the password from the win gui console from time to time ?

Should be safe.  Your backup will still use the old password.
the old backups not the backups created after that point ...
Title: Re: How & When to Backup Your Wallet
Post by: bytemaster on July 21, 2014, 01:21:58 pm
is it safe to change the password from the win gui console from time to time ?

Should be safe.  Your backup will still use the old password.
the old backups not the backups created after that point ...

Correct.
Title: Re: How & When to Backup Your Wallet
Post by: G1ng3rBr34dM4n on July 23, 2014, 01:40:58 am
@BM

Correct me if I was wrong. I am using the Windows package. When I was tried to move the wallet from one PC to another PC. I go to roaming folder and copy the wallet folder inside the BitShares X folder along. I saw that it works fine. Is it a good way to move/backup/restore the wallet?

I see that we have the backup option to export the .json file. I think it is used for backup at this point of time. The import function doesnt work yet?

Import works, it is just not user-friendly.  Your approach also works.

Can someone explain how to do this (through the command line??). 

My wallet crashed on one computer and I couldn't re-install and get it to reopen (Mac version, reference post here: https://bitsharestalk.org/index.php?topic=5968.msg79809#msg79809 (https://bitsharestalk.org/index.php?topic=5968.msg79809#msg79809)  At least one other is having this problem too).

Able to get wallet operational on another computer but can't figure out how to import .json file.

HELP  :-\

edit: I also wanted to mention this is for a registered account on the blockchain, if it makes any difference.
Title: Re: How & When to Backup Your Wallet
Post by: G1ng3rBr34dM4n on July 23, 2014, 04:52:43 pm
@BM

Correct me if I was wrong. I am using the Windows package. When I was tried to move the wallet from one PC to another PC. I go to roaming folder and copy the wallet folder inside the BitShares X folder along. I saw that it works fine. Is it a good way to move/backup/restore the wallet?

I see that we have the backup option to export the .json file. I think it is used for backup at this point of time. The import function doesnt work yet?

Import works, it is just not user-friendly.  Your approach also works.

Can someone explain how to do this (through the command line??). 

My wallet crashed on one computer and I couldn't re-install and get it to reopen (Mac version, reference post here: https://bitsharestalk.org/index.php?topic=5968.msg79809#msg79809 (https://bitsharestalk.org/index.php?topic=5968.msg79809#msg79809)  At least one other is having this problem too).

Able to get wallet operational on another computer but can't figure out how to import .json file.

HELP  :-\

edit: I also wanted to mention this is for a registered account on the blockchain, if it makes any difference.

Alright an update on my attempts to import the .json file:

Tried to use: wallet_create_from_json <json_filename> <wallet_name> <imported_wallet_passphrase>

and then received:

Code: [Select]
wallet must be open to execute this command. You can:
(o) Open an existing wallet
(c) Create a new wallet
(q) Abort command
Command aborted

So I type: (c) and get
Code: [Select]
>> (c)

Error: invalid command "(c)"

If anyone else has figure this out, let me know... I'm not a CS savvy guy, but I'd appreciate any help.  Happy to tip you.  :)
Title: Re: How &amp; When to Backup Your Wallet
Post by: Troglodactyl on July 23, 2014, 05:08:10 pm
@BM

Correct me if I was wrong. I am using the Windows package. When I was tried to move the wallet from one PC to another PC. I go to roaming folder and copy the wallet folder inside the BitShares X folder along. I saw that it works fine. Is it a good way to move/backup/restore the wallet?

I see that we have the backup option to export the .json file. I think it is used for backup at this point of time. The import function doesnt work yet?

Import works, it is just not user-friendly.  Your approach also works.

Can someone explain how to do this (through the command line??). 

My wallet crashed on one computer and I couldn't re-install and get it to reopen (Mac version, reference post here: https://bitsharestalk.org/index.php?topic=5968.msg79809#msg79809 (https://bitsharestalk.org/index.php?topic=5968.msg79809#msg79809)  At least one other is having this problem too).

Able to get wallet operational on another computer but can't figure out how to import .json file.

HELP  :-\

edit: I also wanted to mention this is for a registered account on the blockchain, if it makes any difference.

Alright an update on my attempts to import the .json file:

Tried to use: wallet_create_from_json <json_filename> <wallet_name> <imported_wallet_passphrase>

and then received:

Code: [Select]
wallet must be open to execute this command. You can:
(o) Open an existing wallet
(c) Create a new wallet
(q) Abort command
Command aborted

So I type: (c) and get
Code: [Select]
>> (c)

Error: invalid command "(c)"

If anyone else has figure this out, let me know... I'm not a CS savvy guy, but I'd appreciate any help.  Happy to tip you.  :)
Try c without parentheses.
Title: Re: How &amp; When to Backup Your Wallet
Post by: G1ng3rBr34dM4n on July 23, 2014, 09:29:16 pm
Try c without parentheses.

 :-\

Code: [Select]
>> c

Error: invalid command "c"
Title: Re: How & When to Backup Your Wallet
Post by: vikram on July 23, 2014, 09:51:06 pm
@BM

Correct me if I was wrong. I am using the Windows package. When I was tried to move the wallet from one PC to another PC. I go to roaming folder and copy the wallet folder inside the BitShares X folder along. I saw that it works fine. Is it a good way to move/backup/restore the wallet?

I see that we have the backup option to export the .json file. I think it is used for backup at this point of time. The import function doesnt work yet?

Import works, it is just not user-friendly.  Your approach also works.

Can someone explain how to do this (through the command line??). 

My wallet crashed on one computer and I couldn't re-install and get it to reopen (Mac version, reference post here: https://bitsharestalk.org/index.php?topic=5968.msg79809#msg79809 (https://bitsharestalk.org/index.php?topic=5968.msg79809#msg79809)  At least one other is having this problem too).

Able to get wallet operational on another computer but can't figure out how to import .json file.

HELP  :-\

edit: I also wanted to mention this is for a registered account on the blockchain, if it makes any difference.

Alright an update on my attempts to import the .json file:

Tried to use: wallet_create_from_json <json_filename> <wallet_name> <imported_wallet_passphrase>

and then received:

Code: [Select]
wallet must be open to execute this command. You can:
(o) Open an existing wallet
(c) Create a new wallet
(q) Abort command
Command aborted

So I type: (c) and get
Code: [Select]
>> (c)

Error: invalid command "(c)"

If anyone else has figure this out, let me know... I'm not a CS savvy guy, but I'd appreciate any help.  Happy to tip you.  :)

This should not ask you to open a wallet if you do wallet_create_from_json. Can you copy and paste the entire series of commands and their output when you try to import the json file?
Title: Re: How & When to Backup Your Wallet
Post by: merockstar on July 26, 2014, 02:39:40 am
i backed up my wallet. then registered a few extra names that I thought of after the fact.

is there any reason I should back up my wallet again?

btsx should look at the blockchain, see who registered the those names, and associate them with that wallet in the future, right?
Title: Re: How & When to Backup Your Wallet
Post by: onceuponatime on July 26, 2014, 02:47:02 am
i backed up my wallet. then registered a few extra names that I thought of after the fact.

is there any reason I should back up my wallet again?

btsx should look at the blockchain, see who registered the those names, and associate them with that wallet in the future, right?

What's the point of registering extra names?
Title: Re: How & When to Backup Your Wallet
Post by: merockstar on July 26, 2014, 02:50:43 am
i backed up my wallet. then registered a few extra names that I thought of after the fact.

is there any reason I should back up my wallet again?

btsx should look at the blockchain, see who registered the those names, and associate them with that wallet in the future, right?

What's the point of registering extra names?

idk. vanity.

i registered my first name. then my first name and last initial. then my full name and my forum avatar. then remembered a nickname from my teenage years that a lot of people knew me as.
Title: Re: How & When to Backup Your Wallet
Post by: onceuponatime on July 26, 2014, 03:26:41 am
i backed up my wallet. then registered a few extra names that I thought of after the fact.

is there any reason I should back up my wallet again?

btsx should look at the blockchain, see who registered the those names, and associate them with that wallet in the future, right?

What's the point of registering extra names?

idk. vanity.

i registered my first name. then my first name and last initial. then my full name and my forum avatar. then remembered a nickname from my teenage years that a lot of people knew me as.

I seem to recall Bytemaster saying that multiple names would slow down your wallet.
Title: Re: How & When to Backup Your Wallet
Post by: merockstar on July 26, 2014, 04:30:48 am
i backed up my wallet. then registered a few extra names that I thought of after the fact.

is there any reason I should back up my wallet again?

btsx should look at the blockchain, see who registered the those names, and associate them with that wallet in the future, right?

What's the point of registering extra names?

idk. vanity.

i registered my first name. then my first name and last initial. then my full name and my forum avatar. then remembered a nickname from my teenage years that a lot of people knew me as.

I seem to recall Bytemaster saying that multiple names would slow down your wallet.

well crap. I'd love to see where you read that. wonder if it's possible to deregister some names.
Title: Re: How & When to Backup Your Wallet
Post by: gamey on July 26, 2014, 11:24:48 am

well crap. I'd love to see where you read that. wonder if it's possible to deregister some names.

It is true.  I assume at some point we might be able to ignore names in the wallet so they wouldn't require crypto-calculations 0, but there are tons of things like this that need to be done. :(  For now don't have create many accounts unless you really know what you're doing.
Title: Re: How & When to Backup Your Wallet
Post by: merockstar on July 26, 2014, 02:45:00 pm

well crap. I'd love to see where you read that. wonder if it's possible to deregister some names.

It is true.  I assume at some point we might be able to ignore names in the wallet so they wouldn't require crypto-calculations 0, but there are tons of things like this that need to be done. :(  For now don't have create many accounts unless you really know what you're doing.

well, I've made 8, and the transactions still seem to be confirming reasonably fast (by that I mean near instantly).

I won't make any more.

Do you think this problem is caused by many accounts, or many funded accounts? Cause I haven't funded any of them except one yet.
Title: Re: How & When to Backup Your Wallet
Post by: vikram on July 26, 2014, 04:32:59 pm
The problem is that due to the nature of TITAN, we currently must scan every transaction with every key you own to check if you've received anything. This scanning is slow.
Title: Re: How & When to Backup Your Wallet
Post by: Bitshark on July 26, 2014, 04:41:26 pm
I feel auto backups should be made once a new account is created. Newbies wont create backups and when there comp crashes and needs reformatting they are SOL.
Title: Re: How & When to Backup Your Wallet
Post by: vikram on July 26, 2014, 04:54:30 pm
I feel auto backups should be made once a new account is created. Newbies wont create backups and when there comp crashes and needs reformatting they are SOL.

We have plans for this: https://github.com/BitShares/bitshares_toolkit/issues/453
Title: Re: How & When to Backup Your Wallet
Post by: merockstar on July 26, 2014, 05:11:53 pm
The problem is that due to the nature of TITAN, we currently must scan every transaction with every key you own to check if you've received anything. This scanning is slow.

when does this start getting noticeable? is there some recommended number of accounts that can be made while still running efficiently? maybe there should be a warning in the client when you go to create more than that numbers of accounts.
Title: Re: How & When to Backup Your Wallet
Post by: speedy on July 28, 2014, 10:05:10 pm
I havent registered any accounts on the blockchain (its optional right?). I just exported & backed up my wallet. I then imported my protoshares. Does the importing automatically move those PTS BTSX to an address that is controlled by my BTSX deterministic wallet?

Or does importing the PTS wallet just copy the PTS addresses into my BTSX wallet? In that case would I have to re-backup my BTSX wallet?

I really want to get this right...
Title: Re: How & When to Backup Your Wallet
Post by: bytemaster on July 28, 2014, 10:09:05 pm
I havent registered any accounts on the blockchain (its optional right?). I just exported & backed up my wallet. I then imported my protoshares. Does the importing automatically move those PTS BTSX to an address that is controlled by my BTSX deterministic wallet?

Or does importing the PTS wallet just copy the PTS addresses into my BTSX wallet? In that case would I have to re-backup my BTSX wallet?

I really want to get this right...

Importing just loads the keys, you have to make a transfer to move the funds.
Title: Re: How & When to Backup Your Wallet
Post by: speedy on July 28, 2014, 10:11:29 pm
I havent registered any accounts on the blockchain (its optional right?). I just exported & backed up my wallet. I then imported my protoshares. Does the importing automatically move those PTS BTSX to an address that is controlled by my BTSX deterministic wallet?

Or does importing the PTS wallet just copy the PTS addresses into my BTSX wallet? In that case would I have to re-backup my BTSX wallet?

I really want to get this right...

Importing just loads the keys, you have to make a transfer to move the funds.

Thanks BM. So should I copy-paste my Account Key from the Advanced tab as a new contact named "Me" and send the funds to that address?
Title: Re: How & When to Backup Your Wallet
Post by: bytemaster on July 28, 2014, 10:26:35 pm
I havent registered any accounts on the blockchain (its optional right?). I just exported & backed up my wallet. I then imported my protoshares. Does the importing automatically move those PTS BTSX to an address that is controlled by my BTSX deterministic wallet?

Or does importing the PTS wallet just copy the PTS addresses into my BTSX wallet? In that case would I have to re-backup my BTSX wallet?

I really want to get this right...

Importing just loads the keys, you have to make a transfer to move the funds.

Thanks BM. So should I copy-paste my Account Key from the Advanced tab as a new contact named "Me" and send the funds to that address?

No need to copy and paste the key... just send it to your account name.  Be sure to vote for some delegates first :)
Title: Re: How & When to Backup Your Wallet
Post by: speedy on July 28, 2014, 10:46:35 pm
No need to copy and paste the key... just send it to your account name.  Be sure to vote for some delegates first :)

Ah I see I can just type my unregistered account name into the To field - nice.

I successfully imported my PTS wallet, but then I tried importing my Electrum wallet. It said in the console "Successfully imported 12 keys from: wallet.dat" But no new funds were added to my balance. Is there something else I need to do to import from Electrum ?
Title: Re: How & When to Backup Your Wallet
Post by: speedy on July 28, 2014, 11:25:49 pm
Ok nevermind Im manually dumping my private keys from my Electrum wallet and it seems to be picking it up now. I think my computer is just incredibly slow so the qt wallet takes about a minute before it shows my funds updated.
Title: Re: How & When to Backup Your Wallet
Post by: Cryptofreakoutlaw31 on July 31, 2014, 12:12:08 pm
I have a question to make sure that I understand when I am backing up my Bitshares:

I created two accounts.   The first account that I created was the one that I registered,  The second account that I created is the one that I did not register but I transferred a bulk of my BTSX (bought from Bter) from my registered to the second unregistered account.  I backed up the 2nd unregistered account to another drive.  I did not backup the 1st account that I registered since I already registered it before seeing this thread. 

Did I do this right in backing up the 2nd unregistered BTSX account that I transferred most of my BTSX to? 

Thanks in advance for your help. 
Title: Re: How & When to Backup Your Wallet
Post by: kokojie on July 31, 2014, 01:53:26 pm
Do I have to back up again after making any transaction? (ie. Bitcoin-qt client auto create change address after making transaction so you have to back up the wallet again)
Title: Re: How &amp; When to Backup Your Wallet
Post by: xeroc on July 31, 2014, 01:58:45 pm
No ... keys ares semi deterministic ... masterkey .. tied to you accountname is random .. each further key of that account is deterministic
..

Backing up the account key is enough to secure the account
Title: Re: How & When to Backup Your Wallet
Post by: merockstar on July 31, 2014, 09:10:54 pm
Do I have to back up again after making any transaction? (ie. Bitcoin-qt client auto create change address after making transaction so you have to back up the wallet again)

not sure about the answer to your actual question, but if I were to guess I would say the answer is no because of TITAN.

off-topic, but interesting: for bitcoin (and altcoins that use the QT client) if you open your bitcoin.conf file and add the line:
Code: [Select]
keypool=aBigNumber

it will go ahead and pre-generate however many addresses you told it to (I chose 5000). It takes a minute, and it will look like the wallet froze. Then you dont have to worry about backing it up for a while.