Bitcoin Forum
December 07, 2016, 12:57:02 PM *
News: Latest stable version of Bitcoin Core: 0.13.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: [BOUNTY] Really annoying balance issue  (Read 1429 times)
davout
Legendary
*
Offline Offline

Activity: 1358


1davout


View Profile WWW
May 17, 2012, 01:10:37 PM
 #1

Code:
$ ./bitcoin getinfo
{
    "version" : 60099,
    "protocolversion" : 60000,
    "walletversion" : 60000,
    "balance" : 62.10626016,
    "blocks" : 180481,
    "connections" : 8,
    "proxy" : "",
    "difficulty" : 1733207.51384839,
    "testnet" : false,
    "keypoololdest" : 1337234612,
    "keypoolsize" : 1001,
    "paytxfee" : 0.00000000,
    "errors" : "URGENT: upgrade required, see http://bitcoin.org/dos for details"
}

(Gonna do the upgrade later, don't think it has anything to do with my problem.)

Code:
$ ./bitcoin getbalance '*' 0
1810.91340447

$ ./bitcoin getbalance '*' 1
1776.64506472

The correct value should be the one that getbalance yields.
What could be happening here ?? This is driving me seriously crazy.

1481115422
Hero Member
*
Offline Offline

Posts: 1481115422

View Profile Personal Message (Offline)

Ignore
1481115422
Reply with quote  #2

1481115422
Report to moderator
1481115422
Hero Member
*
Offline Offline

Posts: 1481115422

View Profile Personal Message (Offline)

Ignore
1481115422
Reply with quote  #2

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

Posts: 1481115422

View Profile Personal Message (Offline)

Ignore
1481115422
Reply with quote  #2

1481115422
Report to moderator
1481115422
Hero Member
*
Offline Offline

Posts: 1481115422

View Profile Personal Message (Offline)

Ignore
1481115422
Reply with quote  #2

1481115422
Report to moderator
1481115422
Hero Member
*
Offline Offline

Posts: 1481115422

View Profile Personal Message (Offline)

Ignore
1481115422
Reply with quote  #2

1481115422
Report to moderator
randomproof
Member
**
Offline Offline

Activity: 61


View Profile
May 17, 2012, 02:57:02 PM
 #2

It seems that you are just using the 'getbalance' command wrong, don't put "'*' 0" at the end.

like this:
bitcoin getbalance


You might be missing transactions so try running:
bitcoin -rescan
then:
bitcoin listaccounts



Donations to me:   19599Y3PTRF1mNdzVjQzePr67ttMiBG5LS
davout
Legendary
*
Offline Offline

Activity: 1358


1davout


View Profile WWW
May 17, 2012, 03:08:31 PM
 #3

It seems that you are just using the 'getbalance' command wrong, don't put "'*' 0" at the end.

like this:
bitcoin getbalance


You might be missing transactions so try running:
bitcoin -rescan
then:
bitcoin listaccounts
I did rescan a couple of times already, and I'm using the getbalance command correctly.
But thank you for showing some interest, it is appreciated Smiley

EDIT : Using listaccounts is a good suggestion actually, gives some more insight, results posted below

davout
Legendary
*
Offline Offline

Activity: 1358


1davout


View Profile WWW
May 17, 2012, 03:19:22 PM
 #4

Code:
$ ./bitcoin getinfo
{
    "version" : 60099,
    "protocolversion" : 60000,
    "walletversion" : 60000,
    "balance" : 698.57338016,
    "blocks" : 180489,
    "connections" : 8,
    "proxy" : "",
    "difficulty" : 1733207.51384839,
    "testnet" : false,
    "keypoololdest" : 1337242670,
    "keypoolsize" : 1001,
    "paytxfee" : 0.00000000,
    "errors" : "URGENT: upgrade required, see http://bitcoin.org/dos for details"
}

$ ./bitcoin getbalance
698.57338016

$ ./bitcoin getbalance '' 0
2883.11218472

$ ./bitcoin getbalance '' 1
2413.11218472

$ ./bitcoin listaccounts
{
    "" : 2413.11218472
}

$ ./bitcoin getbalance '*' 0
2883.11218472

$ ./bitcoin getbalance '*' 1
2413.11218472

Ok, so what I conclude is the following : there is apparently a bug in getbalance (called without additional arguments), that prevents it from reporting the correct balance. I assume that calling getbalance and passing an account yields the correct balances (I track them separately in a RDBMS).

Since I don't use accounts getbalance '' X and getbalance '*' X logically yield the same result.

This is very frustrating, if it is confirmed to be a bug in bitcoind (I suspect it's linked with this bug) then I think its priority should be bumped a fair bit since it prevents sending valid funds.

Any insight, idea or suggestion from the friendly Bitcoin community will be very appreciated!

davout
Legendary
*
Offline Offline

Activity: 1358


1davout


View Profile WWW
May 17, 2012, 04:59:48 PM
 #5

I'll bounty 2 BTC for a workaround and 10 BTC for a fix.

Bitsky
Hero Member
*****
Offline Offline

Activity: 542


View Profile
May 17, 2012, 05:30:12 PM
 #6

I can't really offer a fix, but I ran into the same problem: https://bitcointalk.org/index.php?topic=81473.0

Perhaps it's possible to narrow down the cause. For me, the bug appeared when I played around with im/exporting keys. Everything was perfectly fine until the client picked up confirmations for the "to self" transaction.

Bounty: Earn up to 68.7 BTC
Like my post? Feel free to drop a tip to 1BitskyZbfR4irjyXDaGAM2wYKQknwX36Y
randomproof
Member
**
Offline Offline

Activity: 61


View Profile
May 17, 2012, 09:00:30 PM
 #7

Looking at the code a little, it might be possible that you have unconfirmed transactions.  Did you delete all the transactions in the wallet before rescanning?

If it is not that, then I'm lost.

Donations to me:   19599Y3PTRF1mNdzVjQzePr67ttMiBG5LS
Mushroomized
Legendary
*
Offline Offline

Activity: 1246


Hello!


View Profile
May 17, 2012, 09:18:12 PM
 #8

Update it, and rescan for transactions. If that doesn't work try using a new wallet all together

Pre Announcement for the Vulcanalia Mint! https://bitcointalk.org/index.php?topic=1645665
15ELF8DcNTMQ6diBQXFpKFSSMySDX2RBBh tip me for being a good boy
davout
Legendary
*
Offline Offline

Activity: 1358


1davout


View Profile WWW
May 18, 2012, 08:20:42 AM
 #9

Looking at the code a little, it might be possible that you have unconfirmed transactions.  Did you delete all the transactions in the wallet before rescanning?

If it is not that, then I'm lost.
I do not, the balance reported by "getbalance '*' 1" is much bigger than what getbalance reports (the calls should theoretically be equivalent), that means the transactions counted have at least one conf.
It's logical that "getbalance '*' 0" reports a bigger balance than "getbalance '*' 1" though.

Update it, and rescan for transactions. If that doesn't work try using a new wallet all together
Update is irrelevant, rescan was done long before I even thought about posting on the forums, using a new wallet implies that I can transfer the coins which the client won't let me do since it will check what I try to send against getbalance (it won't let me transfer all the coins)

Bitsky
Hero Member
*****
Offline Offline

Activity: 542


View Profile
May 18, 2012, 08:38:25 AM
 #10

using a new wallet implies that I can transfer the coins which the client won't let me do since it will check what I try to send against getbalance (it won't let me transfer all the coins)
You can create a new, empty wallet and use eg pywallet to extract the private keys from your old wallet and import them into your new wallet. Try it with just a few keys (or one only) first, use that temporary wallet with a rescan and send the coins to another new wallet.

Should work to get around this problem; however, a fix of the source to avoid that would be nice.

Also, not seeing the source/destination address in a transfer to yourself is not helpful either.

Bounty: Earn up to 68.7 BTC
Like my post? Feel free to drop a tip to 1BitskyZbfR4irjyXDaGAM2wYKQknwX36Y
jojkaart
Member
**
Offline Offline

Activity: 97


View Profile
May 18, 2012, 08:57:46 AM
 #11

davout, it appears people aren't receiving all the bitcoins they're supposed to. Could it be related to this problem? http://www.reddit.com/r/Bitcoin/comments/ts6ak/instawallet_lost_5_of_my_deposit/

davout
Legendary
*
Offline Offline

Activity: 1358


1davout


View Profile WWW
May 18, 2012, 09:15:56 AM
 #12

You can create a new, empty wallet and use eg pywallet to extract the private keys from your old wallet and import them into your new wallet. Try it with just a few keys (or one only) first, use that temporary wallet with a rescan and send the coins to another new wallet.
That's exactly what I did to create this wallet, I took a big bunch of keys, imported them all, and then let the client download/scan the chain.
I very strongly suspect the issue is somehow related to imported keys (as opposed to those generated directly by the client).

davout, it appears people aren't receiving all the bitcoins they're supposed to. Could it be related to this problem? http://www.reddit.com/r/Bitcoin/comments/ts6ak/instawallet_lost_5_of_my_deposit/
That can happen when the site is down for maintenance, bitcoind receives the coins, but the part where it notifies the backend DB doesn't work. What I usually do in these cases is force a rescan of the events that happened during the time the backend was offline.

Thank god most people aren't like the person posting this reddit thread and don't start spreading FUD if don't get an instantaneous reply from the support.

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!