Bitcoin Forum
December 05, 2016, 12:44:24 AM *
News: To be able to use the next phase of the beta forum software, please ensure that your email address is correct/functional.
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Balance missmatch (bitcoind dumpprivkey)  (Read 1858 times)
minimalB
Donator
Hero Member
*
Offline Offline

Activity: 627


View Profile
July 15, 2012, 06:04:12 PM
 #1

I need a little help guys.

I have used dumpprivkey and successfully exported all my private keys from wallet.dat.

However, when i imported those private keys into brand new blockchain.info wallet, there is a "balance miss match" as well as "number of transactions" miss match".

I then tried to use "listreceivedbyaddress 0 true" in case there is any other address with positive balance. It is not.

I have 2 questions:

1. I'd like to know why there is a difference in total balance?

2. How do i get/see/export change address balance in case missing coins are there?


Thank you for your time.
1480898664
Hero Member
*
Offline Offline

Posts: 1480898664

View Profile Personal Message (Offline)

Ignore
1480898664
Reply with quote  #2

1480898664
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1480898664
Hero Member
*
Offline Offline

Posts: 1480898664

View Profile Personal Message (Offline)

Ignore
1480898664
Reply with quote  #2

1480898664
Report to moderator
Raoul Duke
aka psy
Legendary
*
Offline Offline

Activity: 1442



View Profile
July 15, 2012, 06:06:47 PM
 #2

Most likely your missing balance is on change addresses, yes.

Easy way to fix. Send all your balance to an address which isn't a change address on the same wallet. Wink

minimalB
Donator
Hero Member
*
Offline Offline

Activity: 627


View Profile
July 16, 2012, 09:28:13 AM
 #3

Looks like one has to be careful with this. Imagine dumping all the keys and then erasing wallet.dat file in a hurry... ouch : )

Tnx!
Nyhm
Full Member
***
Offline Offline

Activity: 215



View Profile WWW
July 16, 2012, 01:24:45 PM
 #4

So, the bitcoind/-qt client doesn't consider change addresses to be associated with any account? Is that why "listreceivedbyaddress 0 true" fails to find active change addresses in the wallet?

I'm looking at the API calls and there doesn't seem to be a command to list all addresses (or private keys) in the wallet's pool (regardless of balance).

(a) I wonder why not
(b) Is there another way to do this (pywallet, maybe)?

~ Bitcoin Game List
~ "Mathematicians overlook that computation is bounded by Physics. Computer Scientists lament it. Cryptographers depend on it." -- Nyhm c. 2012
~ 1NYhM2pzT6PDfZyXbyFm3dVcoob4phrGc5
gbl08ma
Sr. Member
****
Offline Offline

Activity: 306


Donations: http://tny.im/nx


View Profile WWW
September 08, 2012, 10:24:15 PM
 #5

I'm sorry for bumping an old thread, but I got a similar situation.

I wanted to import a wallet.dat to blockchain.info, but even after importing all the keys there were still 1.5 BTC missing on the blockchain.info wallet. So I waited for the original client to download all the blockchain (sigh...) and when it finally did, I sent all the coins to an address on the blockchain.info wallet (after also paying a giant transaction fee for having lots of small inputs), like the OP ended doing.

The problem is, one of the addresses I couldn't import into the online wallet keeps receiving coins, and I can't move them somewhere else without having the open the Satoshi client and waiting for the blockchain to download...
This is a single address, I don't care about the others as they won't be receiving money. This address doesn't show anymore on the GUI of the client (it must have been there before, perhaps on an earlier version, because I managed to signup with that address for something...).
pywallet shows the address as being the "defaultkey" on the wallet.

I need the private key for the address in order to be able to spend its balance, out of the original Bitcoin client. I don't want to be dependent on the desktop client just to move coins out of the address. I don't know how to take the private key out, as the wallet is encrypted. As expected, pywallet was of no help as it can't deal with encrypted wallets.

One solution would be to decrypt the wallet to take the private key out with pywallet, then encrypt it again. However, I see no function for decrypting the wallet, only to change its password.

Any ideas?

Raoul Duke
aka psy
Legendary
*
Offline Offline

Activity: 1442



View Profile
September 09, 2012, 02:21:42 AM
 #6

https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_Calls_list

what you need is the walletpassphrase command
after you unlock the wallet you can export the private key of the address.

Not typing a full guide cause I'm on my tablet and it's not easy.

gbl08ma
Sr. Member
****
Offline Offline

Activity: 306


Donations: http://tny.im/nx


View Profile WWW
September 09, 2012, 12:05:08 PM
 #7

Thanks, I finally did it after opening bitcoind and issuing commands with cURL.

Raoul Duke
aka psy
Legendary
*
Offline Offline

Activity: 1442



View Profile
September 09, 2012, 01:48:04 PM
 #8

Thanks, I finally did it after opening bitcoind and issuing commands with cURL.

You didn't mentioned your OS, but I'll just leave this here for reference: cURL is only needed on MacOSx. Windows and Linux have a real bitcoind and can accept the commands directly from the console.

gbl08ma
Sr. Member
****
Offline Offline

Activity: 306


Donations: http://tny.im/nx


View Profile WWW
September 09, 2012, 01:58:51 PM
 #9

I'm using Linux. I know I can type the RPC commands after bitcoind, but I didn't know if the wallet would still be unlocked after I called (and killed) "bitcoind walletpassphrase xyx", so I decided to run bitcoind, issue the RPC commands with cURL and then close bitcoind.

Nyhm
Full Member
***
Offline Offline

Activity: 215



View Profile WWW
September 09, 2012, 02:41:39 PM
 #10

The way I usually issue commands to bitcoind in Linux is to: (a) start an instance of bitcoind (or even bitcoin-qt) with the bitcoin.conf set to server mode with an rpc user/pass, (b) execute bitcoind <rpc-command> from command-line. The second execution acts as a client, passing the API commands to the running server process.

... I'm not sure if I've added clarity or confusion to this topic ...

It offers command-line execution flags (plus config file), like any application, but also turns into an RPC client when a server instance is already running. It makes fine technical sense, but it's a rather confusing setup for any new user (even command-line savvy users).

EDIT: Now I'm confusing myself, because bitcoind doesn't even need the rpcuser/pass when passing commands such as dumpprivkey and importprivkey. Is this using the RPC API at all, or just doing some other form of inter-process communication with itself? Or, does it know that user/pass because it's in its own config file? What a confusing collection of operations.

~ Bitcoin Game List
~ "Mathematicians overlook that computation is bounded by Physics. Computer Scientists lament it. Cryptographers depend on it." -- Nyhm c. 2012
~ 1NYhM2pzT6PDfZyXbyFm3dVcoob4phrGc5
gbl08ma
Sr. Member
****
Offline Offline

Activity: 306


Donations: http://tny.im/nx


View Profile WWW
September 09, 2012, 02:48:32 PM
 #11

bitcoind wouldn't start as a client for some reason (may have to do with the bitcoind config or some misconfiguration of my system). It always started as a server and then complained another instance was running; I didn't bother forcing it to act as a client.

In fact, the idea of using RPC came to my mind before but I thought it wouldn't work because otherwise blockchain.info's tool would have "seen" and imported the address too. Looks like it wasn't the case.

cURL worked best for me, but I agree that for most users opening another instance of bitcoind as a client is easier.

Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!