Bitcoin Forum
October 24, 2017, 09:57:04 AM *
News: Latest stable version of Bitcoin Core: 0.15.0.1  [Torrent]. (New!)
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Lebowskis LBW -- Balance not matching transaction history. Why?  (Read 488 times)
btc4ever
Sr. Member
****
Offline Offline

Activity: 419


View Profile
October 11, 2013, 01:49:28 AM
 #1

So I have been mining some LBW from time to time.  Always solo mining. Never any send/receive transactions.  Today I noticed that the reported balance is substantially lower than the sum of the "generate" transactions when I call listtransactions. 

  reported balance: 3822.56
  sum of 'generate' transactions: 7509

( I computed the sum of transactions by calling listtransactions '' 1000, then parsing the output into a CSV file and filtering out everything that is not category "generate", then summing. )

So this seems like a bug to me, but maybe there is another explanation?

i did notice that at one point lebowskid was using a lot of CPU and the stake value became non-zero, and it was generating some transactions, which I thought was odd, but figured it was all part of the proof-of-stake logic.  But now "stake" value is zero again, and the only two transactions types in history are "generate" and "orphan".

A few more details below.

Quote
./lebowskisd getinfo
{
    "version" : "v1.1.0.0-g32a928e-dude-abides",
    "protocolversion" : 65000,
    "walletversion" : 60000,
    "balance" : 3822.56000000,
    "newmint" : 0.00000000,
    "stake" : 0.00000000,
    "blocks" : 105033,
    "moneysupply" : 2076600.75851100,
    "difficulty" : 0.13767134,
    "testnet" : false,
    "keypoololdest" : 1374466971,
    "keypoolsize" : 102,
    "paytxfee" : 0.00100000,
    "errors" : ""
}

Quote
./lebowskisd listtransactions '' 1000 | grep generate | grep categ | wc -l
393

./lebowskisd listtransactions '' 1000 | grep orphan | grep categ | wc -l
17

./lebowskisd listtransactions '' 1000 | grep amount | grep 19.98 | wc -l
197

./lebowskisd listtransactions '' 1000 | grep amount | grep 20.0 | wc -l
174

./lebowskisd listtransactions '' 1000 | grep amount | grep -v 19.98 | wc -l
213

./lebowskisd listtransactions '' 1000 | grep amount | sort -u
        "amount" : 10.00000000,
        "amount" : 10.01000000,
        "amount" : 19.98000000,
        "amount" : 19.99000000,
        "amount" : 20.00000000,
        "amount" : 20.01000000,
        "amount" : 20.02000000,

./lebowskisd listtransactions '' 1000 | grep amount | grep 10.0 | wc -l
86






Psst!!  Wanna make bitcoin unstoppable? Why the Only Real Way to Buy Bitcoins Is on the Streets. Avoid banks and centralized exchanges.   Buy/Sell coins locally.  Meet other bitcoiners and develop your network.   Try localbitcoins.com or find or start a buttonwood / satoshi square in your area.  Pass it on!
1508839024
Hero Member
*
Offline Offline

Posts: 1508839024

View Profile Personal Message (Offline)

Ignore
1508839024
Reply with quote  #2

1508839024
Report to moderator
1508839024
Hero Member
*
Offline Offline

Posts: 1508839024

View Profile Personal Message (Offline)

Ignore
1508839024
Reply with quote  #2

1508839024
Report to moderator
1508839024
Hero Member
*
Offline Offline

Posts: 1508839024

View Profile Personal Message (Offline)

Ignore
1508839024
Reply with quote  #2

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

Posts: 1508839024

View Profile Personal Message (Offline)

Ignore
1508839024
Reply with quote  #2

1508839024
Report to moderator
aa
Hero Member
*****
Offline Offline

Activity: 518


Litecoin is right coin


View Profile WWW
October 11, 2013, 03:57:23 AM
 #2

I can only imagine that you mined a bunch of orphans when this coin was first released because I can't see it being possible to get orphans when you're the only person mining a dead shitcoin.

btc4ever
Sr. Member
****
Offline Offline

Activity: 419


View Profile
October 11, 2013, 04:02:26 AM
 #3

Ok, I wrote a little php script to make it easier to get the transaction totals by category.  Script is below.  I also tried it with 7 other altcoins both scrypt and sha256 based, all POW.  All of them matched the balance correctly.

So I am thinking this is either a POW/POS thing I don't understand yet (likely), or else lebowskicoind has a pretty serious bug.

Can someone with PPCoin or some other POW/POS coins please try my script below and report your findings?  thanks.

Quote
$ ./lebowskisd listtransactions '' 100000 | sum_transactions.php

Array
(
    [generate] => 7638.8800000001
    [generate_count] => 394
    [orphan] => 339.88
    [orphan_count] => 17
)
lebowskicoin@miner1:~/lebowskicoin/src$ ./lebowskisd getbalance
3822.57000000


Here is the sum_transactions.php script
Quote
#!/usr/bin/env php

<?php

$fh = STDIN;

$buf = stream_get_contents( $fh );

$data = json_decode( $buf );

$amounts = array();
foreach( $data as $trans ) {
        if( @$trans->amount ) {
                if( @$amounts[$trans->category] ) {
                        $amounts[$trans->category] += $trans->amount;
                        $amounts[$trans->category . '_count'] += 1;
                }
                else {
                        $amounts[$trans->category] = $trans->amount;
                        $amounts[$trans->category . '_count'] = 1;
                }
        }
}
print_r( $amounts );

Psst!!  Wanna make bitcoin unstoppable? Why the Only Real Way to Buy Bitcoins Is on the Streets. Avoid banks and centralized exchanges.   Buy/Sell coins locally.  Meet other bitcoiners and develop your network.   Try localbitcoins.com or find or start a buttonwood / satoshi square in your area.  Pass it on!
btc4ever
Sr. Member
****
Offline Offline

Activity: 419


View Profile
October 11, 2013, 04:05:39 AM
 #4

But the orphans should be detected as not on longest chain and marked orphan, no?

I restarted the daemon with -rescan just in case, but it still gives the same balance as before.

I can only imagine that you mined a bunch of orphans when this coin was first released because I can't see it being possible to get orphans when you're the only person mining a dead shitcoin.

Psst!!  Wanna make bitcoin unstoppable? Why the Only Real Way to Buy Bitcoins Is on the Streets. Avoid banks and centralized exchanges.   Buy/Sell coins locally.  Meet other bitcoiners and develop your network.   Try localbitcoins.com or find or start a buttonwood / satoshi square in your area.  Pass it on!
aa
Hero Member
*****
Offline Offline

Activity: 518


Litecoin is right coin


View Profile WWW
October 11, 2013, 04:07:30 AM
 #5

You're mining a coin that's been forking its chain for who knows how long. You probably mined a bunch of coins on the 'wrong' chain.

Update your client, if you haven't already, and forget about the inconsistencies.

btc4ever
Sr. Member
****
Offline Offline

Activity: 419


View Profile
October 11, 2013, 06:06:54 AM
 #6

The client is updated from github and freshly compiled as of a day or two ago and is fully caught up with the blockchain.  Presently has 3 peers.

dead coin or not, "wrong" chain or not, I do not see why there should be an inconsistency between the balance and the generated transactions.  As I understand it, if I was on a bogus chain and rejoin the longer correct chain, then a re-org should take place and the transactions from the wrong chain should become orphans at that point.

Clearly this did not happen.  Which makes me wonder: is there a bug in the reorg code?  somewhere else?

Or is my understanding of how this should work incorrect / incomplete?

You're mining a coin that's been forking its chain for who knows how long. You probably mined a bunch of coins on the 'wrong' chain.

Update your client, if you haven't already, and forget about the inconsistencies.

Psst!!  Wanna make bitcoin unstoppable? Why the Only Real Way to Buy Bitcoins Is on the Streets. Avoid banks and centralized exchanges.   Buy/Sell coins locally.  Meet other bitcoiners and develop your network.   Try localbitcoins.com or find or start a buttonwood / satoshi square in your area.  Pass it on!
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!