Author

Topic: Balance missmatch (bitcoind dumpprivkey) (Read 2204 times)

sr. member
Activity: 306
Merit: 250
Donations: http://tny.im/nx
September 09, 2012, 09:48:32 AM
#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.
full member
Activity: 216
Merit: 100
September 09, 2012, 09:41:39 AM
#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 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.
sr. member
Activity: 306
Merit: 250
Donations: http://tny.im/nx
September 09, 2012, 08:58:51 AM
#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.
legendary
Activity: 1358
Merit: 1002
September 09, 2012, 08:48:04 AM
#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.
sr. member
Activity: 306
Merit: 250
Donations: http://tny.im/nx
September 09, 2012, 07:05:08 AM
#7
Thanks, I finally did it after opening bitcoind and issuing commands with cURL.
legendary
Activity: 1358
Merit: 1002
September 08, 2012, 09:21:42 PM
#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.
sr. member
Activity: 306
Merit: 250
Donations: http://tny.im/nx
September 08, 2012, 05: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?
full member
Activity: 216
Merit: 100
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)?
donator
Activity: 674
Merit: 523
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!
legendary
Activity: 1358
Merit: 1002
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
donator
Activity: 674
Merit: 523
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.
Jump to: