Bitcoin Forum
November 09, 2024, 11:48:39 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Did I lose 10s of BTC! I am freaking out!  (Read 1661 times)
Ie43893 (OP)
Newbie
*
Offline Offline

Activity: 4
Merit: 0


View Profile
March 30, 2017, 08:39:48 PM
 #1

I have an offline QT wallet. I used getbalance to look at addresses and decided to import a private key into my electrum wallet. This way I would not expose my offline wallet.

The balance on Electrum and on blockchain sites is much lower than the balance reported by bitcoin QT's getbalance.

Whenever I have done this before, I have always fully emptied whichever private key I imported into Electrum because I know a failure to do so would cause the change to be sent to a new private key and would not remain on the offline wallet.

What is going on here? Is it possible I could have lost bitcoins? Why is a private key that I have imported and never spent from showing a non zero balance much lower than on Bitcoin QT?

Edit: The blockchain sites and Electrum show no history of any outgoing transfers on the private key that I imported. I looked at technical threads detailing problems with the getbalance but I am not sure what to make of them because I do not have a technical background.
achow101
Moderator
Legendary
*
Offline Offline

Activity: 3542
Merit: 6886


Just writing some code


View Profile WWW
March 30, 2017, 09:37:57 PM
 #2

Bitcoin Core's getbalance system works by accounts (which are deprecated), not addresses. It is possible that you have another address in the same account which is making you see you have more Bitcoin with getbalance, but it is not actually all associated with the same private key.

Furthermore, you are running getbalance on an offline node, so it will not be up to sync. If at any other point in time you spent some Bitcoin by importing a private key from your offline wallet, your wallet will not know that the Bitcoin is spent and will report a higher balance than you actually have if you use getbalance without any arguments.

Ie43893 (OP)
Newbie
*
Offline Offline

Activity: 4
Merit: 0


View Profile
March 30, 2017, 09:51:12 PM
 #3

Thank you for the response. It is not a syncing issue I am sure.

What exactly is an account if it isn't a public key address? How would I find the other addresses associated with the amounts? Is there anyway to get an accurate reading of what the balance of actual addresses are and not the balance of accounts.

Also, is there any way what I have done could have caused a loss of bitcoin? According to your explanation it seems like it is not possible that I lost any bitcoin. The bitcoin are simply in other addresses in the account associated with the private key that I have used. The account has other private keys which have the rest of the funds in that case. Is my thinking correct. Also I do not know what you mean by deprecated in this context.
DannyHamilton
Legendary
*
Offline Offline

Activity: 3486
Merit: 4832



View Profile
March 31, 2017, 12:33:06 AM
 #4

What exactly is an account if it isn't a public key address?

An "account" is a deprecated accounting system built into Bitcoin-Qt that is going away partly because so many people didn't understand the difference between an account and an address.

It is possible for an "account" to have a negative balance. It is not possible for an "address" to have a negative number of bitcoins associated with it.

How would I find the other addresses associated with the amounts?

Code:
listunspent

Is there anyway to get an accurate reading of what the balance of actual addresses are and not the balance of accounts.

If the blockchain is synchronized, you can use:
Code:
listunspent

Also, is there any way what I have done could have caused a loss of bitcoin?

Maybe, but it's more likely that you've lost track of what you've spent from the wallet due to your unusual way of using it.

Also I do not know what you mean by deprecated in this context.

It means that there is a plan to remove the feature in the future and that no additional development will be done on that feature to change or fix it if you don't like the way it works now.
Ie43893 (OP)
Newbie
*
Offline Offline

Activity: 4
Merit: 0


View Profile
March 31, 2017, 06:20:02 AM
 #5

Thank you for the response. It sounds like I probably didn't lose any bitcoins. But your uncertainty worries me. How would it be possible though to lose bitcoins by simply spending the entire amounts of one private key at a time on another online machine. The unused private keys of the cold wallet should not be effected and the balances should still add up to the original balance minus the spends and all remaining bitcoins and private keys should be retrievable from the non-updated cold wallet. Is this right or have I made an error?

I am not sure how it would be possible though to spend from an offline wallet safely without exposing the whole wallet by putting it online or generating the transfer on the offline machine and backing up the wallet and making redundancies after every transfer. Importing and spending a private key one at a time shouldn't effect the rest of the private keys and the balance on the old cold wallet should be the same minus the single private key which was removed. I'm not sure how importing one or more private keys could effect the balance of the other private keys on the cold wallet.

Should I continue using this weird method to spend from my offline wallet or is there another method I should use? I know how many bitcoins I should have in the wallet because I have kept count of every expenditure and thought I should simply deduct the expenditures from the total balance shown as the wallet was synced up until a point before the first expenditure.

HCP
Legendary
*
Offline Offline

Activity: 2086
Merit: 4361

<insert witty quote here>


View Profile
March 31, 2017, 09:39:50 AM
 #6

I thought the solution was to create an unsigned transaction on your "Hot Wallet" machine... transfer it manually (ie. via usb) to the cold wallet machine... sign the transaction on the cold wallet machine... transfer the signed transaction back to the hot wallet and then broadcast it out onto the network.

A cold wallet generates and stores private wallet keys offline on a clean air-gapped computer. Unsigned transactions are generated online, transferred offline for verification and signing, and the signed transaction is transferred online to be transmitted to the Bitcoin network.

I'm not sure why you would go to all the trouble of having cold storage in the first place, if you then expose your private keys to the world by importing them into your hot wallet machine? That sort of defeats the purpose of the cold wallet. Unless you intend on NEVER using that key/address again?  Huh


By doing the transfer of just the transaction and signing it offline, you also get the bonus of not needing to full spend the contents of those keys each time you want to transfer some coins...

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
Tesorex
Full Member
***
Offline Offline

Activity: 204
Merit: 100



View Profile
March 31, 2017, 11:01:04 AM
 #7

You could insert every address you have in blockchain explorer and see their balance if the coins were successfully confirmed by miners/nodes.
You can't send bitcoin from one address of a wallet to another address in the same wallet while you are offline because the network doesn't know that you did that.
You could check the addresses tab to see your other ones, bitcoins wouldn't magically appear or disappear unless you spend them, or maybe you have a wrong unit in your offline wallet that is showing you mBTC instead of BTC?
DannyHamilton
Legendary
*
Offline Offline

Activity: 3486
Merit: 4832



View Profile
March 31, 2017, 12:11:01 PM
 #8

Thank you for the response. It sounds like I probably didn't lose any bitcoins. But your uncertainty worries me. How would it be possible though to lose bitcoins by simply spending the entire amounts of one private key at a time on another online machine. The unused private keys of the cold wallet should not be effected and the balances should still add up to the original balance minus the spends and all remaining bitcoins and private keys should be retrievable from the non-updated cold wallet. Is this right or have I made an error?

Did you try listunspent yet?  Did the result show what you expected it to?  Did you check a block explorer to make sure that you could account for every output listed?

I am not sure how it would be possible though to spend from an offline wallet safely without exposing the whole wallet by putting it online or generating the transfer on the offline machine and backing up the wallet and making redundancies after every transfer.

See Armory offline.

Also see Electrum offline.

Should I continue using this weird method to spend from my offline wallet

That's up to you, but since you clearly don't fully understand how the wallet works, perhaps it's better not to be messing around with exporting and importing and trying to track your own balance.

or is there another method I should use?

See Armory offline.

Also see Electrum offline.
Ie43893 (OP)
Newbie
*
Offline Offline

Activity: 4
Merit: 0


View Profile
March 31, 2017, 12:44:32 PM
 #9

Moving a USB from an online wallet to an offline wallet back to an offline wallet defeats the purpose of cold storage was my thinking.

If a private key and public key are paired they should not effect other private and public keys.

Obviously the bitcoin client uses accounts to mean something other than private keys which to me makes no sense and makes me question if somehow the private keys are intermingled.

Yes if I manually write down a private key from the offline wallet and import it to an online electrum client I am risking the bitcoins attached to that private key but it should be the safest way to not risk the rest of the bitcoins which are connected to other private keys.

I will check the offline client again but for safety reasons it is not easy for me to access. I had accessed it and wrote down a couple private keys which the QT told me had much larger bitcoin amounts in them. The addresses associated with the private keys have not been spent from so it is not a syncing issue. I will report back when I check again but I am more weary of trusting moving a USB between computers than what should just be a single isolated private key. If other private keys on your offline wallet can become corrupted or damaged because you use a private key from that wallet it seems like a big issue.
DannyHamilton
Legendary
*
Offline Offline

Activity: 3486
Merit: 4832



View Profile
March 31, 2017, 01:09:32 PM
 #10

Moving a USB from an online wallet to an offline wallet back to an offline wallet defeats the purpose of cold storage was my thinking.

Both plugging in a USB and importing a private key have their own risks.  You can't eliminate risk in life, you can reduce risk and limit it.

If a private key and public key are paired they should not effect other private and public keys.

That is generally true, and is certainly true if proper methods are used for generating the private keys.

Obviously the bitcoin client uses accounts to mean something other than private keys

Correct.  Accounts have nothing to do with private keys.

which to me makes no sense and makes me question if somehow the private keys are intermingled.

Intermingled?  Not sure what you mean by that.  They are all stored in the same file, so yes they are intermingled.

Yes if I manually write down a private key from the offline wallet and import it to an online electrum client I am risking the bitcoins attached to that private key but it should be the safest way to not risk the rest of the bitcoins which are connected to other private keys.

Yes, bitcoins connected to other private keys should be unaffected. The main concern is whether or not you are correct about how many bitcoins the wallet actually had associated with the key you imported. If you were using "accounts" to determine this, then you may have imported a private key that had more bitcoins associated than you thought.  Therefore, when you thought you "fully emptied whichever private key you imported" there is a possibility that you made a mistake and lost some bitcoins that you didn't account for.  It's unlikely, but possible.

I will check the offline client again but for safety reasons it is not easy for me to access.

Good luck.  I hope you get it all figured out.  Let me know if there's anything more I can do to help.
HCP
Legendary
*
Offline Offline

Activity: 2086
Merit: 4361

<insert witty quote here>


View Profile
March 31, 2017, 11:24:12 PM
 #11

Moving a USB from an online wallet to an offline wallet back to an offline wallet defeats the purpose of cold storage was my thinking.

...

 I will report back when I check again but I am more weary of trusting moving a USB between computers than what should just be a single isolated private key. If other private keys on your offline wallet can become corrupted or damaged because you use a private key from that wallet it seems like a big issue.
That is the "recommended" (or more correctly, most publicised) method of achieving what it is that you seem to be trying to do.

The transaction that you generate on the online machine, is really just a text file... no binaries or anything like that... so if you have a nice new USB stick and the only thing on it is the transaction text file, then you should be fine to move backwards and forwards.

If both the offline and online machines are setup with "autorun" (and all that sort of nonsense) disabled, the risk involved of plugging in a USB stick and copying a text file off and then back on are pretty minor. Even the Armory Offline setup involves moving (un)signed transactions back and forth via USB.

On the otherside, I think I can see your point of view. I assume you are copying your Offline private key(s) out by hand, and then manually entering them into your Online machine. That does indeed take away the possibility of an exploit using the USB stick attack vector. However, the extra work involved with doing all this manually, plus the fact that it means you are having to manually track all your inputs and outputs seems to be a lot of work for very little real gain in security.


█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
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!